| Total Complexity | 5 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 15 | ||
| Bugs | 5 | Features | 1 |
| 1 | <?php |
||
| 16 | class Container implements ContainerInterface |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * Container. |
||
| 20 | * |
||
| 21 | * @var RuntimeContainer |
||
| 22 | */ |
||
| 23 | protected $container; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Create container. |
||
| 27 | */ |
||
| 28 | 64 | public function __construct(iterable $config = [], ?ContainerInterface $parent = null) |
|
| 29 | { |
||
| 30 | 64 | $this->container = new RuntimeContainer($config, $parent, $this); |
|
| 31 | 64 | } |
|
| 32 | |||
| 33 | /** |
||
| 34 | * Build an entry of the container by its name. |
||
| 35 | */ |
||
| 36 | 3 | public function make(string $name, array $parameters = []) |
|
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Get service. |
||
| 43 | */ |
||
| 44 | 59 | public function get($name) |
|
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * Check if service is registered. |
||
| 51 | */ |
||
| 52 | 3 | public function has($name): bool |
|
| 63 |