Conditions | 4 |
Paths | 3 |
Total Lines | 17 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
26 | 3 | protected function promoteSingleStrings(array $string) |
|
27 | { |
||
28 | 3 | $newString = []; |
|
29 | 3 | foreach ($string as $element) |
|
30 | { |
||
31 | 3 | if (is_array($element) && count($element) === 1) |
|
32 | { |
||
33 | 2 | $newString = array_merge($newString, $element[0]); |
|
34 | } |
||
35 | else |
||
36 | { |
||
37 | 3 | $newString[] = $element; |
|
38 | } |
||
39 | } |
||
40 | |||
41 | 3 | return $newString; |
|
42 | } |
||
43 | } |