.php_cs.dist 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. /*
  3. * This document has been generated with
  4. * https://mlocati.github.io/php-cs-fixer-configurator/#version:2.15|configurator
  5. * you can change this configuration by importing this file.
  6. */
  7. return PhpCsFixer\Config::create()
  8. ->setRiskyAllowed(true)
  9. ->setIndent(' ')
  10. ->setRules([
  11. '@PSR2' => true,
  12. '@PhpCsFixer' => true,
  13. '@Symfony:risky' => true,
  14. 'concat_space' => ['spacing' => 'one'],
  15. 'array_syntax' => ['syntax' => 'short'],
  16. 'array_indentation' => true,
  17. 'combine_consecutive_unsets' => true,
  18. 'method_separation' => true,
  19. 'single_quote' => true,
  20. 'declare_equal_normalize' => true,
  21. 'function_typehint_space' => true,
  22. 'hash_to_slash_comment' => true,
  23. 'include' => true,
  24. 'lowercase_cast' => true,
  25. 'no_multiline_whitespace_before_semicolons' => true,
  26. 'no_leading_import_slash' => true,
  27. 'no_multiline_whitespace_around_double_arrow' => true,
  28. 'no_spaces_around_offset' => true,
  29. 'no_unneeded_control_parentheses' => true,
  30. 'no_unused_imports' => true,
  31. 'no_whitespace_before_comma_in_array' => true,
  32. 'no_whitespace_in_blank_line' => true,
  33. 'object_operator_without_whitespace' => true,
  34. 'single_blank_line_before_namespace' => true,
  35. 'single_class_element_per_statement' => true,
  36. 'space_after_semicolon' => true,
  37. 'standardize_not_equals' => true,
  38. 'ternary_operator_spaces' => true,
  39. 'trailing_comma_in_multiline_array' => true,
  40. 'trim_array_spaces' => true,
  41. 'unary_operator_spaces' => true,
  42. 'whitespace_after_comma_in_array' => true,
  43. 'no_extra_consecutive_blank_lines' => [
  44. 'curly_brace_block',
  45. 'extra',
  46. 'parenthesis_brace_block',
  47. 'square_brace_block',
  48. 'throw',
  49. 'use',
  50. ],
  51. 'binary_operator_spaces' => [
  52. 'align_double_arrow' => true,
  53. 'align_equals' => true,
  54. ],
  55. 'braces' => [
  56. 'allow_single_line_closure' => true,
  57. ],
  58. ])
  59. ->setFinder(
  60. PhpCsFixer\Finder::create()
  61. ->exclude('vendor')
  62. ->exclude('tests')
  63. ->in(__DIR__)
  64. );