Skip to content

Commit

Permalink
Notifications: Use explicit nullable types
Browse files Browse the repository at this point in the history
  • Loading branch information
mjansenDatabay committed Jan 30, 2025
1 parent 97a188c commit 5e074af
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

use ILIAS\Setup;
use ILIAS\Refinery;
use ILIAS\Setup\Objective\ObjectiveWithPreconditions;

class ilNotificationUpdateAgent implements Setup\Agent
{
Expand All @@ -36,12 +35,12 @@ public function getArrayToConfigTransformation(): Refinery\Transformation
throw new LogicException('Agent has no config.');
}

public function getInstallObjective(Setup\Config $config = null): Setup\Objective
public function getInstallObjective(?Setup\Config $config = null): Setup\Objective
{
return new Setup\Objective\NullObjective();
}

public function getUpdateObjective(Setup\Config $config = null): Setup\Objective
public function getUpdateObjective(?\Setup\Config $config = null): Setup\Objective
{
return new Setup\ObjectiveCollection(
'Notification Objectives',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function __construct(
private readonly array $channels,
private readonly array $usr_data,
private readonly bool $adminMode = false,
ilLanguage $language = null
?ilLanguage $language = null
) {
if ($language === null) {
global $DIC;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class ilNotificationSystem
private readonly ilRbacReview $rbacReview;
private readonly ilLogger $logger;

public function __construct(ilRbacReview $rbacReview = null, ilLogger $logger = null)
public function __construct(?ilRbacReview $rbacReview = null, ?ilLogger $logger = null)
{
$this->addHandler('osd', new ilNotificationOSDHandler());
$this->addHandler('mail', new ilNotificationMailHandler());
Expand Down

0 comments on commit 5e074af

Please sign in to comment.