.php_cs.dist 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. $header = <<<EOF
  3. This file is part of composer/spdx-licenses.
  4. (c) Composer <https://github.com/composer>
  5. For the full copyright and license information, please view
  6. the LICENSE file that was distributed with this source code.
  7. EOF;
  8. $finder = PhpCsFixer\Finder::create()
  9. ->files()
  10. ->name('*.php')
  11. ->in(__DIR__.'/src')
  12. ->in(__DIR__.'/tests')
  13. ;
  14. /* fabpot/php-cs-fixer:^2.0-dev */
  15. return PhpCsFixer\Config::create()
  16. ->setUsingCache(true)
  17. //->setUsingLinter(false)
  18. ->setRiskyAllowed(true)
  19. ->setRules(array(
  20. '@PSR2' => true,
  21. 'binary_operator_spaces' => true,
  22. 'blank_line_before_return' => true,
  23. 'cast_spaces' => true,
  24. 'header_comment' => array('header' => $header),
  25. 'include' => true,
  26. 'long_array_syntax' => true,
  27. 'method_separation' => true,
  28. 'no_blank_lines_after_class_opening' => true,
  29. 'no_blank_lines_after_phpdoc' => true,
  30. 'no_blank_lines_between_uses' => true,
  31. 'no_duplicate_semicolons' => true,
  32. 'no_extra_consecutive_blank_lines' => true,
  33. 'no_leading_import_slash' => true,
  34. 'no_leading_namespace_whitespace' => true,
  35. 'no_trailing_comma_in_singleline_array' => true,
  36. 'no_unused_imports' => true,
  37. 'no_whitespace_in_blank_lines' => true,
  38. 'object_operator_without_whitespace' => true,
  39. 'phpdoc_align' => true,
  40. 'phpdoc_indent' => true,
  41. 'phpdoc_no_access' => true,
  42. 'phpdoc_no_package' => true,
  43. 'phpdoc_order' => true,
  44. 'phpdoc_scalar' => true,
  45. 'phpdoc_trim' => true,
  46. 'phpdoc_type_to_var' => true,
  47. 'psr0' => true,
  48. 'single_blank_line_before_namespace' => true,
  49. 'standardize_not_equals' => true,
  50. 'ternary_operator_spaces' => true,
  51. 'trailing_comma_in_multiline_array' => true,
  52. ))
  53. ->finder($finder)
  54. ;