Total Complexity | 7 |
Total Lines | 40 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | final class Aggregate implements Factory |
||
12 | { |
||
13 | /** |
||
14 | * @var array<Factory> |
||
15 | */ |
||
16 | private array $factories = []; |
||
17 | |||
18 | 3 | public function addFactory(Factory $factory): void |
|
19 | { |
||
20 | 3 | $this->factories[] = $factory; |
|
21 | 3 | } |
|
22 | |||
23 | /** |
||
24 | * {@inheritdoc} |
||
25 | * |
||
26 | * @throw InvalidArgumentException Not able to create a dictionary with the given name |
||
27 | */ |
||
28 | 2 | public function create(string $name, array $config): Dictionary |
|
39 | )); |
||
40 | } |
||
41 | |||
42 | 1 | public function supports(array $config): bool |
|
51 | } |
||
52 | } |
||
53 |