Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
38 | 2 | private function convertWord(string $word, array $wordConverters): Traversable |
|
39 | { |
||
40 | 2 | $wordConverter = array_shift($wordConverters); |
|
41 | |||
42 | 2 | if ($wordConverters === []) { |
|
43 | 2 | yield from $wordConverter->convert($word); |
|
44 | 2 | return; |
|
45 | } |
||
46 | |||
47 | 1 | foreach ($wordConverter->convert($word) as $converted) { |
|
48 | 1 | yield from $this->convertWord($converted, $wordConverters); |
|
49 | } |
||
52 |