Skip to content

Instantly share code, notes, and snippets.

@DominicWatts
Last active September 12, 2024 15:51
Show Gist options
  • Save DominicWatts/8f19d5de6f7e82257df0e1a612eaed84 to your computer and use it in GitHub Desktop.
Save DominicWatts/8f19d5de6f7e82257df0e1a612eaed84 to your computer and use it in GitHub Desktop.
Magento 2 : PHPCS docker #magento2
docker run --rm -v $PWD:/code domw/phpcs phpcs --colors --standard=Magento2 --report=full,summary --extensions=php,phtml ./
# hide warnings
https://github.com/squizlabs/PHP_CodeSniffer/wiki/Configuration-Options#hiding-warnings-by-default
phpcs --error-severity=1 --warning-severity=0 /path/to/code
--config-set warning_severity 0
# standard syntax
phpcs --colors --standard=Magento2 --report=full,summary --extensions=php,phtml ./
phpcbf --colors --standard=Magento2 --report=full,summary --extensions=php,phtml ./
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment