| Conditions | 3 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 19 | protected function runPass(array $strings): array |
||
| 20 | 4 | { |
|
| 21 | 4 | $singles = $this->getSingleCharStrings($strings); |
|
| 22 | 4 | $cnt = count($singles); |
|
| 23 | if ($cnt > 1 && $cnt < count($strings)) |
||
| 24 | { |
||
| 25 | 1 | // Remove the singles from the input, then prepend them as a new string |
|
| 26 | 1 | $strings = array_diff_key($strings, $singles); |
|
| 27 | array_unshift($strings, [array_values($singles)]); |
||
| 28 | } |
||
| 29 | 4 | ||
| 30 | return $strings; |
||
| 31 | } |
||
| 43 | } |