Search code examples
phpphpstormphpcodesnifferinspections

PhpStorm. CodeSniffer. Doesn't see the comment blocks


PHP CodeSniffer doesn't see the doc blocks from PhpStorm inspection, but see them from the CLI. How to fix that?

Here is an example.

From inspection

enter image description here

From CLI

enter image description here


Solution

  • With local version of phpcs it's working. It could be found at vendor/bin.

    I used the version, that is required in Magento 2 composer.json. Now it is 1.5.3.

    Do not forget to run composer update in console to be sure, that phpcs is installed locally.