From c2f1b3b70015ee466e3e2e88dbd64d4f79ce7680 Mon Sep 17 00:00:00 2001 From: Matthew Brown Date: Wed, 29 Jan 2020 09:00:13 -0500 Subject: [PATCH] Use slightly cleaner way of sorting file issues --- src/Psalm/IssueBuffer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Psalm/IssueBuffer.php b/src/Psalm/IssueBuffer.php index 64eb88778..afa0b8b59 100644 --- a/src/Psalm/IssueBuffer.php +++ b/src/Psalm/IssueBuffer.php @@ -424,7 +424,7 @@ class IssueBuffer if (self::$issues_data) { \ksort(self::$issues_data); - foreach (self::$issues_data as &$file_issues) { + foreach (self::$issues_data as $file_path => $file_issues) { usort( $file_issues, /** @@ -447,7 +447,7 @@ class IssueBuffer return $d1['file_path'] > $d2['file_path'] ? 1 : -1; } ); - unset($file_issues); + self::$issues_data[$file_path] = $file_issues; } if (!empty($issue_baseline)) {