[sniffs, property-declaration] Add basic support for property hooks#40
[sniffs, property-declaration] Add basic support for property hooks#40
Conversation
Currently lacking structure inside the hook scope
|
This would resolve #39 |
bix0r
left a comment
There was a problem hiding this comment.
I feel like we need more/better test. What about more complex hooks? Just looking at examples from https://www.php.net/manual/en/language.oop5.property-hooks.php, there are quite a few more cases to consider. Of course we might not want to allow all of them, but then we should have tests related to it.
|
|
||
| private function removeInvalidErrors(File $phpcsFile, int $stackPtr, TokenCollection $tokens): void | ||
| { | ||
| $removeError = function (int $line, int $column): void { |
There was a problem hiding this comment.
Rename $line and $column because you use those variable names in the for loops later. Or just remove them if you don't use them at all.
There was a problem hiding this comment.
Thanks for pointing this out.
The loop shouldn't be there at all actually, as I already know where the error is supposed to be.
|
@dcolt |
Partial work, incomplete
|
Should this be moved from "draft" state? |
No, it's still not complete. |
Currently lacking structure inside the hook scope.