-
-
Notifications
You must be signed in to change notification settings - Fork 333
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CodeQuality][Printer] Handle mix php+html on TernaryFalseExpressionT…
…oIfRector (#3382) Co-authored-by: kkmuffme <11071985+kkmuffme@users.noreply.github.com>
- Loading branch information
1 parent
f6d2041
commit a9e4d4b
Showing
3 changed files
with
50 additions
and
26 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
.../CodeQuality/Rector/Expression/TernaryFalseExpressionToIfRector/Fixture/with_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,33 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\CodeQuality\Rector\Expression\TernaryFalseExpressionToIfRector\Fixture; | ||
|
||
final class WithHTML | ||
{ | ||
public function run( $foo, $bar ) | ||
{ | ||
?> | ||
<input type="number" name="<?php echo $foo; ?>" value="<?php isset( $bar ) ? $bar : 0 ?>"> | ||
<?php | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\CodeQuality\Rector\Expression\TernaryFalseExpressionToIfRector\Fixture; | ||
|
||
final class WithHTML | ||
{ | ||
public function run( $foo, $bar ) | ||
{ | ||
?> | ||
<input type="number" name="<?php echo $foo; ?>" value="<?php if (isset( $bar )) { | ||
$bar; | ||
}?>"> | ||
<?php | ||
} | ||
} | ||
|
||
?> |
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