Conditions | 4 |
Paths | 1 |
Total Lines | 17 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 14 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | 13 | private function parsePath(string $path): array |
|
20 | { |
||
21 | 13 | return array_map( |
|
22 | function (string $key) { |
||
23 | 12 | return ctype_digit($key) && (strlen($key) === 1 || substr($key, 0, 1) !== "0") |
|
24 | 6 | ? intval($key) |
|
25 | 12 | : $key; |
|
26 | 13 | }, |
|
27 | 13 | array_values( |
|
28 | 13 | array_filter( |
|
29 | 13 | str_getcsv( |
|
30 | 13 | $path, |
|
31 | 13 | DataContainerInterface::SEPARATOR, |
|
32 | 13 | DataContainerInterface::ENCLOSURE, |
|
33 | 13 | DataContainerInterface::ESCAPE |
|
34 | ), |
||
35 | 13 | 'strlen' |
|
36 | ) |
||
41 |