1

I've installed the CodeSniffer and want to use it with PhpStorm.

I want to use the PSR2 coding standard to check for my source code, but it looks like the IDE checks with another standard. I can't find an option for changing the standards to define an extra parameter.

LazyOne
  • 158,824
  • 45
  • 388
  • 391
gustavgans
  • 5,141
  • 13
  • 41
  • 51

1 Answers1

4

You can change the coding standard in Preferences->Inspections->PHP->PHP Code Sniffer validation. There is a selectbox with predefined standards like PEAR, PSR1, PSR2 and you can also define your own.

codesniffer option in phpstorm

Master Bee
  • 1,089
  • 1
  • 12
  • 18