ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
[# PHP\_CodeSniffer](https://www.jetbrains.com/help/phpstorm/using-php-code-sniffer.html) ### 下载go-pear [go-pear](http://pear.php.net/go-pear.phar) 管理员打开控制台执行 ` php go-pear.phar ` ![](https://img.kancloud.cn/d8/77/d8775c15700df85d8eddf0d100429aec_677x493.png) ![](https://img.kancloud.cn/b0/5b/b05b42150859c892f3bd05500ba648b3_755x262.png) ### 双击pear.bat文件,注册pear到当前环境。 ### 安装**PHP\_CodeSniffer** ` pear install PHP_CodeSniffer ` ![](https://img.kancloud.cn/80/84/8084c8a41f6f620b14ca7500e0b7a03e_932x496.png) ### 安装CodeIgniter标准 下载[https://github.com/thomas-ernest/CodeIgniter-for-PHP_CodeSniffer](https://github.com/thomas-ernest/CodeIgniter-for-PHP_CodeSniffer) ### 复制src目录到php->pear->PHP->CodeSniffer->Standards目录下,并且改名为CodeIgniter ![](https://img.kancloud.cn/97/b4/97b4c33e9533163c54a9d7e9daabefc2_675x166.png) ### 坑 下载版本有问题重新下载 ` pear uninstall PHP_CodeSniffer` `pear install PHP_CodeSniffer` ![](https://img.kancloud.cn/b2/25/b22581e5c2b28e52cc583a5b66e168b8_736x130.png) ![](https://img.kancloud.cn/80/7f/807f1bf5898e8fbafa50088233983a7f_984x701.png) ![](https://img.kancloud.cn/3e/86/3e86e7366097bfc2cb455e4f8a88bf6f_1233x704.png) ### 配置菜单 ![](https://img.kancloud.cn/02/dd/02ddf203cc03c984d2237d1659da31d1_984x701.png) ![](https://img.kancloud.cn/da/21/da21e5af6cf740f8df99770fa117f780_984x701.png) --standard=CodeIgniter $FileDir$/$FileName$ ### 使用 ![](https://img.kancloud.cn/01/98/019808e013a649cf1f7debd102244c35_379x444.png)