Total Complexity | 4 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | final class Combiner implements Formatter |
||
11 | { |
||
12 | use Chaining; |
||
13 | |||
14 | /** |
||
15 | * @var array<Formatter> Character tree formatters. |
||
16 | */ |
||
17 | private $formatters; |
||
18 | |||
19 | /** |
||
20 | * @var bool Whether the result should also include the character tree unformatted. |
||
21 | */ |
||
22 | private $includeUnformatted; |
||
23 | |||
24 | /** |
||
25 | * @param array<Formatter> $formatters Character tree formatters. |
||
26 | * @param bool $includeUnformatted Whether the result should also include the character tree unformatted. |
||
27 | */ |
||
28 | 3 | public function __construct(array $formatters, bool $includeUnformatted = true) |
|
32 | 3 | } |
|
33 | |||
34 | /** |
||
35 | * @param CharTree $charTree Character tree to format. |
||
36 | * @return CharTree The character tree formatted by all the formatters in the combiner. |
||
37 | */ |
||
38 | 3 | protected function applyCurrent(CharTree $charTree): CharTree |
|
53 |