Conditions | 5 |
Paths | 4 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 5.0488 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
25 | 2 | public function matchToBeDefined(mixed $input): bool |
|
26 | { |
||
27 | 2 | if (! is_scalar($input) && ! is_null($input)) { |
|
28 | return false; |
||
29 | } |
||
30 | |||
31 | 2 | $input = trim(strval($input)); |
|
32 | 2 | foreach ($this->toBeDefinedTexts as $toBeDefinedText) { |
|
33 | 2 | if (0 === strcasecmp($toBeDefinedText, $input)) { |
|
34 | 2 | return true; |
|
35 | } |
||
36 | } |
||
37 | 1 | return false; |
|
38 | } |
||
40 |