Pre-condition : IDE PhpStorm, a Laravel project up and running
Locate your
composer.json file in your project and add the following required
dependency:
“require-dev”:
{
“phpmd/phpmd”
: “@stable”
}
Running composer
install and composer update respectively, it will download phpmd into the project
directory
Then you access to
Setting/Mass Detector and config the file following the path
YourProject/vendor/phpmd/phpmd/src/bin.
Validate the file to check if phpmd is working properly. You should get a OK pop up with the phpmd version
Validate the file to check if phpmd is working properly. You should get a OK pop up with the phpmd version
The next thing is to activate the phpmd. In the setting tabs, navigate to Editors/Inspections. Then enable the option “PHP Mess Detector Validation”. Also select the warnings and the rules options on the right hand size
0 Comments:
Post a Comment