mac下phpStorm配置使用phpmd
什么是phpmd
phpmd,short of PHP Mess Detector,is a tool that checks if you aren’t making a mess of your code. Think of methods of hundreds of lines, classes that extend class after class after class, lack of documentation, nested loops, etc. PHP Mess Detector points out these culprits and aids into writing more manageable code.
安装phpmd
|
|
安装之后查看phpmd的路径
路径就是/usr/local/bin/phpmd
配置phpmd
Preferences/Languages & Frameworks/PHP/Mess Detector
点开Local
后的...
,输入phpmd的路径/usr/local/bin/phpmd
,点击Validate
进行验证
Preferences/Editor/Inspections/PHP/PHP Mess Detector validation
勾选中PHP Mess Detector validation
,并选择右侧建议的Options
规则,规则的说明参考:https://phpmd.org/rules/index.html:
使用phpmd
本文作者 : 小凡
原文链接 : https://16bh.github.io/2017/04/01/phpmd-in-phpstorm-on-mac/
版权声明 : 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明出处!