mirror of
https://github.com/Karaka-Management/Developer-Guide.git
synced 2026-03-29 13:38:40 +00:00
add multiline ternary
This commit is contained in:
parent
a62465c53b
commit
b956e6f1b7
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user