Skip to content

Commit

Permalink
Code checker updates
Browse files Browse the repository at this point in the history
  • Loading branch information
james-cnz committed Jun 17, 2024
1 parent d3f36c3 commit b3c18f8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions classes/global_navigation_wrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,11 +237,11 @@ public function load_generic_course_sections(\stdClass $course, \navigation_node
* @param \navigation_node $sectionnode
* @param \section_info $section
* @param array $activities An array of activites as returned by see global_navigation::generate_sections_and_activities()
* @param \stdClass $course The course object the section and activities relate to.
* @param \stdClass|null $course The course object the section and activities relate to.
* @return array Array of activity nodes
*/
protected function load_section_activities(\navigation_node $sectionnode, \section_info $section, array $activities,
\stdClass $course = null): array {
?\stdClass $course = null): array {
// CHANGED ABOVE: Use section info instead of number.
global $CFG, $SITE;
// A static counter for JS function naming.
Expand Down
6 changes: 3 additions & 3 deletions lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -609,12 +609,12 @@ public function set_sections_preference(string $preferencename, array $sectionid
/**
* Set and return the format section preferences.
*
* @param string $preferencename preference name
* @param int[] $sectionids affected section IDs
* @param string|null $preferencename preference name
* @param int[]|null $sectionids affected section IDs
* @return array of preferences indexed by section ID
*
*/
protected function fmt_set_get_sections_preferences(string $preferencename = null, array $sectionids = null): array {
protected function fmt_set_get_sections_preferences(?string $preferencename = null, ?array $sectionids = null): array {

$course = $this->get_course();
$sectionsextra = $this->fmt_get_sections_extra();
Expand Down

0 comments on commit b3c18f8

Please sign in to comment.