.php_cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. use Symfony\CS\Config\Config;
  3. use Symfony\CS\FixerInterface;
  4. use Symfony\CS\Fixer\Contrib\HeaderCommentFixer;
  5. $header = <<<EOF
  6. This file is part of Psy Shell.
  7. (c) 2012-2017 Justin Hileman
  8. For the full copyright and license information, please view the LICENSE
  9. file that was distributed with this source code.
  10. EOF;
  11. HeaderCommentFixer::setHeader($header);
  12. $config = Config::create()
  13. // use symfony level and extra fixers:
  14. ->level(FixerInterface::SYMFONY_LEVEL)
  15. ->fixers(array(
  16. 'align_double_arrow',
  17. 'concat_with_spaces',
  18. 'header_comment',
  19. 'long_array_syntax',
  20. 'ordered_use',
  21. 'strict',
  22. '-concat_without_spaces',
  23. '-method_argument_space',
  24. '-pre_increment',
  25. '-unalign_double_arrow',
  26. '-unalign_equals',
  27. '-no_empty_comment', // stop removing slashes in the middle of multi-line comments
  28. ))
  29. ->setUsingLinter(false);
  30. $finder = $config->getFinder()
  31. ->in(__DIR__)
  32. ->name('.php_cs')
  33. ->name('build-manual')
  34. ->name('build-phar')
  35. ->exclude('build-vendor');
  36. return $config;