| Total Complexity | 5 |
| Total Lines | 47 |
| Duplicated Lines | 0 % |
| Coverage | 81.82% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | final class DependencyResolver implements DependencyResolverInterface |
||
| 16 | { |
||
| 17 | private ContainerInterface $container; |
||
| 18 | |||
| 19 | 98 | public function __construct(ContainerInterface $container) |
|
| 20 | { |
||
| 21 | 98 | $this->container = $container; |
|
| 22 | 98 | } |
|
| 23 | |||
| 24 | /** |
||
| 25 | * @param string $id |
||
| 26 | * |
||
| 27 | * @throws NotFoundExceptionInterface |
||
| 28 | * @throws ContainerExceptionInterface |
||
| 29 | * |
||
| 30 | * @return mixed|object |
||
| 31 | * |
||
| 32 | * @psalm-suppress InvalidThrow |
||
| 33 | */ |
||
| 34 | 61 | public function get($id) |
|
| 35 | { |
||
| 36 | 61 | return $this->container->get($id); |
|
| 37 | } |
||
| 38 | |||
| 39 | public function has($id): bool |
||
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @param string $id |
||
| 46 | * |
||
| 47 | * @throws NotFoundExceptionInterface |
||
| 48 | * @throws ContainerExceptionInterface |
||
| 49 | * |
||
| 50 | * @return mixed|object |
||
| 51 | * |
||
| 52 | * @psalm-suppress InvalidThrow |
||
| 53 | */ |
||
| 54 | 47 | public function resolve(string $id) |
|
| 57 | } |
||
| 58 | |||
| 59 | 91 | public function shouldCloneOnResolve(): bool |
|
| 64 |