Skip to content

Commit 96079e3

Browse files
committed
fix CS
1 parent c60b407 commit 96079e3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

rules/CodeQuality/Rector/Class_/YieldDataProviderRector.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace Rector\PHPUnit\CodeQuality\Rector\Class_;
66

7+
use PhpParser\Node\Stmt\Expression;
78
use PhpParser\Node;
89
use PhpParser\Node\Expr\Array_;
910
use PhpParser\Node\Expr\YieldFrom;
@@ -127,7 +128,7 @@ private function collectReturnArrayNodesFromClassMethod(ClassMethod $classMethod
127128
}
128129

129130
foreach ($classMethod->stmts as $statement) {
130-
if ($statement instanceof Node\Stmt\Expression) {
131+
if ($statement instanceof Expression) {
131132
$statement = $statement->expr;
132133
}
133134

@@ -155,7 +156,7 @@ private function transformArrayToYieldsOnMethodNode(ClassMethod $classMethod, Ar
155156

156157
$commentReturn = [];
157158
foreach ((array) $classMethod->stmts as $key => $classMethodStmt) {
158-
if ($classMethodStmt instanceof Node\Stmt\Expression) {
159+
if ($classMethodStmt instanceof Expression) {
159160
$classMethodStmt = $classMethodStmt->expr;
160161
}
161162

0 commit comments

Comments
 (0)