.php_cs.dist 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. use PhpCsFixer\Config;
  3. use PhpCsFixer\Finder;
  4. $rules = array(
  5. '@PSR2' => true,
  6. 'array_syntax' => array(
  7. 'syntax' => 'long',
  8. ),
  9. 'binary_operator_spaces' => array(
  10. 'align_double_arrow' => false,
  11. 'align_equals' => false,
  12. ),
  13. 'blank_line_before_return' => true,
  14. 'cast_spaces' => true,
  15. 'concat_space' => array(
  16. 'spacing' => 'none',
  17. ),
  18. 'ereg_to_preg' => true,
  19. 'method_separation' => true,
  20. 'no_blank_lines_after_phpdoc' => true,
  21. 'no_extra_consecutive_blank_lines' => true,
  22. 'no_short_bool_cast' => true,
  23. 'no_unneeded_control_parentheses' => true,
  24. 'no_unused_imports' => true,
  25. 'no_whitespace_in_blank_line' => true,
  26. 'ordered_imports' => true,
  27. 'phpdoc_align' => true,
  28. 'phpdoc_indent' => true,
  29. 'phpdoc_inline_tag' => true,
  30. 'phpdoc_no_access' => true,
  31. 'phpdoc_no_alias_tag' => array(
  32. 'type' => 'var',
  33. ),
  34. 'phpdoc_no_package' => true,
  35. 'phpdoc_order' => true,
  36. 'phpdoc_scalar' => true,
  37. 'phpdoc_separation' => true,
  38. 'phpdoc_to_comment' => true,
  39. 'phpdoc_trim' => true,
  40. 'phpdoc_types' => true,
  41. 'phpdoc_var_without_name' => true,
  42. 'self_accessor' => true,
  43. 'single_quote' => true,
  44. 'space_after_semicolon' => true,
  45. 'standardize_not_equals' => true,
  46. 'ternary_operator_spaces' => true,
  47. 'trailing_comma_in_multiline_array' => true,
  48. 'trim_array_spaces' => true,
  49. 'unary_operator_spaces' => true,
  50. 'line_ending' => true,
  51. 'blank_line_after_namespace' => true,
  52. 'no_unused_imports' => true,
  53. );
  54. return Config::create()->setRules($rules)
  55. ->setFinder(Finder::create()->in(__DIR__))
  56. ->setUsingCache(true)
  57. ->setRiskyAllowed(true);