.php_cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. $config = Symfony\CS\Config\Config::create()
  3. ->level(Symfony\CS\FixerInterface::PSR2_LEVEL)
  4. ->fixers([
  5. 'blankline_after_open_tag',
  6. 'empty_return',
  7. 'extra_empty_lines',
  8. 'function_typehint_space',
  9. 'join_function',
  10. 'method_argument_default_value',
  11. 'multiline_array_trailing_comma',
  12. 'no_blank_lines_after_class_opening',
  13. 'no_empty_lines_after_phpdocs',
  14. 'phpdoc_indent',
  15. 'phpdoc_no_access',
  16. 'phpdoc_no_empty_return',
  17. 'phpdoc_no_package',
  18. 'phpdoc_params',
  19. 'phpdoc_scalar',
  20. 'phpdoc_separation',
  21. 'phpdoc_trim',
  22. 'phpdoc_type_to_var',
  23. 'phpdoc_types',
  24. 'phpdoc_var_without_name',
  25. 'remove_leading_slash_use',
  26. 'remove_lines_between_uses',
  27. 'short_bool_cast',
  28. 'single_quote',
  29. 'spaces_after_semicolon',
  30. 'spaces_before_semicolon',
  31. 'spaces_cast',
  32. 'standardize_not_equal',
  33. 'ternary_spaces',
  34. 'trim_array_spaces',
  35. 'unneeded_control_parentheses',
  36. 'unused_use',
  37. 'whitespacy_lines',
  38. 'align_double_arrow',
  39. 'concat_with_spaces',
  40. 'logical_not_operators_with_successor_space',
  41. 'multiline_spaces_before_semicolon',
  42. 'newline_after_open_tag',
  43. 'ordered_use',
  44. 'php_unit_construct',
  45. 'phpdoc_order',
  46. 'short_array_syntax',
  47. ]);
  48. if (null === $input->getArgument('path')) {
  49. $config
  50. ->finder(
  51. Symfony\CS\Finder\DefaultFinder::create()
  52. ->in('src')
  53. ->in('test')
  54. ->exclude('vendor')
  55. );
  56. }
  57. return $config;