diff --git a/src/Methods/PrivateInFinalClassRule.php b/src/Methods/PrivateInFinalClassRule.php index b552ecbb..26d676f2 100644 --- a/src/Methods/PrivateInFinalClassRule.php +++ b/src/Methods/PrivateInFinalClassRule.php @@ -1,5 +1,3 @@ -attrGroups as $attrGroup) { + foreach($attrGroup->attrs as $attr) { + if (in_array($attr->name->toString(), self::$attributesThatIndicateProtectedIsOk)) { + return []; + } + } + } + $methodName = $node->name->toString(); $parentClass = $containingClass->getNativeReflection()->getParentClass();