Skip to content

Commit 88161f3

Browse files
authored
Fix hook node type check to Class_ (#664)
1 parent d7cc42e commit 88161f3

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

rules/CodeQuality/Rector/ClassMethod/ResponseReturnTypeControllerActionRector.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
use PhpParser\Node\Expr\Variable;
1212
use PhpParser\Node\Identifier;
1313
use PhpParser\Node\Name\FullyQualified;
14-
use PhpParser\Node\NullableType;
1514
use PhpParser\Node\Stmt\ClassMethod;
1615
use PhpParser\Node\Stmt\Return_;
1716
use PHPStan\Type\ObjectType;

rules/Symfony30/Rector/ClassMethod/FormTypeGetParentRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ private function isClassAndMethodMatch(Class_ $class, ClassMethod $classMethod):
139139
}
140140

141141
if ($this->isName($classMethod->name, 'getExtendedType')) {
142-
return $this->isObjectType($classMethod, new ObjectType('Symfony\Component\Form\AbstractTypeExtension'));
142+
return $this->isObjectType($class, new ObjectType('Symfony\Component\Form\AbstractTypeExtension'));
143143
}
144144

145145
return false;

0 commit comments

Comments
 (0)