@@ 147-156 (lines=10) @@ | ||
144 | $statements_analyzer->node_data->setType($stmt, Type::getLiteralClassString($fq_class_name)); |
|
145 | } |
|
146 | ||
147 | if ($codebase->store_node_types |
|
148 | && !$context->collect_initializations |
|
149 | && !$context->collect_mutations |
|
150 | ) { |
|
151 | $codebase->analyzer->addNodeReference( |
|
152 | $statements_analyzer->getFilePath(), |
|
153 | $stmt->class, |
|
154 | $fq_class_name |
|
155 | ); |
|
156 | } |
|
157 | ||
158 | return true; |
|
159 | } |
|
@@ 168-177 (lines=10) @@ | ||
165 | return true; |
|
166 | } |
|
167 | ||
168 | if ($codebase->store_node_types |
|
169 | && !$context->collect_initializations |
|
170 | && !$context->collect_mutations |
|
171 | ) { |
|
172 | $codebase->analyzer->addNodeReference( |
|
173 | $statements_analyzer->getFilePath(), |
|
174 | $stmt->class, |
|
175 | $fq_class_name |
|
176 | ); |
|
177 | } |
|
178 | ||
179 | if (!$stmt->name instanceof PhpParser\Node\Identifier) { |
|
180 | return true; |
|
@@ 185-194 (lines=10) @@ | ||
182 | ||
183 | $const_id = $fq_class_name . '::' . $stmt->name; |
|
184 | ||
185 | if ($codebase->store_node_types |
|
186 | && !$context->collect_initializations |
|
187 | && !$context->collect_mutations |
|
188 | ) { |
|
189 | $codebase->analyzer->addNodeReference( |
|
190 | $statements_analyzer->getFilePath(), |
|
191 | $stmt->name, |
|
192 | $const_id |
|
193 | ); |
|
194 | } |
|
195 | ||
196 | if ($fq_class_name === $context->self |
|
197 | || ( |
@@ 107-116 (lines=10) @@ | ||
104 | $codebase->analyzer->incrementNonMixedCount($statements_analyzer->getFilePath()); |
|
105 | } |
|
106 | ||
107 | if ($codebase->store_node_types |
|
108 | && !$context->collect_initializations |
|
109 | && !$context->collect_mutations |
|
110 | ) { |
|
111 | $codebase->analyzer->addNodeType( |
|
112 | $statements_analyzer->getFilePath(), |
|
113 | $stmt->name, |
|
114 | $stmt_type->getId() |
|
115 | ); |
|
116 | } |
|
117 | ||
118 | if ($stmt_var_id === '$this' |
|
119 | && !$stmt_type->initialized |
|
@@ 200-209 (lines=10) @@ | ||
197 | : null |
|
198 | ); |
|
199 | ||
200 | if ($codebase->store_node_types |
|
201 | && !$context->collect_initializations |
|
202 | && !$context->collect_mutations |
|
203 | ) { |
|
204 | $codebase->analyzer->addNodeReference( |
|
205 | $statements_analyzer->getFilePath(), |
|
206 | $stmt->name, |
|
207 | $property_id |
|
208 | ); |
|
209 | } |
|
210 | } |
|
211 | } |
|
212 | } |
|
@@ 285-294 (lines=10) @@ | ||
282 | ||
283 | $statements_analyzer->node_data->setType($stmt, Type::getMixed()); |
|
284 | ||
285 | if ($codebase->store_node_types |
|
286 | && !$context->collect_initializations |
|
287 | && !$context->collect_mutations |
|
288 | ) { |
|
289 | $codebase->analyzer->addNodeType( |
|
290 | $statements_analyzer->getFilePath(), |
|
291 | $stmt->name, |
|
292 | $stmt_var_type->getId() |
|
293 | ); |
|
294 | } |
|
295 | } |
|
296 | ||
297 | if (!$context->collect_initializations |
|
@@ 660-669 (lines=10) @@ | ||
657 | } |
|
658 | } |
|
659 | ||
660 | if ($codebase->store_node_types |
|
661 | && !$context->collect_initializations |
|
662 | && !$context->collect_mutations |
|
663 | ) { |
|
664 | $codebase->analyzer->addNodeReference( |
|
665 | $statements_analyzer->getFilePath(), |
|
666 | $stmt->name, |
|
667 | $property_id |
|
668 | ); |
|
669 | } |
|
670 | ||
671 | $config = $statements_analyzer->getProjectAnalyzer()->getConfig(); |
|
672 |
@@ 168-177 (lines=10) @@ | ||
165 | ||
166 | $property_id = $fq_class_name . '::$' . $prop_name; |
|
167 | ||
168 | if ($codebase->store_node_types |
|
169 | && !$context->collect_initializations |
|
170 | && !$context->collect_mutations |
|
171 | ) { |
|
172 | $codebase->analyzer->addNodeReference( |
|
173 | $statements_analyzer->getFilePath(), |
|
174 | $stmt->name, |
|
175 | $property_id |
|
176 | ); |
|
177 | } |
|
178 | ||
179 | if ($context->mutation_free) { |
|
180 | if (IssueBuffer::accepts( |
|
@@ 337-346 (lines=10) @@ | ||
334 | ||
335 | $statements_analyzer->node_data->setType($stmt, $stmt_type); |
|
336 | ||
337 | if ($codebase->store_node_types |
|
338 | && !$context->collect_initializations |
|
339 | && !$context->collect_mutations |
|
340 | ) { |
|
341 | $codebase->analyzer->addNodeType( |
|
342 | $statements_analyzer->getFilePath(), |
|
343 | $stmt->name, |
|
344 | $stmt_type->getId() |
|
345 | ); |
|
346 | } |
|
347 | } else { |
|
348 | $statements_analyzer->node_data->setType($stmt, Type::getMixed()); |
|
349 | } |
@@ 598-607 (lines=10) @@ | ||
595 | continue; |
|
596 | } |
|
597 | ||
598 | if ($codebase->store_node_types |
|
599 | && !$context->collect_initializations |
|
600 | && !$context->collect_mutations |
|
601 | ) { |
|
602 | $codebase->analyzer->addNodeReference( |
|
603 | $statements_analyzer->getFilePath(), |
|
604 | $stmt->name, |
|
605 | $property_id |
|
606 | ); |
|
607 | } |
|
608 | ||
609 | $property_exists = true; |
|
610 |
@@ 326-335 (lines=10) @@ | ||
323 | } |
|
324 | } |
|
325 | ||
326 | if ($codebase->store_node_types |
|
327 | && !$context->collect_initializations |
|
328 | && !$context->collect_mutations |
|
329 | ) { |
|
330 | $codebase->analyzer->addNodeType( |
|
331 | $statements_analyzer->getFilePath(), |
|
332 | $stmt, |
|
333 | $stmt_type->getId() |
|
334 | ); |
|
335 | } |
|
336 | ||
337 | if ($codebase->store_node_types |
|
338 | && !$context->collect_initializations |