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

4
.gitattributes vendored
View File

@ -3,13 +3,11 @@
/tests export-ignore
/scripts export-ignore
/.github export-ignore
/.php_cs export-ignore
/.php-cs-fixer.dist.php export-ignore
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.travis.yml export-ignore
phpstan.neon export-ignore
rector.yaml export-ignore
phpunit.xml export-ignore
CHANGELOG.md export-ignore
CONTRIBUTING.md export-ignore

3
.gitignore vendored
View File

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

View File

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