The .php_cs file can be found on the root of the Magento installation. I'd like to know how can I use it as well.


The PHP Coding Standards Fixer tool fixes most issues in your code when you want to follow the PHP coding standards as defined in the PSR-1 and PSR-2 documents and many more.

If you are already using a linter to identify coding standards problems in your code, you know that fixing them by hand is tedious, especially on large projects. This tool does not only detect them, but also fixes them for you.

You can see how to use using this command below on the root of your installation:

php -f vendor/bin/static-review.php

You will see this screen:

Static Review

You can setup in your project using this command below, then when you use a command git it'll be executed.

php -f vendor/bin/static-review.php hook:install dev/tools/Magento/Tools/StaticReview/pre-commit .git/hooks/pre-commit


Git hook static check





  • 1
    that is seems nice answer:) – Amit Bera May 16 '17 at 21:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.