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

Variadic arguments: extra space is inserted between ... and variable name #9

Closed
przepompownia opened this issue Jan 12, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@przepompownia
Copy link

At first, thanks for publishing this extension.

With

'ErickSkrauch/align_multiline_parameters' => ['variables' => false, 'defaults' => false],

and

    public function bar(
        string ...$zxc,
    ) {
    } 

I get

    public function bar(
        string ... $zxc,
    ) {
    }

as a result, which is not expected.

@erickskrauch erickskrauch added the bug Something isn't working label Jan 12, 2024
@erickskrauch erickskrauch self-assigned this Jan 12, 2024
@erickskrauch
Copy link
Owner

Got it. Will fix it soon.

@erickskrauch
Copy link
Owner

Thank you for this issue. I have fixed it in the commit above. Unfortunately, I will not make a release yet, as I need to test this implementation on my working projects and maybe introduce an option to specify how to align the parameter with variadic.

But you can get the new version now. Use this command:

composer require --dev erickskrauch/php-cs-fixer-custom-fixers "dev-master#5458830 as 1.2.4"

@przepompownia
Copy link
Author

5458830 works correctly on the example where it failed before for me. Thanks for fixing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants