| @@ 55-63 (lines=9) @@ | ||
| 52 | $result_type = Type::getString(); |
|
| 53 | ||
| 54 | if ($left_type->hasMixed() || $right_type->hasMixed()) { |
|
| 55 | if (!$context->collect_initializations |
|
| 56 | && !$context->collect_mutations |
|
| 57 | && $statements_analyzer->getFilePath() === $statements_analyzer->getRootFilePath() |
|
| 58 | && (!(($parent_source = $statements_analyzer->getSource()) |
|
| 59 | instanceof \Psalm\Internal\Analyzer\FunctionLikeAnalyzer) |
|
| 60 | || !$parent_source->getSource() instanceof \Psalm\Internal\Analyzer\TraitAnalyzer) |
|
| 61 | ) { |
|
| 62 | $codebase->analyzer->incrementMixedCount($statements_analyzer->getFilePath()); |
|
| 63 | } |
|
| 64 | ||
| 65 | if ($left_type->hasMixed()) { |
|
| 66 | if (IssueBuffer::accepts( |
|
| @@ 90-98 (lines=9) @@ | ||
| 87 | return; |
|
| 88 | } |
|
| 89 | ||
| 90 | if (!$context->collect_initializations |
|
| 91 | && !$context->collect_mutations |
|
| 92 | && $statements_analyzer->getFilePath() === $statements_analyzer->getRootFilePath() |
|
| 93 | && (!(($parent_source = $statements_analyzer->getSource()) |
|
| 94 | instanceof \Psalm\Internal\Analyzer\FunctionLikeAnalyzer) |
|
| 95 | || !$parent_source->getSource() instanceof \Psalm\Internal\Analyzer\TraitAnalyzer) |
|
| 96 | ) { |
|
| 97 | $codebase->analyzer->incrementNonMixedCount($statements_analyzer->getFilePath()); |
|
| 98 | } |
|
| 99 | ||
| 100 | if ($left_type->isNull()) { |
|
| 101 | if (IssueBuffer::accepts( |
|
| @@ 160-168 (lines=9) @@ | ||
| 157 | } |
|
| 158 | ||
| 159 | if ($lhs_type->hasMixed()) { |
|
| 160 | if (!$context->collect_initializations |
|
| 161 | && !$context->collect_mutations |
|
| 162 | && $statements_analyzer->getFilePath() === $statements_analyzer->getRootFilePath() |
|
| 163 | && (!(($parent_source = $statements_analyzer->getSource()) |
|
| 164 | instanceof \Psalm\Internal\Analyzer\FunctionLikeAnalyzer) |
|
| 165 | || !$parent_source->getSource() instanceof \Psalm\Internal\Analyzer\TraitAnalyzer) |
|
| 166 | ) { |
|
| 167 | $codebase->analyzer->incrementMixedCount($statements_analyzer->getFilePath()); |
|
| 168 | } |
|
| 169 | ||
| 170 | if ($stmt->name instanceof PhpParser\Node\Identifier) { |
|
| 171 | $codebase->analyzer->addMixedMemberName( |
|
| @@ 190-198 (lines=9) @@ | ||
| 187 | return null; |
|
| 188 | } |
|
| 189 | ||
| 190 | if (!$context->collect_initializations |
|
| 191 | && !$context->collect_mutations |
|
| 192 | && $statements_analyzer->getFilePath() === $statements_analyzer->getRootFilePath() |
|
| 193 | && (!(($parent_source = $statements_analyzer->getSource()) |
|
| 194 | instanceof \Psalm\Internal\Analyzer\FunctionLikeAnalyzer) |
|
| 195 | || !$parent_source->getSource() instanceof \Psalm\Internal\Analyzer\TraitAnalyzer) |
|
| 196 | ) { |
|
| 197 | $codebase->analyzer->incrementNonMixedCount($statements_analyzer->getFilePath()); |
|
| 198 | } |
|
| 199 | ||
| 200 | if ($lhs_type->isNull()) { |
|
| 201 | if (IssueBuffer::accepts( |
|