| 1 | <?php |
||
| 19 | class TypeHintReducer implements ReducerInterface |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * @param RuleInterface $rule |
||
| 23 | * @return bool |
||
| 24 | */ |
||
| 25 | public function match(RuleInterface $rule): bool |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @param RuleInterface $rule |
||
| 32 | * @return \Generator|TypeHint |
||
| 33 | */ |
||
| 34 | public function reduce(RuleInterface $rule): \Generator |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @param array|Matchable[] $hints |
||
| 47 | * @return mixed |
||
| 48 | */ |
||
| 49 | private function pack(array $hints) |
||
| 61 | } |
||
| 62 |
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.