diff --git a/rules/CodingStyle/Rector/ClassMethod/MakeInheritedMethodVisibilitySameAsParentRector.php b/rules/CodingStyle/Rector/ClassMethod/MakeInheritedMethodVisibilitySameAsParentRector.php index a6da3a222a8..a9625da39c5 100644 --- a/rules/CodingStyle/Rector/ClassMethod/MakeInheritedMethodVisibilitySameAsParentRector.php +++ b/rules/CodingStyle/Rector/ClassMethod/MakeInheritedMethodVisibilitySameAsParentRector.php @@ -93,12 +93,18 @@ CODE_SAMPLE return null; } $hasChanged = \false; + $interfaces = $classReflection->getInterfaces(); foreach ($node->getMethods() as $classMethod) { if ($classMethod->isMagic()) { continue; } /** @var string $methodName */ $methodName = $this->getName($classMethod->name); + foreach ($interfaces as $interface) { + if ($interface->hasNativeMethod($methodName)) { + continue 2; + } + } foreach ($parentClassReflections as $parentClassReflection) { $nativeClassReflection = $parentClassReflection->getNativeReflection(); // the class reflection above takes also @method annotations into an account diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 26ea034af26..a7817264f48 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -19,12 +19,12 @@ final class VersionResolver * @api * @var string */ - public const PACKAGE_VERSION = 'bdc09071abc58550a41fdd8a4af515206e022f4c'; + public const PACKAGE_VERSION = 'c0be2b455e4c83c3da737969f40f57dc6a7e6320'; /** * @api * @var string */ - public const RELEASE_DATE = '2024-03-10 16:21:31'; + public const RELEASE_DATE = '2024-03-11 06:48:19'; /** * @var int */