Skip to content

Commit 7842149

Browse files
committed
[dead-code] Add RemoveEmptyArrayConditionReturnRector
1 parent d219eed commit 7842149

23 files changed

Lines changed: 276 additions & 59 deletions

rules-tests/DeadCode/Rector/Stmt/RemoveDeadStmtRector/Fixture/binary_op.php.inc renamed to rules-tests/DeadCode/Rector/Expression/RemoveDeadStmtRector/Fixture/binary_op.php.inc

File renamed without changes.

rules-tests/DeadCode/Rector/Stmt/RemoveDeadStmtRector/Fixture/cast.php.inc renamed to rules-tests/DeadCode/Rector/Expression/RemoveDeadStmtRector/Fixture/cast.php.inc

File renamed without changes.

rules-tests/DeadCode/Rector/Stmt/RemoveDeadStmtRector/Fixture/class_constant_fetch.php.inc renamed to rules-tests/DeadCode/Rector/Expression/RemoveDeadStmtRector/Fixture/class_constant_fetch.php.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Rector\Tests\DeadCode\Rector\Stmt\RemoveDeadStmtRector\Fixture;
3+
namespace Rector\Tests\DeadCode\Rector\Expression\RemoveDeadStmtRector\Fixture;
44

55
function wrapToPreventPhpStanCallingMethods ()
66
{
@@ -14,7 +14,7 @@ function wrapToPreventPhpStanCallingMethods ()
1414
-----
1515
<?php
1616

17-
namespace Rector\Tests\DeadCode\Rector\Stmt\RemoveDeadStmtRector\Fixture;
17+
namespace Rector\Tests\DeadCode\Rector\Expression\RemoveDeadStmtRector\Fixture;
1818

1919
function wrapToPreventPhpStanCallingMethods ()
2020
{

rules-tests/DeadCode/Rector/Stmt/RemoveDeadStmtRector/Fixture/clone.php.inc renamed to rules-tests/DeadCode/Rector/Expression/RemoveDeadStmtRector/Fixture/clone.php.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Rector\Tests\DeadCode\Rector\Stmt\RemoveDeadStmtRector\Fixture;
3+
namespace Rector\Tests\DeadCode\Rector\Expression\RemoveDeadStmtRector\Fixture;
44

55
function wrapToPreventPhpStanCallingMethods ($object)
66
{
@@ -11,7 +11,7 @@ function wrapToPreventPhpStanCallingMethods ($object)
1111
-----
1212
<?php
1313

14-
namespace Rector\Tests\DeadCode\Rector\Stmt\RemoveDeadStmtRector\Fixture;
14+
namespace Rector\Tests\DeadCode\Rector\Expression\RemoveDeadStmtRector\Fixture;
1515

1616
function wrapToPreventPhpStanCallingMethods ($object)
1717
{

rules-tests/DeadCode/Rector/Stmt/RemoveDeadStmtRector/Fixture/closure.php.inc renamed to rules-tests/DeadCode/Rector/Expression/RemoveDeadStmtRector/Fixture/closure.php.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Rector\Tests\DeadCode\Rector\Stmt\RemoveDeadStmtRector\Fixture;
3+
namespace Rector\Tests\DeadCode\Rector\Expression\RemoveDeadStmtRector\Fixture;
44

55
function wrapToPreventPhpStanCallingMethods ()
66
{
@@ -11,7 +11,7 @@ function wrapToPreventPhpStanCallingMethods ()
1111
-----
1212
<?php
1313

14-
namespace Rector\Tests\DeadCode\Rector\Stmt\RemoveDeadStmtRector\Fixture;
14+
namespace Rector\Tests\DeadCode\Rector\Expression\RemoveDeadStmtRector\Fixture;
1515

1616
function wrapToPreventPhpStanCallingMethods ()
1717
{

rules-tests/DeadCode/Rector/Stmt/RemoveDeadStmtRector/Fixture/constant_fetch.php.inc renamed to rules-tests/DeadCode/Rector/Expression/RemoveDeadStmtRector/Fixture/constant_fetch.php.inc

File renamed without changes.

rules-tests/DeadCode/Rector/Stmt/RemoveDeadStmtRector/Fixture/instanceOf.php.inc renamed to rules-tests/DeadCode/Rector/Expression/RemoveDeadStmtRector/Fixture/instanceOf.php.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Rector\Tests\DeadCode\Rector\Stmt\RemoveDeadStmtRector\Fixture;
3+
namespace Rector\Tests\DeadCode\Rector\Expression\RemoveDeadStmtRector\Fixture;
44

55
function wrapToPreventPhpStanCallingMethods ()
66
{
@@ -15,7 +15,7 @@ function wrapToPreventPhpStanCallingMethods ()
1515
-----
1616
<?php
1717

18-
namespace Rector\Tests\DeadCode\Rector\Stmt\RemoveDeadStmtRector\Fixture;
18+
namespace Rector\Tests\DeadCode\Rector\Expression\RemoveDeadStmtRector\Fixture;
1919

2020
function wrapToPreventPhpStanCallingMethods ()
2121
{

rules-tests/DeadCode/Rector/Stmt/RemoveDeadStmtRector/Fixture/isset.php.inc renamed to rules-tests/DeadCode/Rector/Expression/RemoveDeadStmtRector/Fixture/isset.php.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Rector\Tests\DeadCode\Rector\Stmt\RemoveDeadStmtRector\Fixture;
3+
namespace Rector\Tests\DeadCode\Rector\Expression\RemoveDeadStmtRector\Fixture;
44

55
function wrapToPreventPhpStanCallingMethods ($object)
66
{
@@ -15,7 +15,7 @@ function wrapToPreventPhpStanCallingMethods ($object)
1515
-----
1616
<?php
1717

18-
namespace Rector\Tests\DeadCode\Rector\Stmt\RemoveDeadStmtRector\Fixture;
18+
namespace Rector\Tests\DeadCode\Rector\Expression\RemoveDeadStmtRector\Fixture;
1919

2020
function wrapToPreventPhpStanCallingMethods ($object)
2121
{

rules-tests/DeadCode/Rector/Stmt/RemoveDeadStmtRector/Fixture/scalar.php.inc renamed to rules-tests/DeadCode/Rector/Expression/RemoveDeadStmtRector/Fixture/scalar.php.inc

File renamed without changes.

rules-tests/DeadCode/Rector/Stmt/RemoveDeadStmtRector/Fixture/static_property_fetch.php.inc renamed to rules-tests/DeadCode/Rector/Expression/RemoveDeadStmtRector/Fixture/static_property_fetch.php.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Rector\Tests\DeadCode\Rector\Stmt\RemoveDeadStmtRector\Fixture;
3+
namespace Rector\Tests\DeadCode\Rector\Expression\RemoveDeadStmtRector\Fixture;
44

55
function wrapToPreventPhpStanCallingMethods ()
66
{
@@ -16,7 +16,7 @@ function wrapToPreventPhpStanCallingMethods ()
1616
-----
1717
<?php
1818

19-
namespace Rector\Tests\DeadCode\Rector\Stmt\RemoveDeadStmtRector\Fixture;
19+
namespace Rector\Tests\DeadCode\Rector\Expression\RemoveDeadStmtRector\Fixture;
2020

2121
function wrapToPreventPhpStanCallingMethods ()
2222
{

0 commit comments

Comments
 (0)