1 | <?php |
||
23 | class Builder |
||
24 | { |
||
25 | /** |
||
26 | * @var string[]|BuilderInterface[] |
||
27 | */ |
||
28 | private const DEFAULT_BUILDER_DEFINITIONS = [ |
||
29 | |||
30 | ]; |
||
31 | |||
32 | /** |
||
33 | * string[]|InterceptorInterface[] |
||
34 | */ |
||
35 | private const DEFAULT_INTERCEPTORS = [ |
||
36 | RuleInterceptor::class, |
||
37 | ]; |
||
38 | |||
39 | /** |
||
40 | * @var array|BuilderInterface[] |
||
41 | */ |
||
42 | private $builders = []; |
||
43 | |||
44 | /** |
||
45 | * @var SymbolTable |
||
46 | */ |
||
47 | private $table; |
||
48 | |||
49 | /** |
||
50 | * @var array|InterceptorInterface[] |
||
51 | */ |
||
52 | private $interceptors = []; |
||
53 | |||
54 | /** |
||
55 | * Builder constructor. |
||
56 | */ |
||
57 | public function __construct() |
||
62 | |||
63 | /** |
||
64 | * @return void |
||
65 | */ |
||
66 | private function bootDefaults(): void |
||
71 | |||
72 | /** |
||
73 | * @return void |
||
74 | */ |
||
75 | private function bootDefaultBuilders(): void |
||
81 | |||
82 | /** |
||
83 | * @return void |
||
84 | */ |
||
85 | private function bootDefaultInterceptors(): void |
||
91 | |||
92 | /** |
||
93 | * @param Readable $file |
||
94 | * @param RuleInterface $ast |
||
95 | * @return ValueObject |
||
96 | * @throws \Railt\Io\Exception\ExternalFileException |
||
97 | */ |
||
98 | public function build(Readable $file, RuleInterface $ast): ValueObject |
||
109 | |||
110 | /** |
||
111 | * @param Readable $file |
||
112 | * @param RuleInterface $ast |
||
113 | * @return mixed |
||
114 | * @throws \Railt\Io\Exception\ExternalFileException |
||
115 | */ |
||
116 | public function reduce(Readable $file, RuleInterface $ast) |
||
126 | |||
127 | /** |
||
128 | * @param Readable $file |
||
129 | * @param \Generator $process |
||
130 | * @return mixed |
||
131 | */ |
||
132 | private function run(Readable $file, \Generator $process) |
||
149 | |||
150 | /** |
||
151 | * @param Readable $file |
||
152 | * @param RuleInterface $ast |
||
153 | * @return BuilderInterface |
||
154 | * @throws \Railt\Io\Exception\ExternalFileException |
||
155 | */ |
||
156 | private function get(Readable $file, RuleInterface $ast): BuilderInterface |
||
167 | } |
||
168 |
Since your code implements the magic setter
_set
, this function will be called for any write access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.Since the property has write access only, you can use the @property-write annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.