.php_cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. $header = <<<'EOF'
  3. The RandomLib library for securely generating random numbers and strings in PHP
  4. @author Anthony Ferrara <ircmaxell@ircmaxell.com>
  5. @copyright 2011 The Authors
  6. @license http://www.opensource.org/licenses/mit-license.html MIT License
  7. @version Build @@version@@
  8. EOF;
  9. Symfony\CS\Fixer\Contrib\HeaderCommentFixer::setHeader($header);
  10. return Symfony\CS\Config\Config::create()
  11. ->level(Symfony\CS\FixerInterface::PSR2_LEVEL)
  12. ->fixers([
  13. 'align_double_arrow',
  14. 'array_element_no_space_before_comma',
  15. 'array_element_white_space_after_comma',
  16. 'declare_equal_normalize',
  17. 'extra_empty_lines',
  18. 'header_comment',
  19. 'list_commas',
  20. 'multiline_array_trailing_comma',
  21. 'new_with_braces',
  22. 'no_blank_lines_before_namespace',
  23. 'no_empty_comment',
  24. 'no_empty_lines_after_phpdocs',
  25. 'no_empty_phpdoc',
  26. 'no_empty_statement',
  27. 'object_operator',
  28. 'ordered_use',
  29. 'php_unit_dedicate_assert',
  30. 'phpdoc_indent',
  31. 'phpdoc_order',
  32. 'phpdoc_params',
  33. 'phpdoc_scalar',
  34. 'phpdoc_separation',
  35. 'remove_leading_slash_use',
  36. 'remove_lines_between_uses',
  37. 'return',
  38. 'self_accessor',
  39. 'short_bool_cast',
  40. 'short_scalar_cast',
  41. 'single_blank_line_before_namespace',
  42. 'spaces_before_semicolon',
  43. 'ternary_spaces',
  44. 'trim_array_spaces',
  45. 'unneeded_control_parentheses',
  46. 'unused_use',
  47. 'whitespacey_lines',
  48. ])
  49. ->finder(
  50. Symfony\CS\Finder\DefaultFinder::create()
  51. ->in(__DIR__ . "/lib")
  52. ->in(__DIR__ . "/test")
  53. )
  54. ;