.php_cs.dist 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. $header = <<<'EOF'
  3. This file is part of the 2amigos/yii2-qrcode-component project.
  4. (c) 2amigOS! <http://2amigos.us/>
  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. ->exclude([
  10. '.github',
  11. 'docs',
  12. 'temp',
  13. 'tests',
  14. 'vendor',
  15. ])
  16. ->in(__DIR__);
  17. return PhpCsFixer\Config::create()
  18. ->setRules(array(
  19. '@PSR1' => true,
  20. '@PSR2' => true,
  21. 'header_comment' => ['header' => $header],
  22. 'array_syntax' => array('syntax' => 'short'),
  23. 'combine_consecutive_unsets' => true,
  24. 'no_extra_consecutive_blank_lines' => array(
  25. 'break',
  26. 'continue',
  27. 'extra',
  28. 'return',
  29. 'throw',
  30. 'use',
  31. 'parenthesis_brace_block',
  32. 'square_brace_block',
  33. 'curly_brace_block'
  34. ),
  35. 'no_useless_else' => true,
  36. 'no_useless_return' => true,
  37. 'ordered_class_elements' => true,
  38. 'ordered_imports' => true,
  39. 'phpdoc_add_missing_param_annotation' => true,
  40. 'phpdoc_order' => true,
  41. 'phpdoc_align' => true
  42. ))
  43. ->setFinder($finder);