| Conditions | 2 |
| Paths | 1 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 34 | public function add(string $class, ?string $key): void |
||
| 35 | { |
||
| 36 | /** @var int $i */ |
||
| 37 | static $i = 0; |
||
| 38 | |||
| 39 | $key ?: (string) $i++; |
||
| 40 | $this->lazyCollection[$this->interface][$key] = new Lazy($class); |
||
| 41 | $bind = (new Bind($this->container, LazyCollection::class))->toInstance(new LazyCollection($this->lazyCollection)); |
||
| 42 | $this->container->add($bind); |
||
| 43 | } |
||
| 45 |