| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| 1 | <?php |
||
| 48 | 19 | public function __invoke($instance, Container $container) |
|
| 49 | { |
||
| 50 | try { |
||
| 51 | 19 | $parameters = $this->arguments->inject($container); |
|
| 52 | 19 | } catch (Unbound $e) { |
|
| 53 | 6 | if ($this->isOptional) { |
|
| 54 | 5 | return; |
|
| 55 | } |
||
| 56 | 1 | throw $e; |
|
| 57 | } |
||
| 58 | 18 | call_user_func_array([$instance, $this->method], $parameters); |
|
| 59 | 18 | } |
|
| 60 | } |
||
| 61 |