Skip to content

Commit 4d32bd8

Browse files
committed
cleanup stmts aware and file node
1 parent c203a83 commit 4d32bd8

4 files changed

Lines changed: 12 additions & 7 deletions

File tree

config/sets/symfony/symfony-code-quality.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
use Rector\Symfony\CodeQuality\Rector\ClassMethod\ParamTypeFromRouteRequiredRegexRector;
1616
use Rector\Symfony\CodeQuality\Rector\ClassMethod\RemoveUnusedRequestParamRector;
1717
use Rector\Symfony\CodeQuality\Rector\ClassMethod\ResponseReturnTypeControllerActionRector;
18-
use Rector\Symfony\CodeQuality\Rector\ClassMethod\ReturnDirectJsonResponseRector;
1918
use Rector\Symfony\CodeQuality\Rector\MethodCall\AssertSameResponseCodeWithDebugContentsRector;
2019
use Rector\Symfony\CodeQuality\Rector\MethodCall\LiteralGetToRequestClassConstantRector;
2120
use Rector\Symfony\CodeQuality\Rector\MethodCall\ParameterBagTypedGetMethodCallRector;

phpstan.neon

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ parameters:
7474

7575
# in tests
7676
-
77-
message: '#Fetching deprecated class constant SYMFONY_\d+ of class Rector\\Symfony\\Set\\SymfonySetList#'
78-
path: tests
77+
message: '#Fetching deprecated class constant SYMFONY_(.*?) of class Rector\\Symfony\\Set\\SymfonySetList#'
78+
paths:
79+
- tests
80+
- config/sets/symfony/annotations-to-attributes.php
7981

rules/CodeQuality/Rector/ClassMethod/TemplateAnnotationToThisRenderRector.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory;
2828
use Rector\BetterPhpDocParser\PhpDocManipulator\PhpDocTagRemover;
2929
use Rector\Comments\NodeDocBlock\DocBlockUpdater;
30-
use Rector\Contract\PhpParser\Node\StmtsAwareInterface;
3130
use Rector\Doctrine\NodeAnalyzer\AttrinationFinder;
3231
use Rector\PhpParser\Node\BetterNodeFinder;
3332
use Rector\Rector\AbstractRector;
@@ -363,8 +362,11 @@ private function removeDoctrineAnnotationTagValueNode(
363362
}
364363
}
365364

365+
/**
366+
* @param StmtsAware $stmtsAware
367+
*/
366368
private function refactorStmtsAwareNode(
367-
StmtsAwareInterface $stmtsAware,
369+
Node $stmtsAware,
368370
DoctrineAnnotationTagValueNode | Attribute $templateTagValueNodeOrAttribute,
369371
bool $hasThisRenderOrReturnsResponse,
370372
ClassMethod $classMethod

rules/Symfony42/Rector/New_/RootNodeTreeBuilderRector.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
use PhpParser\Node\Scalar\String_;
1313
use PhpParser\Node\Stmt\Expression;
1414
use PHPStan\Type\ObjectType;
15-
use Rector\Contract\PhpParser\Node\StmtsAwareInterface;
1615
use Rector\PhpParser\Enum\NodeGroup;
1716
use Rector\PhpParser\Node\BetterNodeFinder;
1817
use Rector\Rector\AbstractRector;
@@ -123,7 +122,10 @@ public function refactor(Node $node): ?Node
123122
return null;
124123
}
125124

126-
private function getRootMethodCallNode(StmtsAwareInterface $stmtsAware): ?Node
125+
/**
126+
* @param StmtsAware $stmtsAware
127+
*/
128+
private function getRootMethodCallNode(Node $stmtsAware): ?Node
127129
{
128130
$methodCalls = $this->betterNodeFinder->findInstanceOf($stmtsAware, MethodCall::class);
129131

0 commit comments

Comments
 (0)