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

Squiz.Functions.FunctionDeclarationArgumentSpacing prints wrong argument name in error message #2674

Closed
mekras opened this issue Oct 28, 2019 · 1 comment

Comments

@mekras
Copy link

mekras commented Oct 28, 2019

test.php:

<?php

function foo($a , $b)
{
}

Command:

bin/phpcs --standard=src/Standards/PSR12 test.php

Expected output:

3 | ERROR | [x] Expected 0 spaces between argument "$a" and comma; 1 found

Actual output:

3 | ERROR | [x] Expected 0 spaces between argument "$b" and comma; 1 found
@gsherwood gsherwood added this to Idea Bank in PHPCS v3 Development via automation Oct 28, 2019
@gsherwood gsherwood added this to the 3.5.3 milestone Oct 28, 2019
@gsherwood gsherwood changed the title FunctionDeclarationArgumentSpacing reports invalid argument name Squiz.Functions.FunctionDeclarationArgumentSpacing prints wrong argument name in error message Oct 28, 2019
gsherwood added a commit that referenced this issue Oct 28, 2019
…prints wrong argument name in error message
@gsherwood
Copy link
Member

Thanks for reporting this. The error itself was being reported and fixed correctly, but the message was wrong. This will be fixed in 3.5.3.

PHPCS v3 Development automation moved this from Idea Bank to Ready for Release Oct 28, 2019
@gsherwood gsherwood moved this from Ready for Release to Track in PHPCS v3 Development Oct 28, 2019
@gsherwood gsherwood moved this from Track to Ready for Release in PHPCS v3 Development Oct 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
PHPCS v3 Development
Ready for Release
Development

No branches or pull requests

2 participants