From f102a0e0829d4d8fb5b26ad3e4306aa495371f83 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Tue, 13 Jan 2026 10:57:49 +0100 Subject: [PATCH 1/2] Error: Don't persist redundant filePath value --- src/Analyser/Error.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Analyser/Error.php b/src/Analyser/Error.php index 9af5f2b297..03f344250c 100644 --- a/src/Analyser/Error.php +++ b/src/Analyser/Error.php @@ -45,6 +45,10 @@ public function __construct( if ($this->identifier !== null && !self::validateIdentifier($this->identifier)) { throw new ShouldNotHappenException(sprintf('Invalid identifier: %s', $this->identifier)); } + + if ($file === $filePath) { + $this->filePath = null; + } } public function getMessage(): string From 533062678f9b078bcdf8bd258564c425b5280325 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Tue, 13 Jan 2026 11:04:42 +0100 Subject: [PATCH 2/2] cs --- src/Analyser/Error.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Analyser/Error.php b/src/Analyser/Error.php index 03f344250c..5d175a4176 100644 --- a/src/Analyser/Error.php +++ b/src/Analyser/Error.php @@ -46,9 +46,11 @@ public function __construct( throw new ShouldNotHappenException(sprintf('Invalid identifier: %s', $this->identifier)); } - if ($file === $filePath) { - $this->filePath = null; + if ($file !== $filePath) { + return; } + + $this->filePath = null; } public function getMessage(): string