LoginSignup
5
3

More than 5 years have passed since last update.

Composer 経由で php-cs-fixer 環境をと整える。

Posted at
$ composer require friendsofphp/php-cs-fixer

コードの修正

$ vendor/bin/php-cs-fixer fix app 

終了コードは 0 構文エラーなどがあると fix 出来ないがその場合でも終了コードは 0

コードのチェック

$ vendor/bin/php-cs-fixer fix app --dry-run

--dry-runオプションはコードのチェックのみ行う

修正スべき内容がない場合 終了コードは0に、 修正スべき内容がある場合エラーコード 8 が変える。

構文エラーで修正リストが出せない場合は 4 のエラーコードが帰ってくる。

5
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
3