File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9722,7 +9722,10 @@ public function format($source) {
97229722 case ST_COLON :
97239723 case ST_QUESTION :
97249724 if ($ this ->hasLnBefore ()) {
9725- $ this ->appendCode ($ this ->getIndent (+1 ));
9725+ // is it an argument?
9726+ if (! $ this ->leftUsefulTokenIs (ST_COMMA ) && ! $ this ->leftUsefulTokenIs (ST_PARENTHESES_OPEN )) {
9727+ $ this ->appendCode ($ this ->getIndent (+1 ));
9728+ }
97269729 }
97279730 $ this ->appendCode ($ text );
97289731 break ;
Original file line number Diff line number Diff line change 1+ <?php
2+ //passes:IndentTernaryConditions
3+ function multiline_parameters(
4+ ?string $first,
5+ ?string $second,
6+ ?int $third,
7+ ): ?string {
8+ return $first == $second
9+ ? $third
10+ : null;
11+ }
Original file line number Diff line number Diff line change 1+ <?php
2+ //passes:IndentTernaryConditions
3+ function multiline_parameters(
4+ ?string $first,
5+ ?string $second,
6+ ?int $third,
7+ ): ?string {
8+ return $first == $second
9+ ? $third
10+ : null;
11+ }
You can’t perform that action at this time.
0 commit comments