Skip to content

Squiz.Arrays.ArrayDeclaration.NoCommaAfterLast incorrectly detects comments #379

@mhujer

Description

@mhujer

Comment is incorrectly detected as a last element and the comma is demanded after it (Comma required after last value in array declaration) for the following snippet.
I believe that the correct behaviour is to have comma after last non-comment value in the array.

$data = array( 'first', 'second', 'third', // Add more here ); 

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