Skip to content

Commit 2f2394c

Browse files
committed
[DeadCode] Merge comment on RemoveNextSameValueConditionRector
1 parent a72c622 commit 2f2394c

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?php
2+
3+
namespace Rector\Tests\DeadCode\Rector\Stmt\RemoveNextSameValueConditionRector\Fixture;
4+
5+
final class MergeComment
6+
{
7+
public function __construct(array $items)
8+
{
9+
$count = 100;
10+
11+
// 1
12+
if ($items === []) {
13+
$count = 0;
14+
}
15+
16+
// 2
17+
if ($items === []) {
18+
return $count;
19+
}
20+
}
21+
}
22+
23+
?>
24+
-----
25+
<?php
26+
27+
namespace Rector\Tests\DeadCode\Rector\Stmt\RemoveNextSameValueConditionRector\Fixture;
28+
29+
final class MergeComment
30+
{
31+
public function __construct(array $items)
32+
{
33+
$count = 100;
34+
35+
// 1
36+
// 2
37+
if ($items === []) {
38+
$count = 0;
39+
return $count;
40+
}
41+
}
42+
}
43+
44+
?>

0 commit comments

Comments
 (0)