1 | <?php |
||
43 | class Compiler implements CompilerInterface, Configuration |
||
44 | { |
||
45 | use Support; |
||
46 | |||
47 | /** |
||
48 | * @var Dictionary |
||
49 | */ |
||
50 | private $loader; |
||
51 | |||
52 | /** |
||
53 | * @var ParserFactory |
||
54 | */ |
||
55 | private $parser; |
||
56 | |||
57 | /** |
||
58 | * @var Storage|ArrayStorage |
||
59 | */ |
||
60 | private $storage; |
||
61 | |||
62 | /** |
||
63 | * @var Validator |
||
64 | */ |
||
65 | private $typeValidator; |
||
66 | |||
67 | /** |
||
68 | * @var Factory|TypeCoercion |
||
69 | */ |
||
70 | private $typeCoercion; |
||
71 | |||
72 | /** |
||
73 | * @var CallStack |
||
74 | */ |
||
75 | private $stack; |
||
76 | |||
77 | /** |
||
78 | * Compiler constructor. |
||
79 | * @param Storage|null $storage |
||
80 | * @throws \OutOfBoundsException |
||
81 | * @throws CompilerException |
||
82 | */ |
||
83 | 283 | public function __construct(Storage $storage = null) |
|
95 | |||
96 | /** |
||
97 | * @param Document $document |
||
98 | * @return CompilerInterface |
||
99 | * @throws \Railt\SDL\Exceptions\CompilerException |
||
100 | */ |
||
101 | 283 | public function add(Document $document): CompilerInterface |
|
111 | |||
112 | /** |
||
113 | * @param null|Storage $storage |
||
114 | * @return Storage |
||
115 | */ |
||
116 | 283 | private function bootStorage(?Storage $storage): Storage |
|
128 | |||
129 | /** |
||
130 | * @param array $extensions |
||
131 | * @return GraphQLDocument|Document |
||
132 | * @throws \OutOfBoundsException |
||
133 | */ |
||
134 | 283 | private function getStandardLibrary(array $extensions = []): GraphQLDocument |
|
138 | |||
139 | /** |
||
140 | * @param Document|DocumentBuilder $document |
||
141 | * @return Document |
||
142 | * @throws \OutOfBoundsException |
||
143 | */ |
||
144 | 7165 | private function complete(Document $document): Document |
|
178 | |||
179 | /** |
||
180 | * @param Document $document |
||
181 | * @return Document|DocumentBuilder |
||
182 | */ |
||
183 | 7165 | private function load(Document $document): Document |
|
193 | |||
194 | /** |
||
195 | * @param \Closure $then |
||
196 | * @return CompilerInterface |
||
197 | */ |
||
198 | 6 | public function autoload(\Closure $then): CompilerInterface |
|
204 | |||
205 | /** |
||
206 | * @param Readable $readable |
||
207 | * @return Document |
||
208 | * @throws \OutOfBoundsException |
||
209 | * @throws \Railt\SDL\Exceptions\UnrecognizedTokenException |
||
210 | * @throws \Railt\SDL\Exceptions\UnexpectedTokenException |
||
211 | * @throws CompilerException |
||
212 | */ |
||
213 | 7164 | public function compile(Readable $readable): Document |
|
229 | |||
230 | /** |
||
231 | * @return \Closure |
||
232 | * @throws \OutOfBoundsException |
||
233 | * @throws UnexpectedTokenException |
||
234 | * @throws UnrecognizedTokenException |
||
235 | * @throws CompilerException |
||
236 | */ |
||
237 | private function onCompile(): \Closure |
||
245 | |||
246 | /** |
||
247 | * @param string $group |
||
248 | * @return ValidatorInterface |
||
249 | * @throws \OutOfBoundsException |
||
250 | */ |
||
251 | 7164 | public function getValidator(string $group): ValidatorInterface |
|
255 | |||
256 | /** |
||
257 | * @return ParserInterface |
||
258 | */ |
||
259 | public function getParser(): ParserInterface |
||
263 | |||
264 | /** |
||
265 | * @return TypeCoercion |
||
266 | */ |
||
267 | 6563 | public function getTypeCoercion(): TypeCoercion |
|
271 | |||
272 | /** |
||
273 | * @return Storage |
||
274 | * @deprecated Since 1.2: Use getStorage() method instead. |
||
275 | */ |
||
276 | public function getPersister(): Storage |
||
285 | |||
286 | /** |
||
287 | * @return Storage |
||
288 | */ |
||
289 | public function getStorage(): Storage |
||
293 | |||
294 | /** |
||
295 | * @return Dictionary |
||
296 | */ |
||
297 | 7153 | public function getDictionary(): Dictionary |
|
301 | |||
302 | /** |
||
303 | * @return CallStackInterface |
||
304 | */ |
||
305 | 6563 | public function getCallStack(): CallStackInterface |
|
309 | } |
||
310 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..