Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
25 | 5 | public static function validate(string $nullHandling): string |
|
26 | { |
||
27 | 5 | if (!NullHandling::isValidValue($nullHandling)) { |
|
28 | 1 | throw new InvalidArgumentException( |
|
29 | 1 | 'The given NullHandling value is invalid: ' . $nullHandling . '. ' . |
|
30 | 1 | 'Allowed are: ' . implode(',', NullHandling::values()) |
|
31 | ); |
||
32 | } |
||
33 | |||
34 | 4 | return $nullHandling; |
|
35 | } |
||
36 | } |