Prefer video insutrctions? We have got you covered.
- Composer
- VVV at
~/Sites/VVV/
cd ~/Sites/VVV/ && composer require wp-coding-standards/wpcs:^0.10 && composer install && $(pwd)/vendor/bin/phpcs --config-set installed_paths $(pwd)/vendor/wp-coding-standards/wpcs/ && $(pwd)/vendor/bin/phpcs -i && which $(pwd)/vendor/bin/phpcs ;
- Type
sniff
into the search field on the top left - Click
Code Sniffer
, and click the triple dots to open up prefs. - If Local is not an option on the left pane, delete all left pane values, click apply, then close and reopen the prefs.
- Click on Local then Paste your clipboard (from the above install command) into the path and hit 'validate', then click apply.
- Click on inspections and tick checkbox next to PHP Code Sniffer Validation
- Click the blue arrows to Refresh 'Coding Standards' dropdown and select your preferred options (Like WordPress-Core)
- Apply and OK.