-
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
phpcs:ignore annotation doesnt work inside a docblock #2868
Comments
The phpcs:ignore annotation (and related ones) were not being detected properly inside docblocks, which is why this wasn't working. The following code will work in 3.5.5: <?php
/**
* @phpcs:ignore Generic.Files.LineLength.TooLong
* @phan-param array{src:string,dst:string,headers?:array<string,string>,ignoreMissingSource?:bool} $params
*/
public function something( array $params ) {
} Thanks for the report. |
hey @gsherwood, that is not working for class method I have phpcs 3.5.8
for that code
It is still generating error
I'm not sure, but I think is your code is covering token only in global indent in Tokenizer and tests Can you check that? Maybe I make a mistake? |
I can confirm it doesn't work on properties inside classes either. I'll open a new issue. |
I'm trying to suppress "Line exceeds 100 characters" warning in the following code:
Even with
// phpcs:ignore
before the@phan-param
line (or at the end of this line) the warning was still emitted.The text was updated successfully, but these errors were encountered: