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:
parent
67648ac248
commit
3700ab6c61
@ -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));
|
||||||
|
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user