A php mess detector ruleset file which is more compatible with CakePHP 3
The Mess Detector project aims to automatically find problems with your code, and highlight them to improve code quality.
Find out more at https://phpmd.org or github.com/phpmd/phpmd
- Copy the
phpmd.xml
file into your project root. - Install phpmd
composer require --dev phpmd/phpmd
or globally withcomposer global require phpmd/phpmd
phpmd src/ text phpmd.xml --suffixes=php
"scripts": {
"mess": "phpmd src/ text phpmd.xml --suffixes=php"
}
composer mess
In your settings, under Languages & Frameworks > PHP > Mess Detector set your 'Development environment' configuration to point to the correct executable, either in your projects 'vendor' folder, or you global folder.
Then in your settings, under Editor > Inspections > PHP add the phpmd.xml
file to the Custom rulesets options.