| Total Complexity | 5 |
| Total Lines | 56 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | final class ContainerBag implements ContainerBagInterface |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var ContainerInterface |
||
| 13 | */ |
||
| 14 | private $container; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var InvokerInterface |
||
| 18 | */ |
||
| 19 | private $invoker; |
||
| 20 | |||
| 21 | 19 | public function __construct(ContainerInterface $container, InvokerInterface $invoker) |
|
| 22 | { |
||
| 23 | 19 | $this->container = $container; |
|
| 24 | 19 | $this->invoker = $invoker; |
|
| 25 | 19 | } |
|
| 26 | |||
| 27 | /** |
||
| 28 | * @param string $id |
||
| 29 | * @return mixed |
||
| 30 | */ |
||
| 31 | 7 | public function get($id) |
|
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @param string $id |
||
| 38 | * @return bool |
||
| 39 | */ |
||
| 40 | 1 | public function has($id): bool |
|
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @param callable $callable |
||
| 47 | * @param array $args |
||
| 48 | * @return mixed |
||
| 49 | * @throws Invoker\Exceptions\InvocationException |
||
| 50 | */ |
||
| 51 | 1 | public function call(callable $callable, array $args = []) |
|
| 54 | } |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @param callable $callable |
||
| 58 | * @param array $args |
||
| 59 | * @return array |
||
| 60 | * @throws Invoker\Exceptions\InvocationException |
||
| 61 | */ |
||
| 62 | 3 | public function complement(callable $callable, array $args = []): array |
|
| 67 |