.php_cs.dist 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. $header = <<<'EOF'
  3. This file is part of PHP CS Fixer.
  4. (c) Fabien Potencier <fabien@symfony.com>
  5. Dariusz Rumiński <dariusz.ruminski@gmail.com>
  6. This source file is subject to the MIT license that is bundled
  7. with this source code in the file LICENSE.
  8. EOF;
  9. return PhpCsFixer\Config::create()
  10. ->setRiskyAllowed(true)
  11. ->setRules(array(
  12. '@Symfony' => true,
  13. 'combine_consecutive_unsets' => true,
  14. 'header_comment' => array('header' => $header),
  15. 'long_array_syntax' => true,
  16. 'no_extra_consecutive_blank_lines' => array('break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block'),
  17. 'no_useless_else' => true,
  18. 'no_useless_return' => true,
  19. 'ordered_class_elements' => true,
  20. 'ordered_imports' => true,
  21. 'php_unit_construct' => true,
  22. 'php_unit_dedicate_assert' => true,
  23. 'php_unit_strict' => true,
  24. 'psr4' => true,
  25. 'strict_comparison' => true,
  26. 'strict_param' => true,
  27. ))
  28. ->finder(
  29. PhpCsFixer\Finder::create()
  30. ->exclude('tests/Fixtures')
  31. ->in(__DIR__)
  32. )
  33. ;