Skip to content

Conversation

@jrfnl
Copy link
Contributor

@jrfnl jrfnl commented Jul 23, 2021

PHP 8.0+ attributes can be placed between a docblock and the property declaration it applies to.

The Squiz.Commenting.VariableComment sniff did not yet take this into account.

This would result in a false positive Missing member variable doc comment error.

Fixed now.

PHP 8.0+ attributes can be placed between a docblock and the property declaration it applies to.

The `Squiz.Commenting.VariableComment` sniff did not yet take this into account.

This would result in a false positive `Missing member variable doc comment` error.

Fixed now.
@jrfnl jrfnl changed the title PEAR/VariableComment: prevent false positives with attributes PHP 8.0 | PEAR/VariableComment: prevent false positives with attributes Jul 23, 2021
@gsherwood gsherwood added this to the 3.6.1 milestone Jul 28, 2021
@gsherwood gsherwood merged commit 66d7385 into squizlabs:master Jul 29, 2021
@gsherwood
Copy link
Member

Thanks for this fix. I found a related one in the Squiz MemberVarSpacing sniff which I also fixed.

@jrfnl jrfnl deleted the php-8.0/squiz-variablecomment-support-attributes branch July 29, 2021 08:50
@jrfnl
Copy link
Contributor Author

jrfnl commented Jul 29, 2021

@gsherwood Ah, yes there are probably still more. I looked through and fixed all sniffs in the various Commenting categories now, triggered by PR #3400.

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.

2 participants