.php_cs.dist 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. if (!file_exists(__DIR__.'/src')) {
  3. exit(0);
  4. }
  5. return PhpCsFixer\Config::create()
  6. ->setRules([
  7. '@Symfony' => true,
  8. '@Symfony:risky' => true,
  9. '@PHPUnit75Migration:risky' => true,
  10. 'php_unit_dedicate_assert' => ['target' => '5.6'],
  11. 'phpdoc_no_empty_return' => false, // triggers almost always false positive
  12. 'array_syntax' => ['syntax' => 'short'],
  13. 'fopen_flags' => false,
  14. 'ordered_imports' => true,
  15. 'phpdoc_trim_consecutive_blank_line_separation' => true,
  16. 'no_superfluous_phpdoc_tags' => ['allow_mixed' => true],
  17. 'protected_to_private' => false,
  18. // Part of @Symfony:risky in PHP-CS-Fixer 2.13.0. To be removed from the config file once upgrading
  19. 'native_function_invocation' => ['include' => ['@compiler_optimized'], 'scope' => 'namespaced', 'strict' => true],
  20. // Part of future @Symfony ruleset in PHP-CS-Fixer To be removed from the config file once upgrading
  21. 'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'],
  22. 'combine_nested_dirname' => true,
  23. ])
  24. ->setRiskyAllowed(true)
  25. ->setFinder(
  26. PhpCsFixer\Finder::create()
  27. ->in(__DIR__.'/{src,tests}')
  28. ->append([__FILE__])
  29. )
  30. ;