Check for invalid phpstan doc comments#146
Merged
ondrejmirtes merged 2 commits intophpstan:masterfrom Feb 28, 2020
Merged
Conversation
BackEndTea
commented
Feb 27, 2020
1a30549 to
f4dbac0
Compare
Member
|
Thank you! This should be a separate level 2 rule. I want to adhere to SRP, and checking for unknown tags is a completely separate concern than looking for parse errors in PHPDocs. |
Contributor
Author
|
Sure, i'll rework this into its own rule. Why a level 2 rule though? I'd think this is like a configuration error, and should be a level 0 check. |
Member
|
Level 0 and 1 do not read or rely on PHPDocs in any way. |
Contributor
Author
|
Ah that makes sense |
BackEndTea
commented
Feb 27, 2020
c7f70e8 to
f786f98
Compare
Member
|
This is perfect, thank you! I'll change the wording of the error on master, but for now, I'm merging this :) |
Contributor
Author
|
Thanks @ondrejmirtes ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've added this as part of the
InvalidPhpDocTagValueRule, which is a level 2 rule.Arguably this could also be its own rule, which could be implemented on level 0.
Fixes: phpstan/phpstan#3026