Skip to content
Permalink
Browse files

Ignore PossiblyNullReference on synthetic method calls

  • Loading branch information...
muglug committed May 24, 2019
1 parent 7a48225 commit 569d82641dd2cfd870e948afd320fee4781aa081
@@ -364,11 +364,21 @@ public static function analyzeInstance(
]
);
$suppressed_issues = $statements_analyzer->getSuppressedIssues();
if (!in_array('PossiblyNullReference', $suppressed_issues, true)) {
$statements_analyzer->addSuppressedIssues(['PossiblyNullReference']);
}
\Psalm\Internal\Analyzer\Statements\Expression\Call\MethodCallAnalyzer::analyze(
$statements_analyzer,
$fake_method_call,
$context
);
if (!in_array('PossiblyNullReference', $suppressed_issues, true)) {
$statements_analyzer->removeSuppressedIssues(['PossiblyNullReference']);
}
}
/*
@@ -492,12 +492,22 @@ public static function analyzeInstance(
]
);
$suppressed_issues = $statements_analyzer->getSuppressedIssues();
if (!in_array('PossiblyNullReference', $suppressed_issues, true)) {
$statements_analyzer->addSuppressedIssues(['PossiblyNullReference']);
}
\Psalm\Internal\Analyzer\Statements\Expression\Call\MethodCallAnalyzer::analyze(
$statements_analyzer,
$fake_method_call,
$context
);
if (!in_array('PossiblyNullReference', $suppressed_issues, true)) {
$statements_analyzer->removeSuppressedIssues(['PossiblyNullReference']);
}
$stmt->inferredType = $fake_method_call->inferredType ?? Type::getMixed();
/*

0 comments on commit 569d826

Please sign in to comment.
You can’t perform that action at this time.