-
-
Notifications
You must be signed in to change notification settings - Fork 355
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DeadCode] Keep Assign expr on RemoveUnusedVariableAssignRector for i…
…mpure function (#282)
- Loading branch information
1 parent
4f619aa
commit 6162f70
Showing
3 changed files
with
65 additions
and
3 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
...s/DeadCode/Rector/Assign/RemoveUnusedVariableAssignRector/Fixture/on_ob_get_clean.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,49 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\DeadCode\Rector\Assign\RemoveUnusedVariableAssignRector\Fixture; | ||
|
||
final class OnObGetClean | ||
{ | ||
public function run() | ||
{ | ||
echo 'run'; | ||
} | ||
|
||
public function execute() | ||
{ | ||
ob_start(); | ||
|
||
$this->run(); | ||
|
||
$result = ob_get_clean(); | ||
|
||
echo 'done'; | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\DeadCode\Rector\Assign\RemoveUnusedVariableAssignRector\Fixture; | ||
|
||
final class OnObGetClean | ||
{ | ||
public function run() | ||
{ | ||
echo 'run'; | ||
} | ||
|
||
public function execute() | ||
{ | ||
ob_start(); | ||
|
||
$this->run(); | ||
|
||
ob_get_clean(); | ||
|
||
echo 'done'; | ||
} | ||
} | ||
|
||
?> |
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
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