1 | <?php |
||
19 | class RuleResolver implements ResolverInterface |
||
20 | { |
||
21 | /** |
||
22 | * @var array|array[] |
||
23 | */ |
||
24 | private $rules = []; |
||
25 | |||
26 | /** |
||
27 | * @var string|null |
||
28 | */ |
||
29 | private $current; |
||
30 | |||
31 | /** |
||
32 | * @var array|string[] |
||
33 | */ |
||
34 | private $keep = []; |
||
35 | |||
36 | /** |
||
37 | * @var array|string[] |
||
38 | */ |
||
39 | private $delegates = []; |
||
40 | |||
41 | /** |
||
42 | * @var array|Readable[] |
||
43 | */ |
||
44 | private $files = []; |
||
45 | |||
46 | /** |
||
47 | * @param Readable $readable |
||
48 | * @param TokenInterface $token |
||
49 | * @throws \Railt\Io\Exception\ExternalFileException |
||
50 | */ |
||
51 | public function resolve(Readable $readable, TokenInterface $token): void |
||
67 | |||
68 | /** |
||
69 | * @param Readable $readable |
||
70 | * @param TokenInterface $token |
||
71 | * @return bool |
||
72 | * @throws \Railt\Io\Exception\ExternalFileException |
||
73 | */ |
||
74 | private function next(Readable $readable, TokenInterface $token): bool |
||
88 | |||
89 | /** |
||
90 | * @param Readable $readable |
||
91 | * @param TokenInterface $token |
||
92 | * @throws \Railt\Io\Exception\ExternalFileException |
||
93 | */ |
||
94 | private function resolveCurrent(Readable $readable, TokenInterface $token): void |
||
117 | |||
118 | /** |
||
119 | * @return array|array[] |
||
120 | */ |
||
121 | public function getRules(): array |
||
125 | |||
126 | /** |
||
127 | * @return array|string[] |
||
128 | */ |
||
129 | public function getKeep(): array |
||
133 | |||
134 | /** |
||
135 | * @return array|string[] |
||
136 | */ |
||
137 | public function getDelegates(): array |
||
141 | |||
142 | /** |
||
143 | * @return array |
||
144 | */ |
||
145 | public function getFiles(): array |
||
149 | } |
||
150 |
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.