From 7b2c8e2d071e698b48f8eae1f6de8136a3886182 Mon Sep 17 00:00:00 2001 From: stanoMilan <35031880+stanoMilan@users.noreply.github.com> Date: Wed, 28 Aug 2024 12:47:28 +0200 Subject: [PATCH] [framework] Annotations fixer access of nullable does not break fixer (#3357) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Milan Staňo --- src/Component/ClassExtension/MethodAnnotationsFactory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Component/ClassExtension/MethodAnnotationsFactory.php b/src/Component/ClassExtension/MethodAnnotationsFactory.php index eceb53bb2d..adfaaf6de5 100644 --- a/src/Component/ClassExtension/MethodAnnotationsFactory.php +++ b/src/Component/ClassExtension/MethodAnnotationsFactory.php @@ -129,7 +129,7 @@ protected function isMethodImplementedInClass(string $methodName, ReflectionClas try { $reflectionMethod = $reflectionClass->getMethod($methodName); - return $reflectionMethod->getDeclaringClass()->getName() === $reflectionClass->getName(); + return $reflectionMethod?->getDeclaringClass()->getName() === $reflectionClass->getName(); } catch (OutOfBoundsException $ex) { return false; }