1.安装Code Sniffer:
sudo apt-get install php-pear sudo pear install PHP_CodeSniffer
2.phpstorm选择sniffer配置:
File-->setting--->Language & Frameworkd-->php----->Quality Tools:
选择自己通过apt安装的code sniffer路径 :/usr/bin/目录下,选择phpcs
配置自己需要的psr规则:
File->setting->Editor->inspections: