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