.php_cs.dist 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  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_useless_else' => true,
  17. 'no_useless_return' => true,
  18. 'ordered_imports' => true,
  19. 'php_unit_construct' => true,
  20. 'php_unit_dedicate_assert' => true,
  21. 'php_unit_strict' => true,
  22. 'psr4' => true,
  23. 'strict_comparison' => true,
  24. 'strict_param' => true,
  25. 'no_extra_consecutive_blank_lines' => array('break', 'continue', 'extra', 'return', 'throw', 'use', 'curly_brace_open'),
  26. ))
  27. ->finder(
  28. PhpCsFixer\Finder::create()
  29. ->exclude('tests/Fixtures')
  30. ->in(__DIR__)
  31. )
  32. ;