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:
原文地址:https://www.cnblogs.com/callmelx/p/11131997.html
时间: 2024-10-12 16:49:20