-
-
Notifications
You must be signed in to change notification settings - Fork 337
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Printer][EarlyReturn] Enable InlineHTML on RemoveAlwaysElseRector (#…
…3387) * enable inlineHTML on RemoveAlwaysElseRector * FIx * FIx * FIx * [ci-review] Rector Rectify * [ci-review] Rector Rectify * Fix * Fix * Fix * early return --------- Co-authored-by: GitHub Action <action@github.com>
- Loading branch information
1 parent
5db390c
commit d8aa22b
Showing
5 changed files
with
59 additions
and
25 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
rules-tests/EarlyReturn/Rector/If_/RemoveAlwaysElseRector/Fixture/else_inline_html.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,38 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\EarlyReturn\Rector\If_\RemoveAlwaysElseRector\Fixture; | ||
|
||
final class ElseInlineHTML | ||
{ | ||
public function run() | ||
{ | ||
if (rand(0, 5) > 2) { | ||
return; | ||
} else { ?> | ||
this is <?php echo "hello"; ?> world | ||
<?php } | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\EarlyReturn\Rector\If_\RemoveAlwaysElseRector\Fixture; | ||
|
||
final class ElseInlineHTML | ||
{ | ||
public function run() | ||
{ | ||
if (rand(0, 5) > 2) { | ||
return; | ||
} | ||
?> | ||
this is <?php | ||
echo "hello"; | ||
?> world | ||
<?php | ||
} | ||
} | ||
|
||
?> |
15 changes: 0 additions & 15 deletions
15
...tests/EarlyReturn/Rector/If_/RemoveAlwaysElseRector/Fixture/skip_else_inline_html.php.inc
This file was deleted.
Oops, something went wrong.
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
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