coding-standard
coding-standard copied to clipboard
False negative SlevomatCodingStandard.ControlStructures.DisallowTrailingMultiLineTernaryOperator
Hello, looks like this sniff does not report error for such cases:
function foo() {}
$a = $b === 'a' ? foo()
: 'c';
function foo() {}
$a = $b === 'a' ? foo(
) : 'c';
It's intentional: https://github.com/slevomat/coding-standard/commit/f02675182fca6ba88e839a9433ebf4557e356015
The actual report matches the sniff name.
Your version does make sense but it will need another sniff.