1 | <?php |
||
18 | class ContainerQueryHandlerLocator implements QueryHandlerLocator |
||
19 | { |
||
20 | /** |
||
21 | * @var ContainerInterface |
||
22 | */ |
||
23 | private $container; |
||
24 | |||
25 | /** |
||
26 | * @var array[] |
||
27 | */ |
||
28 | private $query_handler_ids = []; |
||
29 | |||
30 | /** |
||
31 | * @param ContainerInterface $container |
||
32 | */ |
||
33 | 6 | public function __construct(ContainerInterface $container) |
|
37 | |||
38 | /** |
||
39 | * @param Query $query |
||
40 | * |
||
41 | * @return callable|null |
||
42 | */ |
||
43 | 6 | public function findHandler(Query $query): ?callable |
|
47 | |||
48 | /** |
||
49 | * @param string $query_name |
||
50 | * @param string $service |
||
51 | * @param string $method |
||
52 | */ |
||
53 | 5 | public function registerService(string $query_name, string $service, string $method = '__invoke'): void |
|
57 | |||
58 | /** |
||
59 | * @param string $service_name |
||
60 | * @param string $class_name |
||
61 | */ |
||
62 | 1 | public function registerSubscriberService(string $service_name, string $class_name): void |
|
71 | |||
72 | /** |
||
73 | * @param string $query_name |
||
74 | * |
||
75 | * @return callable|null |
||
76 | */ |
||
77 | 6 | private function lazyLoad(string $query_name): ?callable |
|
87 | |||
88 | /** |
||
89 | * @param mixed $service |
||
90 | * @param string $method |
||
91 | * |
||
92 | * @return callable|null |
||
93 | */ |
||
94 | 5 | private function resolve($service, string $method): ?callable |
|
108 | } |
||
109 |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.