lint/style/prefer-short-ternary
Not in any set. Unsafe fix: it can change behaviour.
What it does
Use the Elvis operator ?: where possible.
Configuration
[lint.rules]
"style/prefer-short-ternary" = "error"
To skip it in some files, add an override or a @pun-ignore-file comment.
Replaces
ternary_to_elvis_operator(php-cs-fixer, risky)
Linked rules
- Conflicts with
lint/style/no-short-ternary. You cannot enable both.