Skip to content

Commit

Permalink
Make codechecker happy again
Browse files Browse the repository at this point in the history
  • Loading branch information
abias committed Aug 18, 2024
1 parent 0296116 commit 85c6ce5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
}
8 changes: 4 additions & 4 deletions classes/profilecohort.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down Expand Up @@ -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) {
Expand All @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 85c6ce5

Please sign in to comment.