PHP codeniffer path to whole project

I'm new to this, but I installed composer and installed PHP Codesniffer with it. Now, how can I use php codesnifer to check files in the entire project folder? My directory structure looks something like this:

ProjectName
    functions
        functions.php
    templates
        template.php
    myFunctions.php
    vendor
        bin
            phpcs.exe

      

If I try to run

phpcs --standard=PSR2 functions 

      

it will check files inside function files inside function directory, but I need it to check all php files in ProjectName directory.

Thank!

+3


source to share


1 answer


You can use the dot sign "." to check the current directory .



phpcs --standard=PSR2 .

      

+1


source







All Articles