mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 12:55:26 +01:00
Exit early if a bad class is detected
This commit is contained in:
parent
d1807cfb95
commit
439a1ddc97
@ -101,12 +101,15 @@ class SwitchChecker
|
||||
$file_checker = $statements_checker->getFileChecker();
|
||||
|
||||
if ($type_type instanceof Type\Atomic\GetClassT) {
|
||||
ClassLikeChecker::checkFullyQualifiedClassLikeName(
|
||||
$file_checker->project_checker,
|
||||
$fq_classlike_name,
|
||||
new CodeLocation($file_checker, $case->cond),
|
||||
$statements_checker->getSuppressedIssues()
|
||||
);
|
||||
if (ClassLikeChecker::checkFullyQualifiedClassLikeName(
|
||||
$file_checker->project_checker,
|
||||
$fq_classlike_name,
|
||||
new CodeLocation($file_checker, $case->cond),
|
||||
$statements_checker->getSuppressedIssues()
|
||||
) === false
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
} elseif (!isset(ClassLikeChecker::$GETTYPE_TYPES[$fq_classlike_name])) {
|
||||
if (IssueBuffer::accepts(
|
||||
new UnevaluatedCode(
|
||||
|
Loading…
Reference in New Issue
Block a user