diff --git a/rules/DowngradePhp73/Rector/FuncCall/DowngradeArrayKeyFirstLastRector.php b/rules/DowngradePhp73/Rector/FuncCall/DowngradeArrayKeyFirstLastRector.php index afd9f84c..5444dcca 100644 --- a/rules/DowngradePhp73/Rector/FuncCall/DowngradeArrayKeyFirstLastRector.php +++ b/rules/DowngradePhp73/Rector/FuncCall/DowngradeArrayKeyFirstLastRector.php @@ -126,9 +126,9 @@ private function resolveVariableFromCallLikeScope(CallLike $callLike, ?Scope $sc { /** @var MethodCall|FuncCall|StaticCall|New_|NullsafeMethodCall $callLike */ if ($callLike instanceof New_) { - $variableName = (string) $this->nodeNameResolver->getName($callLike->class); + $variableName = (string) $this->getName($callLike->class); } else { - $variableName = (string) $this->nodeNameResolver->getName($callLike->name); + $variableName = (string) $this->getName($callLike->name); } if ($variableName === '') { @@ -253,7 +253,7 @@ private function resolveCastedArray(Expr $expr): Expr|Variable $scope = $expr->getAttribute(AttributeKey::SCOPE); $variableName = $this->variableNaming->createCountedValueName( - (string) $this->nodeNameResolver->getName($expr->expr), + (string) $this->getName($expr->expr), $scope ); diff --git a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeRecursiveDirectoryIteratorHasChildrenRector.php b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeRecursiveDirectoryIteratorHasChildrenRector.php index 046f8091..cfee1725 100644 --- a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeRecursiveDirectoryIteratorHasChildrenRector.php +++ b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeRecursiveDirectoryIteratorHasChildrenRector.php @@ -73,7 +73,7 @@ public function refactor(Node $node): ?Node continue; } - if (! $this->nodeNameResolver->isName($classMethod, 'hasChildren')) { + if (! $this->isName($classMethod, 'hasChildren')) { continue; } diff --git a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeStringReturnTypeOnToStringRector.php b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeStringReturnTypeOnToStringRector.php index 206dea4e..0b409a69 100644 --- a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeStringReturnTypeOnToStringRector.php +++ b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeStringReturnTypeOnToStringRector.php @@ -99,7 +99,7 @@ private function shouldSkip(ClassMethod $classMethod): bool return true; } - if (! $this->nodeNameResolver->isName($classMethod, '__toString')) { + if (! $this->isName($classMethod, '__toString')) { return true; } diff --git a/rules/DowngradePhp80/Rector/FuncCall/DowngradeNumberFormatNoFourthArgRector.php b/rules/DowngradePhp80/Rector/FuncCall/DowngradeNumberFormatNoFourthArgRector.php index a1009fe2..12de9cef 100644 --- a/rules/DowngradePhp80/Rector/FuncCall/DowngradeNumberFormatNoFourthArgRector.php +++ b/rules/DowngradePhp80/Rector/FuncCall/DowngradeNumberFormatNoFourthArgRector.php @@ -81,7 +81,7 @@ public function refactor(Node $node): ?Node private function shouldSkip(FuncCall $funcCall): bool { - if (! $this->nodeNameResolver->isName($funcCall, 'number_format')) { + if (! $this->isName($funcCall, 'number_format')) { return true; } diff --git a/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionClassGetConstantsFilterRector.php b/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionClassGetConstantsFilterRector.php index ebb09f5e..ed331eb1 100644 --- a/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionClassGetConstantsFilterRector.php +++ b/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionClassGetConstantsFilterRector.php @@ -238,12 +238,12 @@ private function shouldSkipClassConstFetch(ClassConstFetch $classConstFetch): bo } $constants = array_keys(self::MAP_CONSTANT_TO_METHOD); - return ! $this->nodeNameResolver->isNames($classConstFetch->name, $constants); + return ! $this->isNames($classConstFetch->name, $constants); } private function shouldSkipMethodCall(MethodCall $methodCall): bool { - if (! $this->nodeNameResolver->isName($methodCall->name, 'getConstants')) { + if (! $this->isName($methodCall->name, 'getConstants')) { return true; } diff --git a/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionPropertyGetDefaultValueRector.php b/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionPropertyGetDefaultValueRector.php index a8a34c3b..b7b35f76 100644 --- a/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionPropertyGetDefaultValueRector.php +++ b/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionPropertyGetDefaultValueRector.php @@ -59,7 +59,7 @@ public function getNodeTypes(): array */ public function refactor(Node $node): ?Node { - if (! $this->nodeNameResolver->isName($node->name, 'getDefaultValue')) { + if (! $this->isName($node->name, 'getDefaultValue')) { return null; } diff --git a/rules/DowngradePhp81/Rector/FuncCall/DowngradeArrayIsListRector.php b/rules/DowngradePhp81/Rector/FuncCall/DowngradeArrayIsListRector.php index 95a6ee10..d81b0953 100644 --- a/rules/DowngradePhp81/Rector/FuncCall/DowngradeArrayIsListRector.php +++ b/rules/DowngradePhp81/Rector/FuncCall/DowngradeArrayIsListRector.php @@ -140,7 +140,7 @@ private function shouldSkip(CallLike $callLike): bool return false; } - if (! $this->nodeNameResolver->isName($callLike, 'array_is_list')) { + if (! $this->isName($callLike, 'array_is_list')) { return true; } diff --git a/rules/DowngradePhp81/Rector/FuncCall/DowngradeHashAlgorithmXxHashRector.php b/rules/DowngradePhp81/Rector/FuncCall/DowngradeHashAlgorithmXxHashRector.php index 0b424621..ed1d9371 100644 --- a/rules/DowngradePhp81/Rector/FuncCall/DowngradeHashAlgorithmXxHashRector.php +++ b/rules/DowngradePhp81/Rector/FuncCall/DowngradeHashAlgorithmXxHashRector.php @@ -108,7 +108,7 @@ private function shouldSkip(FuncCall $funcCall): bool return true; } - return ! $this->nodeNameResolver->isName($funcCall, 'hash'); + return ! $this->isName($funcCall, 'hash'); } /**