chore: migrate to PHP-CS-Fixer 3.x

This commit is contained in:
Owen Voke
2021-05-12 11:26:09 +01:00
parent c6a2e3b4d0
commit 1f10b46402
3 changed files with 19 additions and 20 deletions

30
.gitattributes vendored
View File

@ -1,16 +1,14 @@
/art export-ignore /art export-ignore
/docs export-ignore /docs export-ignore
/tests export-ignore /tests export-ignore
/scripts export-ignore /scripts export-ignore
/.github export-ignore /.github export-ignore
/.php_cs export-ignore /.php-cs-fixer.dist.php export-ignore
.editorconfig export-ignore .editorconfig export-ignore
.gitattributes export-ignore .gitattributes export-ignore
.gitignore export-ignore .gitignore export-ignore
.travis.yml export-ignore phpstan.neon export-ignore
phpstan.neon export-ignore phpunit.xml export-ignore
rector.yaml export-ignore CHANGELOG.md export-ignore
phpunit.xml export-ignore CONTRIBUTING.md export-ignore
CHANGELOG.md export-ignore README.md export-ignore
CONTRIBUTING.md export-ignore
README.md export-ignore

3
.gitignore vendored
View File

@ -4,7 +4,8 @@ composer.lock
/vendor/ /vendor/
coverage.xml coverage.xml
.phpunit.result.cache .phpunit.result.cache
.php_cs.cache /.php-cs-fixer.php
.php-cs-fixer.cache
.temp/coverage.php .temp/coverage.php
*.swp *.swp
*.swo *.swo

View File

@ -6,7 +6,7 @@ $finder = PhpCsFixer\Finder::create()
->in(__DIR__ . DIRECTORY_SEPARATOR . 'scripts') ->in(__DIR__ . DIRECTORY_SEPARATOR . 'scripts')
->in(__DIR__ . DIRECTORY_SEPARATOR . 'stubs') ->in(__DIR__ . DIRECTORY_SEPARATOR . 'stubs')
->in(__DIR__ . DIRECTORY_SEPARATOR . 'src') ->in(__DIR__ . DIRECTORY_SEPARATOR . 'src')
->append(['.php_cs']); ->append(['.php-cs-fixer.dist.php']);
$rules = [ $rules = [
'@Symfony' => true, '@Symfony' => true,
@ -25,7 +25,7 @@ $rules = [
$rules['increment_style'] = ['style' => 'post']; $rules['increment_style'] = ['style' => 'post'];
return PhpCsFixer\Config::create() return (new PhpCsFixer\Config())
->setUsingCache(true) ->setUsingCache(true)
->setRules($rules) ->setRules($rules)
->setFinder($finder); ->setFinder($finder);