1.2. PSR 2 and Php CS Fixer - shinokada/php_notes GitHub Wiki
Doc After installing php cs fixer, install vim php-cs-fixer as well.
brew install homebrew/php/php-cs-fixer
or
brew install php-cs-fixer
Open a file and use <leader>pcd in vim to fix PSR-2 standards.
To fix a file, use <leader>pcf.
To fix a dir,
php-cs-fixer fix path/to/dir
php-cs-fixer fix application -fixers=--pre_increment
Without pre_increment
php-cs-fixer fix path/to/dir -fixers=-pre_increment