Skip to content

no_spaces_after_function_name applies to non-functions #7516

@kamil-tekiela

Description

@kamil-tekiela

When using the no_spaces_after_function_name fixer it changes spaces around parentheses after language constructs such as include or echo. In fact, they are listed as examples of "functions" in the fixer documentation.

This fixer should not work on language constructs that happen to use parentheses. Main examples are require, include, echo, print. It's fine to apply this rule to language constructs that use parentheses in their syntax, although a little dubious.

-echo ('Hello World!');
+echo('Hello World!');

This should not happen. It's wrong and can lead to introduction of bugs in code as the visual separation between the construct and the operand is gone.

Please fix this fixer.

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