Skip to content

Squiz.Formatting.OperatorBracket.MissingBrackets error with static #2423

Closed
@oprudkyi

Description

@oprudkyi

PHP_CodeSniffer version 3.4.0 (stable) by Squiz (http://www.squiz.net)

        $test = myfunc(1 * static::TEST);
        $test++;

throws "Operation must be bracketed" and expects

        $test = myfunc(1 * (static::TEST));

while

          $test = (1 * static::TEST);

is allowed

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