mirror of
https://github.com/Karaka-Management/Developer-Guide.git
synced 2026-05-24 13:48:43 +00:00
add multiline ternary
This commit is contained in:
parent
a62465c53b
commit
b956e6f1b7
|
|
@ -119,6 +119,15 @@ if (...) {
|
||||||
$result = condition ? expr1 : expr2;
|
$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`.
|
Multiline `if` conditions should begin with a logical opperator `or`/`and`.
|
||||||
|
|
||||||
```php
|
```php
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user