Skip to content

Commit d545245

Browse files
committed
Handle NULL pass to boolean set function
1 parent 5dc0470 commit d545245

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/Model/CronSchedule.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@ public function isEnabled(): bool
129129
}
130130

131131
/**
132-
* @param bool $boolean
132+
* @param bool|null $boolean
133133
*/
134-
public function setEnabled(bool $boolean): void
134+
public function setEnabled(bool $boolean = null): void
135135
{
136136
$this->enabled = (bool) $boolean;
137137
}

src/Model/Report.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ public function isEnabled(): bool
9292
}
9393

9494
/**
95-
* @param bool $boolean
95+
* @param bool|null $boolean
9696
*/
97-
public function setEnabled(bool $boolean): void
97+
public function setEnabled(bool $boolean = null): void
9898
{
9999
$this->enabled = (bool) $boolean;
100100
}

src/Model/User.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,9 @@ public function isAllowSystemAdmin(): bool
188188
}
189189

190190
/**
191-
* @param bool $boolean
191+
* @param bool|null $boolean
192192
*/
193-
public function setAllowSystemAdmin(bool $boolean): void
193+
public function setAllowSystemAdmin(bool $boolean = null): void
194194
{
195195
$this->allowSystemAdmin = (bool) $boolean;
196196
}
@@ -399,9 +399,9 @@ public function isEnabled()
399399
}
400400

401401
/**
402-
* @param bool $boolean
402+
* @param bool|null $boolean
403403
*/
404-
public function setEnabled(bool $boolean): void
404+
public function setEnabled(bool $boolean = null): void
405405
{
406406
$this->enabled = (bool) $boolean;
407407
}

0 commit comments

Comments
 (0)