1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-23 06:11:25 +01:00

Fix RedundantConditionGivenDocblockType issues

This commit is contained in:
Alies Lapatsin 2023-05-31 13:11:54 +02:00
parent 67648ac248
commit 3700ab6c61
2 changed files with 7 additions and 8 deletions

View File

@ -1552,14 +1552,14 @@ class Analyzer
$has_info = false; $has_info = false;
foreach ($issues as $issue) { foreach ($issues as $issue) {
if ($issue->severity === IssueData::SEVERITY_ERROR) { switch ($issue->severity) {
case IssueData::SEVERITY_INFO:
$has_info = true;
break;
default:
$has_error = true; $has_error = true;
break; break;
} }
if ($issue->severity === IssueData::SEVERITY_INFO) {
$has_info = true;
}
} }
$this->progress->taskDone($has_error ? 2 : ($has_info ? 1 : 0)); $this->progress->taskDone($has_error ? 2 : ($has_info ? 1 : 0));

View File

@ -731,7 +731,6 @@ class LanguageServer extends Dispatcher
case IssueData::SEVERITY_INFO: case IssueData::SEVERITY_INFO:
$diagnostic_severity = DiagnosticSeverity::WARNING; $diagnostic_severity = DiagnosticSeverity::WARNING;
break; break;
case IssueData::SEVERITY_ERROR:
default: default:
$diagnostic_severity = DiagnosticSeverity::ERROR; $diagnostic_severity = DiagnosticSeverity::ERROR;
break; break;