.php-cs-fixer.dist.php 1.1 KB

12345678910111213141516171819202122232425
  1. <?php
  2. return (new PhpCsFixer\Config())
  3. ->setRules([
  4. '@Symfony' => true,
  5. '@Symfony:risky' => true,
  6. '@PHPUnit48Migration:risky' => true,
  7. 'php_unit_no_expectation_annotation' => false, // part of `PHPUnitXYMigration:risky` ruleset, to be enabled when PHPUnit 4.x support will be dropped, as we don't want to rewrite exceptions handling twice
  8. 'array_syntax' => ['syntax' => 'short'],
  9. 'fopen_flags' => false,
  10. 'ordered_imports' => true,
  11. 'protected_to_private' => false,
  12. // Part of @Symfony:risky in PHP-CS-Fixer 2.13.0. To be removed from the config file once upgrading
  13. 'native_function_invocation' => ['include' => ['@compiler_optimized'], 'scope' => 'namespaced'],
  14. // Part of future @Symfony ruleset in PHP-CS-Fixer To be removed from the config file once upgrading
  15. 'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'],
  16. ])
  17. ->setRiskyAllowed(true)
  18. ->setFinder(
  19. (new PhpCsFixer\Finder())
  20. ->in(__DIR__)
  21. ->exclude('vendor')
  22. ->name('*.php')
  23. )
  24. ;