Skip to content
This repository was archived by the owner on Feb 8, 2024. It is now read-only.

1.2. PSR 2 and Php CS Fixer

Shin Okada edited this page Jun 13, 2016 · 1 revision

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

Clone this wiki locally