Skip to content

Commit bd6a585

Browse files
committed
[DeadCode] Skip native function with side effect on RemoveConditionExactReturnRector
1 parent c2fc84d commit bd6a585

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
namespace Rector\Tests\DeadCode\Rector\Stmt\RemoveConditionExactReturnRector\Fixture;
4+
5+
final class SkipSideEffectNativeFunction
6+
{
7+
public function run($result)
8+
{
9+
if ($result === array_push($result, 100)) {
10+
return array_push($result, 100);
11+
}
12+
13+
return $result;
14+
}
15+
}

0 commit comments

Comments
 (0)