diff --git a/rules-tests/CodeQuality/Rector/ClassMethod/ExplicitReturnNullRector/Fixture/skip_do_while_always_returned.php.inc b/rules-tests/CodeQuality/Rector/ClassMethod/ExplicitReturnNullRector/Fixture/skip_do_while_always_returned.php.inc new file mode 100644 index 00000000000..78efe8c22ea --- /dev/null +++ b/rules-tests/CodeQuality/Rector/ClassMethod/ExplicitReturnNullRector/Fixture/skip_do_while_always_returned.php.inc @@ -0,0 +1,17 @@ +isIfReturn($stmt)) { return true; } + + if ($stmt instanceof Do_ && $this->hasStmtsAlwaysReturnOrExit($stmt->stmts)) { + return true; + } } return false;