Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
53 | 14 | public function addDefinitions(array $definitions): void |
|
54 | { |
||
55 | 14 | foreach ($definitions as $id => $definition) { |
|
56 | 14 | if ($this->definitions->offsetExists($id)) { |
|
57 | 1 | throw new ContainerException("More than one definition is found for entry or class $id"); |
|
58 | } |
||
59 | |||
60 | 14 | $this->definitions->offsetSet($id, $definition); |
|
61 | } |
||
62 | 14 | } |
|
63 | |||
94 |