1 | <?php |
||
30 | class Compiler implements CompilerInterface |
||
31 | { |
||
32 | /** |
||
33 | * @var ReflectionInterface |
||
34 | */ |
||
35 | private $reflection; |
||
36 | |||
37 | /** |
||
38 | * @var Frontend |
||
39 | */ |
||
40 | private $frontend; |
||
41 | |||
42 | /** |
||
43 | * @var Backend |
||
44 | */ |
||
45 | private $backend; |
||
46 | |||
47 | /** |
||
48 | * @var Process |
||
49 | */ |
||
50 | private $process; |
||
51 | |||
52 | /** |
||
53 | * Compiler constructor. |
||
54 | */ |
||
55 | public function __construct() |
||
62 | |||
63 | /** |
||
64 | * @return \Closure |
||
65 | */ |
||
66 | private function typeLoader(): \Closure |
||
72 | |||
73 | /** |
||
74 | * @param Readable $schema |
||
75 | * @return DocumentInterface |
||
76 | * @throws InternalErrorException |
||
77 | * @throws SyntaxException |
||
78 | * @throws TypeException |
||
79 | */ |
||
80 | public function compile(Readable $schema): DocumentInterface |
||
88 | |||
89 | 283 | /** |
|
90 | * @param Readable $schema |
||
91 | 283 | * @return DocumentInterface |
|
92 | 283 | * @throws InternalErrorException |
|
93 | * @throws SyntaxException |
||
94 | * @throws TypeException |
||
95 | */ |
||
96 | private function runCompiler(Readable $schema): DocumentInterface |
||
100 | 283 | ||
101 | /** |
||
102 | * @param ReflectionInterface $reflection |
||
103 | 283 | * @param Readable $schema |
|
104 | * @return DocumentInterface |
||
105 | * @throws InternalErrorException |
||
106 | * @throws SyntaxException |
||
107 | * @throws TypeException |
||
108 | 283 | */ |
|
109 | private function run(ReflectionInterface $reflection, Readable $schema): DocumentInterface |
||
116 | |||
117 | 283 | /** |
|
118 | 283 | * @param ReflectionInterface $reflection |
|
119 | * @param Readable $schema |
||
120 | * @return DocumentInterface |
||
121 | 283 | */ |
|
122 | 283 | private function document(ReflectionInterface $reflection, Readable $schema): DocumentInterface |
|
126 | |||
127 | /** |
||
128 | * @param Readable $schema |
||
129 | * @return ReflectionInterface |
||
130 | * @throws InternalErrorException |
||
131 | * @throws SyntaxException |
||
132 | 283 | * @throws TypeException |
|
133 | */ |
||
134 | 283 | public function preload(Readable $schema): ReflectionInterface |
|
140 | } |
||
141 |
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..