Conditions | 3 |
Paths | 2 |
Total Lines | 6 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
40 | 30 | public static function assertBoolean($value, string $message = ''): void |
|
41 | { |
||
42 | 30 | if (!is_bool($value)) { |
|
43 | 15 | $format = $message ?: 'Expected a boolean. Got: %1$s'; |
|
44 | 15 | $message = sprintf($format, self::valueToString($value)); |
|
45 | 15 | throw new InvalidArgumentException($message); |
|
46 | } |
||
49 |