diff --git a/rules-tests/TypeDeclaration/Rector/ClassMethod/ReturnUnionTypeRector/Fixture/skip_while_maybe_returned.php.inc b/rules-tests/TypeDeclaration/Rector/ClassMethod/ReturnUnionTypeRector/Fixture/skip_while_maybe_returned.php.inc new file mode 100644 index 00000000000..f2e9351dc95 --- /dev/null +++ b/rules-tests/TypeDeclaration/Rector/ClassMethod/ReturnUnionTypeRector/Fixture/skip_while_maybe_returned.php.inc @@ -0,0 +1,17 @@ +isFoundLoopControl($stmt);; + return $stmt instanceof Do_ && ! $this->isFoundLoopControl($stmt);; } private function isIfReturn(Stmt|Expr $stmt): bool