Skip to content

Commit e592082

Browse files
committed
add any expr fixture
1 parent 62fac42 commit e592082

3 files changed

Lines changed: 32 additions & 1 deletion

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
3+
namespace Rector\Tests\DeadCode\Rector\Stmt\RemoveConditionExactReturnRector\Fixture;
4+
5+
final class AnyExprCompare
6+
{
7+
public function run(array $result)
8+
{
9+
if ($result == 999) {
10+
return 999;
11+
}
12+
13+
return $result;
14+
}
15+
}
16+
17+
?>
18+
-----
19+
<?php
20+
21+
namespace Rector\Tests\DeadCode\Rector\Stmt\RemoveConditionExactReturnRector\Fixture;
22+
23+
final class AnyExprCompare
24+
{
25+
public function run(array $result)
26+
{
27+
return $result;
28+
}
29+
}
30+
31+
?>

rules-tests/DeadCode/Rector/Stmt/RemoveConditionExactReturnRector/RemoveEmptyArrayConditionReturnRectorTest.php renamed to rules-tests/DeadCode/Rector/Stmt/RemoveConditionExactReturnRector/RemoveConditionExactReturnRectorTest.php

File renamed without changes.

rules/DeadCode/Rector/Stmt/RemoveConditionExactReturnRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
1818

1919
/**
20-
* @see \Rector\Tests\DeadCode\Rector\Stmt\RemoveEmptyArrayConditionReturnRector\RemoveEmptyArrayConditionReturnRectorTest
20+
* @see \Rector\Tests\DeadCode\Rector\Stmt\RemoveConditionExactReturnRector\RemoveConditionExactReturnRectorTest
2121
*/
2222
final class RemoveConditionExactReturnRector extends AbstractRector
2323
{

0 commit comments

Comments
 (0)