Conditions | 9 |
Paths | 9 |
Total Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
43 | public static function parseString(?string $value): bool { |
||
44 | |||
45 | if (null === $value) { |
||
46 | return false; |
||
47 | } |
||
48 | |||
49 | switch (strtolower($value)) { |
||
50 | case "1": |
||
51 | case "o": |
||
52 | case "ok": |
||
53 | case "oui": |
||
54 | case "true": |
||
55 | case "y": |
||
56 | case "yes": |
||
57 | return true; |
||
58 | } |
||
59 | |||
60 | return false; |
||
61 | } |
||
62 | } |
||
63 |