Skip to content

Commit

Permalink
Make nested ternary operators priority explicit
Browse files Browse the repository at this point in the history
The left-associativity of the ternary operator has been deprecated in PHP 7.4

Fixes hoaproject#106
  • Loading branch information
LudoMon authored Jul 9, 2020
1 parent c620f44 commit aa72af7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Bin/Pp.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,10 @@ protected function printTokenSequence(Compiler\Llk\Parser $compiler, $data)
$token['token'],
30 < $token['length']
? mb_substr($token['value'], 0, 29) . ''
: 'EOF' === $token['token']
: ('EOF' === $token['token']
? str_repeat(' ', 30)
: $token['value'] .
str_repeat(' ', 30 - $token['length']),
str_repeat(' ', 30 - $token['length'])),
$token['offset']
);
}
Expand Down

0 comments on commit aa72af7

Please sign in to comment.