Total Complexity | 6 |
Total Lines | 32 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
15 | final class Lazy implements LazyContainer |
||
16 | { |
||
17 | private array $registry = []; |
||
18 | |||
19 | public static function container(): LazyContainer |
||
20 | { |
||
21 | return new self(); |
||
22 | } |
||
23 | |||
24 | public function offsetExists($name): bool |
||
25 | { |
||
26 | return isset($this->registry[$name]); |
||
27 | } |
||
28 | |||
29 | public function offsetUnset($name): void |
||
32 | } |
||
33 | |||
34 | public function offsetSet($name, $parser): void |
||
37 | } |
||
38 | |||
39 | public function offsetGet($name): Parser |
||
40 | { |
||
41 | return new Lazily($this, $name); |
||
42 | } |
||
43 | |||
44 | public function factory(string $name): Closure |
||
47 | } |
||
48 | } |
||
49 |