Conditions | 4 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 4 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
30 | 3 | protected function promoteSingleStrings(array $string): array |
|
31 | { |
||
32 | 3 | $newString = []; |
|
33 | 3 | foreach ($string as $element) |
|
34 | { |
||
35 | 3 | if (is_array($element) && count($element) === 1) |
|
36 | { |
||
37 | 2 | $newString = array_merge($newString, $element[0]); |
|
38 | } |
||
39 | else |
||
40 | { |
||
41 | 2 | $newString[] = $element; |
|
42 | } |
||
43 | } |
||
44 | |||
45 | 3 | return $newString; |
|
46 | } |
||
47 | } |