Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
38 | 5 | private function formatWord(iterable $words, array $wordFormatters): Traversable |
|
39 | { |
||
40 | 5 | if ($wordFormatters === []) { |
|
41 | 5 | yield from $words; |
|
42 | 5 | return; |
|
43 | } |
||
44 | |||
45 | 5 | $wordFormatter = array_shift($wordFormatters); |
|
46 | 5 | yield from $this->formatWord($wordFormatter->apply($words), $wordFormatters); |
|
47 | 5 | } |
|
49 |