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

G.F.FCAS.TooMuchSpaceAfterComma should allow argument alignment #13

Closed
white-gecko opened this issue Nov 21, 2011 · 7 comments
Closed
Assignees
Milestone

Comments

@white-gecko
Copy link
Member

I get following sniff error

239 | ERROR | Expected 1 space after comma in function call; 2 found
| | (Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma)
241 | ERROR | Expected 1 space after comma in function call; 3 found
| | (Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma)
242 | ERROR | Expected 1 space after comma in function call; 2 found
| | (Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma)

for following code

$bnd['top'] = new Erfurt_Sparql_Query2_Smaller('?lat',  $bnd['top']);
$bnd['rgt'] = new Erfurt_Sparql_Query2_Smaller('?long', $bnd['rgt']);
$bnd['btm'] = new Erfurt_Sparql_Query2_Larger('?lat',   $bnd['btm']);
$bnd['lft'] = new Erfurt_Sparql_Query2_Larger('?long',  $bnd['lft']);
$dttyps[]   = new Erfurt_Sparql_Query2_ConditionalAndExpression($bnd);

We only want a check that at least one space exists but argument alignment should be possible

@ghost ghost assigned larseidam Nov 21, 2011
@seebi
Copy link
Member

seebi commented Feb 28, 2012

@larseidam can you react on this? it is much work?

@larseidam
Copy link
Member

I have used a existing sniff to check for the spacing in funktion calls. I think I can easy deactivate the check for spaces after comma and save it as our own sniff.

@white-gecko
Copy link
Member Author

I think the spaces after comma should not be deactivated, but it should also accept aligned code. Is this possible?

@larseidam
Copy link
Member

Now I have uploaded a update of the sniff (50b2754), so you need at least one space after each comma, but you are able to set more to align the code.

Please check it with your code and if you are happy with it, please close the issue!

@seebi
Copy link
Member

seebi commented Mar 3, 2012

@white-gecko please test and close ...

@white-gecko
Copy link
Member Author

Yes, I will test it when I'm back home

@white-gecko
Copy link
Member Author

Thanks it works now.

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

No branches or pull requests

3 participants