Closed (fixed)
Project:
Coder
Version:
8.x-3.x-dev
Component:
Coder Sniffer
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
29 Mar 2020 at 13:37 UTC
Updated:
29 Jun 2022 at 09:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
kingdutchThe attached patch adds a check in case no
@varis found to determine whether the token before the variable for which we're looking at the doc comment is a string. This is the token type for a type annotation. If no type is specified for the property then the previous token would be T_PROTECTED, T_PUBLIC or T_PRIVATE.Comment #3
kingdutchUpdated the patch to do the same. The previous patch was written in a version before some dead code (that I now relied on) was removed. The new implementation is also more robust in how it finds the type if it exists (being more resistant to whitespace changes).
Given the rewrite no interdiff is provided.
Comment #4
claudiu.cristeaNice, but needs tests
Comment #5
claudiu.cristeaOpened a PR in https://github.com/pfrenssen/coder/pull/164. Added tests
Comment #6
pfrenssenLooking good, thanks! I think we need to wait for #3238192: Allow omitting @var for strictly typed class properties though before this can be merged.
Comment #7
klausiThanks, makes sense to me, just left a minor improvement comment on the pull request.
We don't need to wait for official coding standard approval in Coder in non-controversial cases such as this, so once ready we can merge immediately :)
Comment #9
klausiImproved the PR and merged it. Thank you all!
Comment #10
solideogloria commentedI was just looking for something like this. Thanks all!
Comment #11
romain.sickenbergThank you!