.php-cs-fixer.dist.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. use PhpCsFixer\Config;
  8. use PhpCsFixer\Finder;
  9. return (new Config())
  10. ->setRiskyAllowed(true)
  11. ->setIndent(' ')
  12. ->setRules([
  13. '@PSR2' => true,
  14. '@PhpCsFixer' => true,
  15. '@Symfony:risky' => true,
  16. 'concat_space' => ['spacing' => 'one'],
  17. 'array_syntax' => ['syntax' => 'short'],
  18. 'array_indentation' => true,
  19. 'combine_consecutive_unsets' => true,
  20. 'phpdoc_separation' => true,
  21. 'single_quote' => true,
  22. 'declare_equal_normalize' => true,
  23. 'function_typehint_space' => true,
  24. 'include' => true,
  25. 'lowercase_cast' => 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. 'blank_lines_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' => true,
  40. 'trim_array_spaces' => true,
  41. 'unary_operator_spaces' => true,
  42. 'whitespace_after_comma_in_array' => true,
  43. 'no_extra_blank_lines' => [
  44. 'tokens' => [
  45. 'curly_brace_block',
  46. 'extra',
  47. 'parenthesis_brace_block',
  48. 'square_brace_block',
  49. 'throw',
  50. 'use',
  51. ]
  52. ],
  53. 'braces' => [
  54. 'allow_single_line_closure' => true,
  55. ],
  56. ])
  57. ->setFinder(
  58. (new Finder())
  59. ->exclude('vendor')
  60. ->exclude('tests')
  61. ->in(__DIR__)
  62. )
  63. ;