Skip to content

Commit

Permalink
[minor] update php-cs-fixer to v3
Browse files Browse the repository at this point in the history
  • Loading branch information
kbond committed Jul 14, 2021
1 parent 9a20734 commit 10ae748
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
with:
php-version: 7.2
coverage: none
tools: php-cs-fixer:2.18.3
tools: php-cs-fixer

- name: Check CS
run: php-cs-fixer fix --dry-run --diff --diff-format=udiff
run: php-cs-fixer fix --dry-run --diff
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
/phpunit.xml
/vendor/
/build/
/.php_cs.cache
/.php-cs-fixer.cache
/.phpunit.result.cache
9 changes: 4 additions & 5 deletions .php_cs.dist → .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@

$finder = PhpCsFixer\Finder::create()
->in([__DIR__.'/src', __DIR__.'/tests'])
->notName('*.tpl.php')
;

return PhpCsFixer\Config::create()
->setRules(array(
return (new PhpCsFixer\Config())
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'@DoctrineAnnotation' => true,
Expand All @@ -20,7 +19,7 @@
'imports_order' => ['const', 'class', 'function'],
],
'ordered_class_elements' => true,
'native_function_invocation' => true,
'native_function_invocation' => ['include' => ['@internal']],
'explicit_indirect_variable' => true,
'explicit_string_variable' => true,
'escape_implicit_backslashes' => true,
Expand All @@ -41,7 +40,7 @@
'phpdoc_to_comment' => false,
'function_declaration' => ['closure_function_spacing' => 'none'],
'nullable_type_declaration_for_default_null_value' => true,
))
])
->setRiskyAllowed(true)
->setFinder($finder)
;

0 comments on commit 10ae748

Please sign in to comment.