Total Complexity | 8 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
9 | final class MixedCaseConverter extends ChainableFormatter |
||
10 | { |
||
11 | /** |
||
12 | * @param iterable<string> $words Words to format. |
||
13 | * @return Traversable<string> Variants of the words with all combinations of upper case and lower case characters. |
||
14 | */ |
||
15 | 4 | protected function applyCurrent(iterable $words): Traversable |
|
16 | { |
||
17 | 4 | foreach ($words as $word) { |
|
18 | 4 | yield from $this->formatWord($word); |
|
19 | } |
||
20 | 4 | } |
|
21 | |||
22 | /** |
||
23 | * @param string $word Word to format. |
||
24 | * @return Traversable<string> Variants of the word with all combinations of upper case and lower case characters. |
||
25 | */ |
||
26 | 4 | private function formatWord(string $word): Traversable |
|
46 | } |
||
47 | } |
||
50 |