Total Complexity | 6 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | trait CanConvertValuesToBooleans |
||
18 | { |
||
19 | private function convertStringsToBoolean(array $values): array |
||
20 | { |
||
21 | return array_map(function ($value) { |
||
22 | if ($value === 'true') { |
||
23 | return true; |
||
24 | } |
||
25 | if ($value === 'false') { |
||
26 | return false; |
||
27 | } |
||
28 | |||
29 | return $value; |
||
30 | }, $values); |
||
31 | } |
||
32 | |||
33 | private function convertBooleansToString(array $values): array |
||
45 | } |
||
46 | } |
||
47 |