Skip to content

Squiz.WhiteSpace.ScopeKeywordSpacing removes member var name while fixing if no space after scope keyword #1803

Closed
@mikeburg

Description

@mikeburg

This bug exists phpcbf with version 3.2.2 as well as version 2.7.

phpcbf will remove a method variable name assignment when there is no space between the name and the variable properties.

The following code:

class Foo {
// note the lack of space between static and $BAR
public static$BAR = array(1,2,3);
}

will be reformatted as:

class Foo {
public static = array(1,2,3);
}

If phpcbf is run against the reformat, the statement "public static = array(1,2,3);" will be considered as valid php.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions