add multiline ternary

This commit is contained in:
Dennis Eichhorn 2020-04-30 21:37:31 +02:00
parent a62465c53b
commit b956e6f1b7

View File

@ -119,6 +119,15 @@ if (...) {
$result = condition ? expr1 : expr2;
```
Multiline ternary expressions should be indented.
```php
$result = condition
? very long expr1 which should be written like this
: very long expr2 which should be written like this;
```
Multiline `if` conditions should begin with a logical opperator `or`/`and`.
```php