Skip to content
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

Create a new kind of annotation to ignore some specific rules inside a class, method, ... #866

Closed
benjamin-rtblw opened this issue Jan 18, 2016 · 2 comments

Comments

@benjamin-rtblw
Copy link

I've two classes as following :

<?php
interface MyInterface
{
    public function myMethod($myParameter);
}

class MyClassConcrete implements MyInterface
{
    public function myMethod($myParameter)
    {
        // Parameter $myParameter not used here but required to respect interface declaration
    }
}

?>

It would be great to create the following annotation :
@SuppressWarnings(PHPCS.Generic.CodeAnalysis.UnusedFunctionParameter)

What do you think ?

@gsherwood
Copy link
Member

It is probably best done using the existing annotation style rather than having PHPCS parse docblocks. There is a request for that already (#604), so I'll close this one. Feel free to comment over there on possible alternative syntax.

@navarr
Copy link

navarr commented Jan 20, 2017

I think having PHPCS parse dockblocks would be better. It's the way PHPMD does it and it ends up being a lot cleaner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants