| Conditions | 4 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 45 | 3 | private function prepareCallable($callable, ContainerInterface $container): callable |
|
| 46 | { |
||
| 47 | 3 | if (is_array($callable) && !is_object($callable[0])) { |
|
| 48 | 2 | $reflection = new ReflectionMethod($callable[0], $callable[1]); |
|
| 49 | 2 | if (!$reflection->isStatic()) { |
|
| 50 | /** @var mixed */ |
||
| 51 | 1 | $callable[0] = $container->get($callable[0]); |
|
| 52 | } |
||
| 53 | } |
||
| 54 | |||
| 55 | 3 | return $callable; |
|
| 56 | } |
||
| 58 |