Skip to content

Commit 8f390b1

Browse files
committed
apply rector
1 parent 757db77 commit 8f390b1

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

rules/CodeQuality/Rector/ClassMethod/ReturnDirectJsonResponseRector.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,11 @@ public function refactor(Node $node): ?Node
101101
}
102102
}
103103

104-
if ($setDataPosition === null) {
105-
if ($jsonResponseVariable instanceof Variable) {
106-
$setDataExpr = $this->matchSetDataMethodCallExpr($stmt, $jsonResponseVariable);
107-
if ($setDataExpr instanceof Expr) {
108-
$setDataPosition = $key;
109-
continue;
110-
}
104+
if ($setDataPosition === null && $jsonResponseVariable instanceof Variable) {
105+
$setDataExpr = $this->matchSetDataMethodCallExpr($stmt, $jsonResponseVariable);
106+
if ($setDataExpr instanceof Expr) {
107+
$setDataPosition = $key;
108+
continue;
111109
}
112110
}
113111

rules/Symfony43/Rector/StmtsAwareInterface/TwigBundleFilesystemLoaderToTwigRector.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
use PhpParser\Node\Name\FullyQualified;
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\Rector\AbstractRector;
1817
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
@@ -92,7 +91,10 @@ public function refactor(Node $node): ?Node
9291
return $node;
9392
}
9493

95-
private function resolveFileSystemLoaderNew(StmtsAwareInterface $stmtsAware): ?New_
94+
/**
95+
* @param StmtsAware $stmtsAware
96+
*/
97+
private function resolveFileSystemLoaderNew(Node $stmtsAware): ?New_
9698
{
9799
foreach ((array) $stmtsAware->stmts as $stmt) {
98100
if (! $stmt instanceof Expression) {

0 commit comments

Comments
 (0)