Step 1: We need to run the command on drupal root folder
composer require drupal/coder
Step 2:- after install is done you can check the phpcs file inside the vendor/bin folder
Step 3: Now we can check whether it's working or not simply run the command.
./vendor/bin/phpcs --help
Step 4:- If it's working we can check the code error for the command.
./vendor/bin/phpcs web/modules/custom (need to check custom module code)
Step 5:- How we can remove the file path like web/module/custom I am just run the command ./vendor/bin/phpcs and get the output.
1. We need to create phpcs.xml file for root folder.
2. Copy the Xml code click here and current the root path of folder which need to be check in the code.
3. Now we get the so many Error so run the command PHPCBF which is beautify the code.
No comments:
Post a Comment
If you have any problem please let me know.