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 May 6, 2021
1 parent e3ed8a4 commit 346305a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ jobs:
with:
php-version: 7.4
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 @@ -4,5 +4,5 @@
/build/
/var/
/drivers/
/.php_cs.cache
/.php-cs-fixer.cache
/.phpunit.result.cache
10 changes: 6 additions & 4 deletions .php_cs.dist → .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
->notName('*.tpl.php')
;

return PhpCsFixer\Config::create()
->setRules(array(
$config = new PhpCsFixer\Config();

return $config
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'@DoctrineAnnotation' => true,
Expand All @@ -20,7 +22,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 +43,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 346305a

Please sign in to comment.