Blog

Install:

composer global require "squizlabs/php_codesniffer=*"

Show available coding standards:

phpcs -i
The installed coding standards are MySource, PEAR, PHPCS, PSR1, PSR2, Squiz and Zend

phpcs = coding standards check only.

phpcs --standard=PSR2 /Applications/MAMP/htdocs/davidvandertuijn/app

phpcbf = code beautifier and fixer.

PHP:

phpcbf --standard=PSR2 /Applications/MAMP/htdocs/davidvandertuijn/app

CSS:

phpcbf /Applications/MAMP/htdocs/davidvandertuijn/public/assets/css

JS:

phpcbf /Applications/MAMP/htdocs/davidvandertuijn/public/assets/js
Zoeken