No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ecs.php 970B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. use Rector\Set\ValueObject\LevelSetList;
  3. use PhpCsFixer\Fixer\Operator\ConcatSpaceFixer;
  4. use Symplify\EasyCodingStandard\Config\ECSConfig;
  5. use Symplify\EasyCodingStandard\ValueObject\Option;
  6. use PhpCsFixer\Fixer\ArrayNotation\ArraySyntaxFixer;
  7. use Symplify\EasyCodingStandard\ValueObject\Set\SetList;
  8. use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
  9. return static function (ECSConfig $configurator): void {
  10. // alternative to CLI arguments, easier to maintain and extend
  11. $configurator->paths([__DIR__ . '/lib', __DIR__ . '/tests']);
  12. // choose
  13. $configurator->sets([
  14. SetList::CLEAN_CODE, SetList::PSR_12//, LevelSetList::UP_TO_PHP_81 //, SymfonySetList::SYMFONY_60
  15. ]);
  16. $configurator->ruleWithConfiguration(ConcatSpaceFixer::class, [
  17. 'spacing' => 'one'
  18. ]);
  19. // indent and tabs/spaces
  20. // [default: spaces]. BUT: tabs are superiour due to accessibility reasons
  21. $configurator->indentation('tab');
  22. };