Skip to content

Commit

Permalink
Update php-cs-fixer to 3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
deguif committed May 24, 2021
1 parent 7f3d131 commit f5cddc9
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
/tests export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.php_cs.dist export-ignore
/.php-cs-fixer.dist.php export-ignore
/.scrutinizer.yml export-ignore
/phpunit.xml.dist export-ignore
4 changes: 2 additions & 2 deletions .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ jobs:
php-version: '7.4'
coverage: 'none'
extensions: 'json, mbstring, tokenizer'
tools: 'composer-normalize, php-cs-fixer:2.18.3'
tools: 'composer-normalize, php-cs-fixer:3.0.0'

- name: 'Display tools versions'
run: |
composer-normalize --version
php-cs-fixer --version
- name: 'Check PHP code'
run: 'php-cs-fixer fix --diff --dry-run --allow-risky=yes --using-cache=false'
run: 'php-cs-fixer fix --diff --dry-run --allow-risky=yes --using-cache=no'

- name: 'Check composer.json'
run: 'composer-normalize --diff --dry-run --no-update-lock'
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ phpunit.xml
vendor
composer.lock
composer.phar
.php_cs
.php_cs.cache
.php-cs-fixer.php
.php-cs-fixer.cache
22 changes: 11 additions & 11 deletions .php_cs.dist → .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,26 @@
file that was distributed with this source code.
EOF;

return PhpCsFixer\Config::create()
return (new PhpCsFixer\Config())
->setRules([
'@PHP71Migration' => true,
'@PSR2' => true,
'@PhpCsFixer' => true,
'@Symfony' => true,
'array_syntax' => ['syntax' => 'short'],
'combine_consecutive_issets' => true,
'combine_consecutive_unsets' => true,
'header_comment' => ['header' => $header],
'is_null' => true,
'linebreak_after_opening_tag' => true,
'list_syntax' => ['syntax' => 'short'],
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
'method_chaining_indentation' => false,
'native_constant_invocation' => true,
'native_function_invocation' => true,
'native_function_invocation' => [
'include' => ['@all'],
],
'no_alias_functions' => true,
'no_useless_else' => true,
'nullable_type_declaration_for_default_null_value' => true,
'ordered_class_elements' => true,
'ordered_imports' => true,
'php_unit_test_class_requires_covers' => false,
'phpdoc_no_empty_return' => false,
'ternary_to_null_coalescing' => true,
'visibility_required' => ['property', 'method', 'const'],
'visibility_required' => ['elements' => ['property', 'method', 'const']],
])
->setUsingCache(true)
->setFinder(
Expand Down

0 comments on commit f5cddc9

Please sign in to comment.