Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
24 | 11 | public static function validate(string $joinType): string |
|
25 | { |
||
26 | 11 | $joinType = strtoupper($joinType); |
|
27 | 11 | if (!JoinType::isValidValue($joinType)) { |
|
28 | 3 | throw new InvalidArgumentException( |
|
29 | 3 | 'The given join type is invalid: ' . $joinType . '. ' . |
|
30 | 3 | 'Allowed are: ' . implode(', ', JoinType::values()) |
|
31 | ); |
||
32 | } |
||
33 | |||
34 | 8 | return $joinType; |
|
35 | } |
||
36 | } |