| Total Complexity | 3 |
| Total Lines | 22 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class Container implements ContainerInterface |
||
| 11 | { |
||
| 12 | private array $services; |
||
| 13 | |||
| 14 | public function __construct(array $services = []) |
||
| 17 | } |
||
| 18 | |||
| 19 | public function get($id) |
||
| 20 | { |
||
| 21 | if ($this->has($id)) { |
||
| 22 | return $this->services[$id]; |
||
| 23 | } |
||
| 24 | |||
| 25 | throw new class ('Not found') extends \Exception implements NotFoundExceptionInterface { |
||
| 26 | }; |
||
| 27 | } |
||
| 28 | |||
| 29 | public function has($id): bool |
||
| 32 | } |
||
| 33 | } |
||
| 34 |