diff --git a/src/Psalm/Report/ByIssueLevelAndTypeReport.php b/src/Psalm/Report/ByIssueLevelAndTypeReport.php index 6b3f66e6de4..d89a3112f34 100644 --- a/src/Psalm/Report/ByIssueLevelAndTypeReport.php +++ b/src/Psalm/Report/ByIssueLevelAndTypeReport.php @@ -44,8 +44,6 @@ public function create(): string HEADING; - ; - foreach ($this->issues_data as $issue_data) { $output .= $this->format($issue_data) . "\n" . "\n"; } @@ -54,7 +52,7 @@ public function create(): string } /** - * Copied from ConsoleReport with only very minor changes. Todo consider reducing code duplication + * Copied from ConsoleReport with only very minor changes. */ private function format(IssueData $issue_data): string { @@ -106,7 +104,7 @@ private function format(IssueData $issue_data): string } /** - * Copied from ConsoleReport unchanged. Todo consider reducing code duplication + * Copied from ConsoleReport unchanged. We could consider moving to another class to reduce duplication. * @param non-empty-list $taint_trace */ private function getTaintSnippets(array $taint_trace): string @@ -141,6 +139,7 @@ private function getTaintSnippets(array $taint_trace): string } /** + * Copied from ConsoleReport unchanged. We could consider moving to another class to reduce duplication. * @param IssueData|DataFlowNodeData $data */ private function getFileReference($data): string @@ -180,7 +179,7 @@ private function getFileReference($data): string private function sortIssuesByLevelAndType(): void { usort($this->issues_data, function (IssueData $left, IssueData $right): int { - + // negative error levels go to the top, followed by large positive levels, with level 1 at the bottom. return [$left->error_level > 0, -$left->error_level, $left->type] <=> [$right->error_level > 0, -$right->error_level, $right->type]; });