lint/operators/prefer-coalesce
In the lint-recommended preset and every stricter one. In Rector’s rector/php70 set. Safe fix.
What it does
Use null coalescing operator ?? where possible.
Configuration
[lint.rules]
"operators/prefer-coalesce" = "error"
To skip it in some files, add an override or a @pun-ignore-file comment.
Replaces
ternary_to_null_coalescing(php-cs-fixer)TernaryToNullCoalescing(rector)