phpro / grumphp

A PHP code-quality tool
MIT License
4.11k stars 429 forks source link

False positive - Squiz.WhiteSpace.ScopeKeywordSpacing.Incorrect #1067

Closed CostiNec closed 1 year ago

CostiNec commented 1 year ago

Hello! I have the following issue:

ERROR   | [x] Scope keyword "static" must be followed by a
    |         |     single space; found newline
    |         |     (Squiz.WhiteSpace.ScopeKeywordSpacing.Incorrect)

This is how my code looks like:

    public function build(): static
    {
    ....
    }

Personally I didn't find any issue on this topic. I would appreciate it If you know how to solve this. Thanks.

GrumPHP 1.15.0

veewee commented 1 year ago

Hello,

It doesn't ring a bell here. Some additional questions to give us guidance:

Does phpcs works when you run it standalone? Is it solely an issue during pre-commit or also during run? Does it work if you disable parallel execution?

veewee commented 1 year ago

Closing this one because of inactivity If the issue still persists - feel free to reopen and provide some additional context.