Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
23 | 122 | protected function valueToBoolean($input): bool |
|
24 | { |
||
25 | 122 | $input = trim((string) $input); |
|
26 | 122 | if (in_array($input, $this->trueValues, true)) { |
|
27 | 20 | return true; |
|
28 | } |
||
29 | 122 | if (in_array($input, $this->falseValues, true)) { |
|
30 | 16 | return false; |
|
31 | } |
||
32 | 122 | return $this->default; |
|
33 | } |
||
35 |