.php_cs.dist 902 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * PHP-CS-Fixer Setting File
  4. *
  5. * @author keitakn<keita.koga.work@gmail.com>
  6. * @since 2018-05-28
  7. * @link https://github.com/FriendsOfPHP/PHP-CS-Fixer
  8. */
  9. $finder = PhpCsFixer\Finder::create()
  10. ->exclude('bootstrap/cache')
  11. ->exclude('storage')
  12. ->exclude('vendor')
  13. ->in(__DIR__);
  14. $config = PhpCsFixer\Config::create();
  15. $rules = [
  16. '@PSR1' => false,
  17. '@PSR2' => true,
  18. 'array_syntax' => ['syntax' => 'short'],
  19. 'no_multiline_whitespace_around_double_arrow' => true,
  20. 'no_multiline_whitespace_before_semicolons' => true,
  21. 'blank_line_after_namespace' => true,
  22. 'no_unused_imports' => true,
  23. 'ordered_imports' => true,
  24. 'single_quote' => true,
  25. // = , => を整列する
  26. 'binary_operator_spaces' => [
  27. 'align_double_arrow' => true,
  28. ],
  29. ];
  30. $config->setRules($rules)
  31. ->setUsingCache(false)
  32. ->setFinder($finder);
  33. return $config;