lint/style/no-short-ternary
In the coding-style set. Report only. Upstream gates: strictRules.disallowedShortTernary.
What it does
Detects the use of the shorthand ternary and elvis operators.
Configuration
[lint.rules]
"style/no-short-ternary" = "error"
To skip it in some files or lines, add an override or an ignore comment.
Replaces
DisallowedShortTernaryRule(phpstan-classes)no-shorthand-ternary(mago-linter)ternary.shortNotAllowed(phpstan-strict-rules)
Linked rules
- Conflicts with
lint/style/prefer-short-ternary. You cannot enable both.