| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 22 | public function add(string $id, $definition, bool $shared = false): DefinitionInterface |
||
| 23 | { |
||
| 24 | if (! $definition instanceof DefinitionInterface) { |
||
| 25 | $definition = (new Definition($id, $definition)); |
||
| 26 | } |
||
| 27 | |||
| 28 | $this->definitions[] = $definition |
||
| 29 | ->setContainer($this->getContainer()) |
||
| 30 | ->setAlias($id) |
||
| 31 | ->setShared($shared) |
||
| 32 | ; |
||
| 33 | |||
| 34 | return $definition; |
||
| 35 | } |
||
| 36 | |||
| 63 |