.php_cs.dist 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. if (!file_exists(__DIR__ . '/src'))
  3. {
  4. exit(0);
  5. }
  6. return PhpCsFixer\Config::create()
  7. ->setRules([
  8. '@Symfony' => true,
  9. '@Symfony:risky' => true,
  10. 'php_unit_dedicate_assert' => ['target' => '5.6'],
  11. 'array_syntax' => ['syntax' => 'short'],
  12. 'array_indentation' => true,
  13. 'binary_operator_spaces' => [
  14. 'operators' => [
  15. '=>' => 'align_single_space',
  16. ],
  17. ],
  18. 'concat_space' => [
  19. 'spacing' => 'one',
  20. ],
  21. 'fopen_flags' => false,
  22. 'protected_to_private' => false,
  23. 'native_constant_invocation' => true,
  24. 'combine_nested_dirname' => true,
  25. 'single_quote' => true,
  26. 'braces' => [
  27. 'position_after_control_structures' => 'next',
  28. ],
  29. 'no_superfluous_phpdoc_tags' => false,
  30. ])
  31. ->setRiskyAllowed(true)
  32. ->setFinder(
  33. PhpCsFixer\Finder::create()
  34. ->exclude(__DIR__ . '/vendor')
  35. ->in(__DIR__ . '/src')
  36. ->in(__DIR__ . '/tests')
  37. ->append([__FILE__])
  38. )
  39. ;