Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 === '') {
Expand Down Expand Up @@ -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
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function refactor(Node $node): ?Node
continue;
}

if (! $this->nodeNameResolver->isName($classMethod, 'hasChildren')) {
if (! $this->isName($classMethod, 'hasChildren')) {
continue;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ private function shouldSkip(FuncCall $funcCall): bool
return true;
}

return ! $this->nodeNameResolver->isName($funcCall, 'hash');
return ! $this->isName($funcCall, 'hash');
}

/**
Expand Down
Loading