Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False negative SlevomatCodingStandard.ControlStructures.DisallowTrailingMultiLineTernaryOperator #1650

Open
rmikalkenas opened this issue Jan 3, 2024 · 1 comment

Comments

@rmikalkenas
Copy link
Contributor

rmikalkenas commented Jan 3, 2024

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';
@kukulich
Copy link
Contributor

kukulich commented Mar 9, 2024

It's intentional: f026751

The actual report matches the sniff name.

Your version does make sense but it will need another sniff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants