.php_cs 836 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. $finder = PhpCsFixer\Finder::create()
  3. ->in(__DIR__ . DIRECTORY_SEPARATOR . 'tests')
  4. ->notPath(__DIR__ . DIRECTORY_SEPARATOR . 'tests' . DIRECTORY_SEPARATOR . 'laravel')
  5. ->in(__DIR__ . DIRECTORY_SEPARATOR . 'src')
  6. ->append(['.php_cs']);
  7. $rules = [
  8. '@Symfony' => true,
  9. 'phpdoc_no_empty_return' => false,
  10. 'array_syntax' => ['syntax' => 'short'],
  11. 'yoda_style' => false,
  12. 'binary_operator_spaces' => [
  13. 'operators' => [
  14. '=>' => 'align',
  15. '=' => 'align',
  16. ],
  17. ],
  18. 'concat_space' => ['spacing' => 'one'],
  19. 'not_operator_with_space' => false,
  20. ];
  21. $rules['increment_style'] = ['style' => 'post'];
  22. return PhpCsFixer\Config::create()
  23. ->setUsingCache(true)
  24. ->setRules($rules)
  25. ->setFinder($finder);