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

Empty line in multi-line function declaration cause infinite loop #1369

Closed
duzhe opened this issue Feb 21, 2017 · 1 comment
Closed

Empty line in multi-line function declaration cause infinite loop #1369

duzhe opened this issue Feb 21, 2017 · 1 comment

Comments

@duzhe
Copy link

duzhe commented Feb 21, 2017

Test this case

<?php

class Test
{
    public function a(
        $b,

        $c
    )
    {
    }
}
@duzhe duzhe changed the title empty line in multi-line function declaration cause infinity loop Empty line in multi-line function declaration cause infinity loop Feb 21, 2017
@gsherwood gsherwood changed the title Empty line in multi-line function declaration cause infinity loop Empty line in multi-line function declaration cause infinite loop Feb 21, 2017
gsherwood added a commit that referenced this issue Feb 21, 2017
gsherwood added a commit that referenced this issue Feb 21, 2017
… for blank lines in a function declaration (ref #1369)
@gsherwood
Copy link
Member

I've fixed a few bugs that were causing issues around here with code fixing. Thanks for reporting this.

I'm not 100% sure what standard you are using, but when I use the PSR2 standard to fix this code, I now get the following:

<?php

class Test
{
    public function a(
        $b,
        $c
    ) {
    }
}

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