Skip to content

Commit ef17dae

Browse files
committed
[Php70] Keep right parentheses on TernaryToNullCoalescingRector
1 parent 6a31016 commit ef17dae

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
3+
namespace Rector\Tests\Php70\Rector\Ternary\TernaryToNullCoalescingRector\Fixture;
4+
5+
class KeepRightParentheses
6+
{
7+
public function run()
8+
{
9+
$port = isset($port) ? $port : (($scheme == 'https') ? '443' : '80');
10+
}
11+
}
12+
13+
?>
14+
-----
15+
<?php
16+
17+
namespace Rector\Tests\Php70\Rector\Ternary\TernaryToNullCoalescingRector\Fixture;
18+
19+
class KeepRightParentheses
20+
{
21+
public function run()
22+
{
23+
$port = $port ?? (($scheme == 'https') ? '443' : '80');
24+
}
25+
}
26+
27+
?>

0 commit comments

Comments
 (0)