.php-cs-fixer.dist.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. declare(strict_types=1);
  3. /*
  4. * This file is part of PHP CS Fixer.
  5. *
  6. * (c) Fabien Potencier <fabien@symfony.com>
  7. * Dariusz Rumiński <dariusz.ruminski@gmail.com>
  8. *
  9. * This source file is subject to the MIT license that is bundled
  10. * with this source code in the file LICENSE.
  11. */
  12. use PhpCsFixer\Config;
  13. use PhpCsFixer\Finder;
  14. return (new Config())
  15. ->setRiskyAllowed(true)
  16. ->setRules([
  17. '@PHP74Migration' => true,
  18. '@PHP74Migration:risky' => true,
  19. '@PHPUnit100Migration:risky' => true,
  20. '@PhpCsFixer' => true,
  21. '@PhpCsFixer:risky' => true,
  22. 'general_phpdoc_annotation_remove' => ['annotations' => ['expectedDeprecation']], // one should use PHPUnit built-in method instead
  23. 'header_comment' => ['header' => <<<'EOF'
  24. This file is part of PHP CS Fixer.
  25. (c) Fabien Potencier <fabien@symfony.com>
  26. Dariusz Rumiński <dariusz.ruminski@gmail.com>
  27. This source file is subject to the MIT license that is bundled
  28. with this source code in the file LICENSE.
  29. EOF],
  30. 'modernize_strpos' => true, // needs PHP 8+ or polyfill
  31. 'no_useless_concat_operator' => false, // TODO switch back on when the `src/Console/Application.php` no longer needs the concat
  32. 'numeric_literal_separator' => true,
  33. 'string_implicit_backslashes' => true, // https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7786
  34. ])
  35. ->setFinder(
  36. (new Finder())
  37. ->ignoreDotFiles(false)
  38. ->ignoreVCSIgnored(true)
  39. ->exclude(['dev-tools/phpstan', 'tests/Fixtures'])
  40. ->in(__DIR__)
  41. )
  42. ;