Skip to content

Add Disallow assignment in arrays sniff #1670

Open
@rrehbein

Description

@rrehbein

Add a sniff to catch assignments within array structures.

Example error:

$foo = [
   $index = ['unexpected assignment here due to typo'],
];

Similar purpose to the SlevomatCodingStandard.ControlStructures.AssignmentInCondition sniff.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions