From 85c6ce5b2142b8700c2b14339b8f83ecd6909163 Mon Sep 17 00:00:00 2001 From: Alexander Bias Date: Sun, 18 Aug 2024 10:58:13 +0200 Subject: [PATCH] Make codechecker happy again --- classes/privacy/provider.php | 2 +- classes/profilecohort.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/classes/privacy/provider.php b/classes/privacy/provider.php index 6d348b5..4d5714b 100644 --- a/classes/privacy/provider.php +++ b/classes/privacy/provider.php @@ -39,7 +39,7 @@ class provider implements \core_privacy\local\metadata\null_provider { * * @return string */ - public static function get_reason() : string { + public static function get_reason(): string { return 'privacy:metadata'; } } diff --git a/classes/profilecohort.php b/classes/profilecohort.php index 8b9aafb..e55c543 100644 --- a/classes/profilecohort.php +++ b/classes/profilecohort.php @@ -202,7 +202,7 @@ private function output_members_entry($cohortname, $cohortmembers, $lastcohortid * @param \core\event\base|null $event (optional) * @param int $userid (optional) mostly used by testing */ - public static function set_cohorts_from_profile(\core\event\base $event = null, $userid = null) { + public static function set_cohorts_from_profile(?\core\event\base $event = null, $userid = null) { global $USER, $DB, $CFG; require_once($CFG->dirroot.'/cohort/lib.php'); @@ -239,7 +239,7 @@ public static function set_cohorts_from_profile(\core\event\base $event = null, * @param \core\event\base|null $event (optional) * @param int $userid (optional) mostly used by testing; overrides possible value from event */ - public static function set_cohorts_from_profile_loginas(\core\event\base $event = null, $userid = null) { + public static function set_cohorts_from_profile_loginas(?\core\event\base $event = null, $userid = null) { global $USER; if ($event && $event->relateduserid && !$userid) { @@ -258,7 +258,7 @@ public static function set_cohorts_from_profile_loginas(\core\event\base $event * @param \core\event\base|null $event (optional) * @param int $userid (optional) mostly used by testing; overrides possible value from event */ - public static function set_cohorts_from_profile_created(\core\event\base $event = null, $userid = null) { + public static function set_cohorts_from_profile_created(?\core\event\base $event = null, $userid = null) { if ($event && $event->objectid && !$userid) { // We have received an event, and caller has not asked for specific user id. $userid = $event->objectid; @@ -272,7 +272,7 @@ public static function set_cohorts_from_profile_created(\core\event\base $event * @param \core\event\base|null $event (optional) * @param int $userid (optional) mostly used by testing; overrides possible value from event */ - public static function set_cohorts_from_profile_updated(\core\event\base $event = null, $userid = null) { + public static function set_cohorts_from_profile_updated(?\core\event\base $event = null, $userid = null) { if ($event && $event->objectid && !$userid) { // We have received an event, and caller has not asked for specific user id. $userid = $event->objectid;