-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Undefined offset when explaining standard with custom sniffs #1334
Comments
This doesn't happen for the included sniffs. Can you please post your custom ruleset? |
It is linked in the above Development branch: https://github.com/php-fig-rectified/psr2r-sniffer/blob/master/PSR2R/ruleset.xml |
I don't get any notices when running outside your repository, but I can replicate after cloning your repo and running it from there. I'll take a look and see if I can figure out what is going on. |
Thx! |
If you want to tokenize a file or string with reports etc, this is the code: https://gist.github.com/gsherwood/aafd2c16631a8a872f0c4a23916962ac Or just to get tokens (this is a JS example, but would work for PHP too): https://gist.github.com/gsherwood/f17cfc90f14a9b29eeb6b2e99e6e7f66 I don't think it's that bad. |
There was an easier way to do the explain in 3.0 because all the codes are recorded elsewhere, so I've changed the method to use the information the Ruleset already had, which fixes this issue. Thanks for reporting it. |
When running
I get
for current develop branch.
Using 3.0RC3
The text was updated successfully, but these errors were encountered: