Skip to content

Commit

Permalink
Fix: Rename methods
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Jan 7, 2025
1 parent 6de6bb3 commit 7a44776
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/Methods/PrivateInFinalClassRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,21 +77,21 @@ public function processNode(
return [];
}

if ($this->methodHasWhitelistedAnnotation($node, $containingClass)) {
if ($this->hasWhitelistedAnnotation($node, $containingClass)) {
return [];
}

if (self::methodHasWhitelistedAttribute($node)) {
if (self::hasWhitelistedAttribute($node)) {
return [];
}

$methodName = $node->name->toString();

if (self::methodIsDeclaredByParentClass($containingClass, $methodName)) {
if (self::isDeclaredByParentClass($containingClass, $methodName)) {
return [];
}

if (self::methodIsDeclaredByTrait($containingClass, $methodName)) {
if (self::isDeclaredByTrait($containingClass, $methodName)) {
return [];
}

Expand Down Expand Up @@ -124,7 +124,7 @@ public function processNode(
];
}

private function methodHasWhitelistedAnnotation(
private function hasWhitelistedAnnotation(
Node\Stmt\ClassMethod $node,
Reflection\ClassReflection $containingClass
): bool {
Expand Down Expand Up @@ -153,7 +153,7 @@ private function methodHasWhitelistedAnnotation(
return false;
}

private static function methodHasWhitelistedAttribute(Node\Stmt\ClassMethod $node): bool
private static function hasWhitelistedAttribute(Node\Stmt\ClassMethod $node): bool
{
foreach ($node->attrGroups as $attributeGroup) {
foreach ($attributeGroup->attrs as $attribute) {
Expand All @@ -166,7 +166,7 @@ private static function methodHasWhitelistedAttribute(Node\Stmt\ClassMethod $nod
return false;
}

private static function methodIsDeclaredByParentClass(
private static function isDeclaredByParentClass(
Reflection\ClassReflection $containingClass,
string $methodName
): bool {
Expand All @@ -183,7 +183,7 @@ private static function methodIsDeclaredByParentClass(
return true;
}

private static function methodIsDeclaredByTrait(
private static function isDeclaredByTrait(
Reflection\ClassReflection $containingClass,
string $methodName
): bool {
Expand Down

0 comments on commit 7a44776

Please sign in to comment.