Skip to content

Commit 64fc9e9

Browse files
committed
tidy up
1 parent 052e527 commit 64fc9e9

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

src/Rules/Symfony/RequireInvokableControllerRule.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,7 @@ public function getNodeType(): string
3838
*/
3939
public function processNode(Node $node, Scope $scope): array
4040
{
41-
$classReflection = $node->getClassReflection();
42-
if (
43-
! $classReflection->isSubclassOf(SymfonyClass::ABSTRACT_CONTROLLER) &&
44-
! $classReflection->isSubclassOf(SymfonyClass::CONTROLLER)
45-
) {
41+
if (! SymfonyControllerAnalyzer::isControllerScope($scope)) {
4642
return [];
4743
}
4844

tests/Rules/Symfony/RequireInvokableControllerRule/RequireInvokableControllerRuleTest.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,8 @@ public static function provideData(): Iterator
3333
]];
3434
}
3535

36-
/**
37-
* @return string[]
38-
*/
39-
public static function getAdditionalConfigFiles(): array
40-
{
41-
return [__DIR__ . '/config/configured_rule.neon'];
42-
}
43-
4436
protected function getRule(): Rule
4537
{
46-
return self::getContainer()->getByType(RequireInvokableControllerRule::class);
38+
return new RequireInvokableControllerRule();
4739
}
4840
}

0 commit comments

Comments
 (0)