mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-24 03:35:01 +01:00
add else case
This commit is contained in:
parent
6a8aa9b017
commit
5995db8262
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\DeadCode\Tests\Rector\If_\RemoveUnusedNonEmptyArrayBeforeForeachRector\Fixture;
|
||||
|
||||
class KeepIfElse
|
||||
{
|
||||
public function run()
|
||||
{
|
||||
$values = [];
|
||||
if ($values !== []) {
|
||||
foreach ($values as $value) {
|
||||
echo $value;
|
||||
}
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user