Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 8.0 | Squiz/ScopeKeywordSpacing: fix false positive on static as return type #3189

Conversation

jrfnl
Copy link
Contributor

@jrfnl jrfnl commented Dec 24, 2020

This adds some additional safeguards to the sniff to prevent it from triggering when static is used in a return type declaration, as allowed since PHP 8.0.

Includes unit tests.

Fixes #3188

…return type

This adds some additional safeguards to the sniff to prevent it from triggering when `static` is used in a return type declaration, as allowed since PHP 8.0.

Includes unit tests.

Fixes 3188
Copy link

@mathieutu mathieutu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm it fixes the problem!

@gsherwood gsherwood added this to the 3.6.0 milestone Jan 14, 2021
gsherwood added a commit that referenced this pull request Jan 14, 2021
@gsherwood gsherwood merged commit ace118c into squizlabs:master Jan 14, 2021
@gsherwood
Copy link
Member

Thanks a lot for this fix

@jrfnl jrfnl deleted the php-8.0/3188-squiz-scopekeywordspacing-bugfix branch January 14, 2021 10:19
@ShortlyMAB
Copy link

Hi peeps, when this change will be released?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Squiz.WhiteSpace.ScopeKeywordSpacing false positive for static return type
4 participants