Total Complexity | 4 |
Total Lines | 18 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | class CombinationFormatter extends AbstractFormatter |
||
8 | { |
||
9 | private array $formatters; |
||
10 | |||
11 | public function __construct(FormatterInterface ...$formatters) |
||
12 | { |
||
13 | if (empty($formatters)) { |
||
14 | throw new \LogicException('You must provide formatters to instantiate this class'); |
||
15 | } |
||
16 | $this->formatters = $formatters; |
||
17 | } |
||
18 | |||
19 | public function format(string $string): string |
||
25 | } |
||
26 | } |
||
27 |