diff --git a/standards/general.md b/standards/general.md index 60c9a1d..75221e5 100644 --- a/standards/general.md +++ b/standards/general.md @@ -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