1 | <?php |
||
20 | class Builder |
||
21 | { |
||
22 | /** |
||
23 | * @var Factory |
||
24 | */ |
||
25 | private $factory; |
||
26 | |||
27 | /** |
||
28 | * Builder constructor. |
||
29 | */ |
||
30 | public function __construct() |
||
34 | |||
35 | /** |
||
36 | * @param Readable $readable |
||
37 | * @param RuleInterface $ast |
||
38 | * @return \Generator|RuleInterface[]|Definition[] |
||
39 | * @throws \LogicException |
||
40 | */ |
||
41 | public function build(Readable $readable, RuleInterface $ast) |
||
59 | |||
60 | /** |
||
61 | * @param Readable $readable |
||
62 | * @param RuleInterface $ast |
||
63 | * @return mixed|null |
||
64 | * @throws \LogicException |
||
65 | */ |
||
66 | public function reduce(Readable $readable, RuleInterface $ast) |
||
76 | |||
77 | /** |
||
78 | * @param Readable $readable |
||
79 | * @param RuleInterface $ast |
||
80 | * @return \Generator |
||
81 | * @throws \LogicException |
||
82 | */ |
||
83 | private function forEach(Readable $readable, RuleInterface $ast): \Generator |
||
94 | } |
||
95 |
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.