-
-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RemoveUnusedNonEmptyArrayBeforeForeachRector: ignore phpdoc types (#5169
) * RemoveUnusedNonEmptyArrayBeforeForeachRector: ignore phpdoc types * Update property_foreach.php.inc * Update property_foreach.php.inc * fix
- Loading branch information
Showing
3 changed files
with
28 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
...ptyArrayBeforeForeachRector/Fixture/skip_if_non_empty_and_bigger_than_zero_phpdoc.php.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\DeadCode\Rector\If_\RemoveUnusedNonEmptyArrayBeforeForeachRector\Fixture; | ||
|
||
final class SkipIfNonEmptyAndBiggerThanZeroPhpdoc | ||
{ | ||
/** | ||
* @param array $items | ||
*/ | ||
public function run($items) | ||
{ | ||
if ($items && count($items) > 0) { | ||
foreach ($items as $item) { | ||
echo $item; | ||
} | ||
} | ||
} | ||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters