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

Incorrect array opening tag placement #35

Open
krzysztofrewak opened this issue Sep 30, 2021 · 0 comments
Open

Incorrect array opening tag placement #35

krzysztofrewak opened this issue Sep 30, 2021 · 0 comments
Labels
new rule New rules for ECS

Comments

@krzysztofrewak
Copy link
Member

Right now things like this:

        $software->versions()->update(["default_version" => false]);
        $version->update(["default_version" => true]);

are refactored into this:

        $software->versions()->update([
            "default_version" => false,
        ]);
        $version->update([
            "default_version" => true,
        ]);

And it's nice, but PSR-12 codestyle in PHPStorm is sometimes changing it into this:

            $software->versions()->update(
                [
                    "default_version" => false,
                ],
            );
            $version->update(
                [
                    "default_version" => true,
                ],
            );

We should not allow to have [ in new line, I think.

@krzysztofrewak krzysztofrewak changed the title Incorrect array placement Incorrect array opening tag placement Sep 30, 2021
@krzysztofrewak krzysztofrewak added the new rule New rules for ECS label Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new rule New rules for ECS
Projects
None yet
Development

No branches or pull requests

1 participant