From 426c4c68523970dae9738740914738869db6386d Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 2 Nov 2026 17:17:32 +0000 Subject: [PATCH] fix(phpstan): drop the null check that the trait alias lookup can not fail The declaring trait is set together with the original method node, so PHPStan 2.3 reports the second null check as always false and fails the build of 4.x. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01FxhC1DaSZY1jAz2XfyjhPa --- src/Traits/ReflectionClassLikeTrait.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Traits/ReflectionClassLikeTrait.php b/src/Traits/ReflectionClassLikeTrait.php index 335b9e1..31c62ac 100644 --- a/src/Traits/ReflectionClassLikeTrait.php +++ b/src/Traits/ReflectionClassLikeTrait.php @@ -1300,7 +1300,7 @@ private function collectTraitMethods(): array } } - if ($originalMethodNode === null || $declaringTraitName === null) { + if ($originalMethodNode === null) { continue; }