Skip to content

Commit

Permalink
upgrade php cs fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
frederikbosch committed Feb 18, 2022
1 parent 0f9096a commit 22a5b82
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
/vendor/
/composer.lock
/example/config.php
/.php_cs.cache
/.php-cs-fixer.cache
/.phpunit.result.cache
4 changes: 2 additions & 2 deletions .php_cs.dist → .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php
return PhpCsFixer\Config::create()
return (new PhpCsFixer\Config())
->setRules([
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'declare_strict_types' => true,
'yoda_style' => false,
'native_function_invocation' => true,
'native_function_invocation' => ['include' => ['@all']],
'phpdoc_no_package' => true,
'no_empty_phpdoc' => true,
'no_blank_lines_after_class_opening' => true,
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"phpunit/phpunit": "^8.5.3",
"phpstan/phpstan": "^0.12.48",
"phpstan/phpstan-phpunit": "^0.12.6",
"friendsofphp/php-cs-fixer": "^2.9",
"friendsofphp/php-cs-fixer": "^3.0",
"predis/predis": "^1.0",
"psr/log": "^1.0",
"ext-openssl": "*"
Expand All @@ -38,11 +38,11 @@
},
"scripts": {
"lint": [
"./vendor/bin/php-cs-fixer fix --verbose --config .php_cs.dist ./src ./test"
"./vendor/bin/php-cs-fixer fix --verbose --config .php-cs-fixer.dist.php ./src ./test"
],
"test": [
"./vendor/bin/phpunit -c phpunit.xml",
"./vendor/bin/php-cs-fixer fix --verbose --dry-run --config .php_cs.dist ./src ./test",
"./vendor/bin/php-cs-fixer fix --verbose --dry-run --config .php-cs-fixer.dist.php ./src ./test",
"./vendor/bin/phpstan analyse -l max src",
"./vendor/bin/phpstan analyse -l 5 -c .phpstan.test.neon test"
]
Expand Down

0 comments on commit 22a5b82

Please sign in to comment.