From 400ac0f759b356e8bbc4611b37082186ef2e3fef Mon Sep 17 00:00:00 2001 From: Brown Date: Tue, 1 Sep 2020 18:09:30 -0400 Subject: [PATCH] Make reportInfo="false" flag better --- src/Psalm/Config.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Psalm/Config.php b/src/Psalm/Config.php index e00876b9a..5a071d72e 100644 --- a/src/Psalm/Config.php +++ b/src/Psalm/Config.php @@ -1465,6 +1465,10 @@ class Config $reporting_level = $this->getReportingLevelForFile($issue_type, $e->getFilePath()); } + if (!$this->report_info && $reporting_level === self::REPORT_INFO) { + $reporting_level = self::REPORT_SUPPRESS; + } + $parent_issue_type = self::getParentIssueType($issue_type); if ($parent_issue_type && $reporting_level === Config::REPORT_ERROR) { @@ -1593,7 +1597,7 @@ class Config $issue_level = $issue_class::ERROR_LEVEL; if ($issue_level > 0 && $issue_level < $this->level) { - return $this->report_info ? self::REPORT_INFO : self::REPORT_SUPPRESS; + return self::REPORT_INFO; } return self::REPORT_ERROR;