自分はsublime textは使ってないけども、調べる必要があったのでメモ。
- fabpot/php-cs-fixer をインストール
$ curl -sS https://getcomposer.org/installer | php $ mv composer.phar /usr/local/bin/composer $ composer global require fabpot/php-cs-fixer
{ "path": "$HOME/.composer/vendor/bin", "shell_cmd": "php-cs-fixer fix '$file' --level=psr2" }
※もしcommand not found エラーが出た場合はshell_cmd部分を以下のようにすると動くかも
"shell_cmd": "php-cs-fixer fix \"$file\" --level=psr2"
以下参照元。
https://gist.github.com/mikefrancis/63436f1cb94ec31ce31fgist.github.com