.php_cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. use PhpCsFixer\Config;
  3. use PhpCsFixer\Finder;
  4. return Config::create()
  5. ->setRules
  6. ([
  7. 'no_trailing_whitespace' => true,
  8. 'no_whitespace_in_blank_line' => true,
  9. 'encoding' => true,
  10. 'single_blank_line_at_eof' => true,
  11. 'elseif' => true,
  12. 'blank_line_after_namespace' => true,
  13. 'blank_line_after_opening_tag' => true,
  14. 'cast_spaces' => true,
  15. 'hash_to_slash_comment' => true,
  16. 'lowercase_cast' => true,
  17. 'lowercase_constants' => true,
  18. 'lowercase_keywords' => true,
  19. 'no_alias_functions' => true,
  20. 'no_extra_consecutive_blank_lines' => true,
  21. 'no_leading_import_slash' => true,
  22. 'standardize_not_equals' => true,
  23. 'method_argument_space' => true,
  24. 'linebreak_after_opening_tag' => true,
  25. 'no_blank_lines_after_phpdoc' => true,
  26. 'no_leading_namespace_whitespace' => true,
  27. 'single_blank_line_before_namespace' => true,
  28. 'native_function_casing' => true,
  29. 'no_closing_tag' => true,
  30. 'no_singleline_whitespace_before_semicolons' => true,
  31. 'no_spaces_inside_parenthesis' => true,
  32. 'no_trailing_comma_in_list_call' => true,
  33. 'no_trailing_comma_in_singleline_array' => true,
  34. 'no_trailing_whitespace_in_comment' => true,
  35. 'no_whitespace_before_comma_in_array' => true,
  36. 'object_operator_without_whitespace' => true,
  37. 'phpdoc_align' => true,
  38. 'whitespace_after_comma_in_array' => true,
  39. 'trailing_comma_in_multiline_array' => true,
  40. 'ordered_imports' => true,
  41. 'single_line_after_imports' => true,
  42. 'single_import_per_statement' => true,
  43. 'no_unused_imports' => true,
  44. ])
  45. ->setRiskyAllowed(true)
  46. ->setFinder(Finder::create()->in(__DIR__));