Skip to content

Instantly share code, notes, and snippets.

@dakala
dakala / cs.sh
Last active October 28, 2021 19:31
Install and configure PHPCS for Drupal
#!/bin/sh
# Install drupal/coder
composer global require drupal/coder
# Register Drupal and DrupalPractice Standard with PHPCS
phpcs --config-set installed_paths ~/.composer/vendor/drupal/coder/coder_sniffer
# Colorise output
phpcs --config-set colors 1
# Go home
cd ~