Skip to content

Commit

Permalink
More fixture on Do_ maybe returned (#5767)
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Mar 23, 2024
1 parent 879feb8 commit 11ce9fc
Showing 1 changed file with 36 additions and 0 deletions.
@@ -0,0 +1,36 @@
<?php

namespace Rector\Tests\CodeQuality\Rector\ClassMethod\ExplicitReturnNullRector\Fixture;

final class DoWhileMaybeReturned3
{
public function run(int $i)
{
do {
if (rand(0,1)) {
return 1;
}
} while (++$i < 1);
}
}

?>
-----
<?php

namespace Rector\Tests\CodeQuality\Rector\ClassMethod\ExplicitReturnNullRector\Fixture;

final class DoWhileMaybeReturned3
{
public function run(int $i)
{
do {
if (rand(0,1)) {
return 1;
}
} while (++$i < 1);
return null;
}
}

?>

0 comments on commit 11ce9fc

Please sign in to comment.