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
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"require-dev": {
"phpstan/extension-installer": "^1.4",
"phpstan/phpstan": "^2.0",
"phpstan/phpstan": "^2.1.8",
"phpstan/phpstan-webmozart-assert": "^2.0",
"phpunit/phpunit": "^11.4",
"rector/rector-src": "dev-main",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,6 @@ private function shouldSkipClass(Class_ $class): bool
return true;
}

return ! $classReflection->isSubclassOf(SymfonyClass::CONTAINER_AWARE_COMMAND);
return ! $classReflection->is(SymfonyClass::CONTAINER_AWARE_COMMAND);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,6 @@ private function shouldSkipClass(Class_ $class): bool
return true;
}

return ! $classReflection->isSubclassOf(SymfonyClass::CONTROLLER);
return ! $classReflection->is(SymfonyClass::CONTROLLER);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,10 @@ private function shouldSkipClass(Class_ $class): bool
return true;
}

if ($classReflection->isSubclassOf(SymfonyClass::CONTAINER_AWARE_COMMAND)) {
if ($classReflection->is(SymfonyClass::CONTAINER_AWARE_COMMAND)) {
return false;
}

return ! $classReflection->isSubclassOf(SymfonyClass::CONTROLLER);
return ! $classReflection->is(SymfonyClass::CONTROLLER);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function refactor(Node $node): ?Node
return null;
}

if (! $classReflection->isSubClassOf('Symfony\Component\Console\Command\Command')) {
if (! $classReflection->is('Symfony\Component\Console\Command\Command')) {
return null;
}

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

$classReflection = $scope->getClassReflection();
if (! $classReflection->isSubclassOf('Symfony\Contracts\EventDispatcher\EventDispatcherInterface')) {
if (! $classReflection->is('Symfony\Contracts\EventDispatcher\EventDispatcherInterface')) {
return null;
}

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

if (! $classReflection->isSubclassOf('Symfony\Component\Console\Command\Command')) {
if (! $classReflection->is('Symfony\Component\Console\Command\Command')) {
return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function refactor(Node $node): ?Node
if (! $classReflection instanceof ClassReflection) {
return null;
}
if (! $classReflection->isSubclassOf('Symfony\Component\Validator\Constraint')) {
if (! $classReflection->is('Symfony\Component\Validator\Constraint')) {
return null;
}
if (! $this->nodeNameResolver->isName($node->name, 'errorNames')) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ private function shouldSkip(ClassMethod $classMethod): bool
return true;
}

if (! $classReflection->isSubclassOf('Twig_Extension')) {
if (! $classReflection->is('Twig_Extension')) {
return true;
}

Expand Down
4 changes: 2 additions & 2 deletions src/NodeAnalyzer/SymfonyTestCaseAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function isInWebTestCase(Node $node): bool
return false;
}

return $classReflection->isSubclassOf('Symfony\Bundle\FrameworkBundle\Test\WebTestCase');
return $classReflection->is('Symfony\Bundle\FrameworkBundle\Test\WebTestCase');
}

/**
Expand All @@ -35,6 +35,6 @@ public function isInKernelTestCase(Node $node): bool
return false;
}

return $classReflection->isSubclassOf('Symfony\Bundle\FrameworkBundle\Test\KernelTestCase');
return $classReflection->is('Symfony\Bundle\FrameworkBundle\Test\KernelTestCase');
}
}
4 changes: 2 additions & 2 deletions src/TypeAnalyzer/ControllerAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ public function isInsideController(Node $node): bool

private function isControllerClassReflection(ClassReflection $classReflection): bool
{
if ($classReflection->isSubclassOf('Symfony\Bundle\FrameworkBundle\Controller\Controller')) {
if ($classReflection->is('Symfony\Bundle\FrameworkBundle\Controller\Controller')) {
return true;
}

return $classReflection->isSubclassOf('Symfony\Bundle\FrameworkBundle\Controller\AbstractController');
return $classReflection->is('Symfony\Bundle\FrameworkBundle\Controller\AbstractController');
}

private function isControllerClass(Class_ $class): bool
Expand Down
Loading