Skip to content

2 rules conflict with each other #490

@vv12131415

Description

@vv12131415

If I have enabled 2 rules
the SlevomatCodingStandard.Arrays.TrailingArrayComma.MissingTrailingComma and Squiz.Arrays.ArrayDeclaration.NoComma it will incorrectly make beautifying for the file
for example what it does with such file

<?php
//pre phpbcf
declare(strict_types=1);

return [
    'notifications'              => [
        'channel' => 'database'
    ]
];

error on cli
image

<?php
//post phpbcf
declare(strict_types=1);

return [
    'notifications'              => [
        'channel' => 'database',,
    ],
];

see this 2 commas at the end? That't the problem. How can this be fixed? thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions