0

I want to start using PHP Code Sniffer in PhpStorm but I am not sure how I can configure it for my environment.

I connect to a Windows server using RDP, PhpStorm is installed on this box. My development server is a Centos VM.

Am I correct in thinking that I need to install PHP and PHP Code Sniffer on the Windows Server?

UPDATE

I tried following this https://confluence.jetbrains.com/display/PhpStorm/IDE+and+Project+Settings+in+PhpStorm

When I browse to phpcs and click Validate. I get an error which says that it is not a valid Windows application.

Should there be a batch file in there? The link says:

"Composer will install PHP Code Sniffer under the following path in your project: ./vendor/bin/phpcs and ./vendor/bin/phpcs.bat."

I added the batch file manually from here https://github.com/squizlabs/PHP_CodeSniffer/blob/master/bin/phpcs.bat

Now when I click the Validate button, I get: @php_bin@ is not recognised as an internal or external command

What next?

Do I need PHP on my Windows box?

Mick
  • 1,401
  • 4
  • 23
  • 40
  • 1
    No. You want to install it on the machine you use for development. But find out more at https://github.com/squizlabs/PHP_CodeSniffer. Also see https://confluence.jetbrains.com/plugins/servlet/mobile#content/view/53341309. – localheinz Aug 09 '17 at 09:00
  • Just in case: https://confluence.jetbrains.com/display/PhpStorm/PHP+Code+Sniffer+in+PhpStorm – LazyOne Aug 09 '17 at 11:01

0 Answers0