.php_cs.dist 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. 'single_quote' => true,
  25. 'braces' => [
  26. 'position_after_control_structures' => 'next',
  27. ],
  28. 'no_superfluous_phpdoc_tags' => false,
  29. 'single_line_comment_style' => false,
  30. 'combine_nested_dirname' => false,
  31. 'backtick_to_shell_exec' => false,
  32. ])
  33. ->setRiskyAllowed(true)
  34. ->setFinder(
  35. PhpCsFixer\Finder::create()
  36. ->exclude(__DIR__ . '/vendor')
  37. ->in(__DIR__ . '/src')
  38. ->in(__DIR__ . '/examples')
  39. ->in(__DIR__ . '/tests')
  40. ->append([__FILE__])
  41. )
  42. ;