| Total Complexity | 3 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | final class ContainerStub implements ContainerInterface |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @param string $id |
||
| 14 | * |
||
| 15 | * @throws NotFoundExceptionInterface |
||
| 16 | * |
||
| 17 | * @return mixed |
||
| 18 | */ |
||
| 19 | public function get($id) |
||
| 20 | { |
||
| 21 | if (!$this->has($id)) { |
||
| 22 | throw new class extends Exception implements NotFoundExceptionInterface |
||
| 23 | { |
||
| 24 | }; |
||
| 25 | } |
||
| 26 | |||
| 27 | return new $id(); |
||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @param string $id |
||
| 32 | * |
||
| 33 | * @return bool |
||
| 34 | */ |
||
| 35 | public function has($id): bool |
||
| 38 | } |
||
| 39 | } |
||
| 40 |