Conditions | 5 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 5 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
52 | 5 | private function lazyLoad($query_name) |
|
53 | { |
||
54 | 5 | if ($this->container instanceof ContainerInterface && isset($this->query_handler_ids[$query_name])) { |
|
55 | 4 | list($service, $method) = $this->query_handler_ids[$query_name]; |
|
56 | 4 | $handler = $this->container->get($service); |
|
57 | |||
58 | 4 | if (is_callable($handler)) { |
|
59 | 1 | return $handler; |
|
60 | 3 | } elseif (is_callable([$handler, $method])) { |
|
61 | 1 | return [$handler, $method]; |
|
62 | } |
||
63 | 2 | } |
|
64 | |||
65 | 3 | return null; |
|
66 | } |
||
67 | } |
||
68 |