Skip to content

Commit

Permalink
Add missing dependency of php-cs-fixer and update it
Browse files Browse the repository at this point in the history
  • Loading branch information
alies-dev committed Feb 13, 2022
1 parent d41dc9f commit 21059a7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/php-cs-fixer.yml
Expand Up @@ -19,9 +19,9 @@ jobs:
- name: Fix style
uses: docker://oskarstark/php-cs-fixer-ga
with:
args: --config=.php_cs --allow-risky=yes
args: --config=.php-cs-fixer --allow-risky=yes

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Fix styling
commit_message: Fix styling
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -4,4 +4,4 @@ docs
vendor
coverage
.phpunit.result.cache
.php_cs.cache
.php-cs-fixer.cache
8 changes: 4 additions & 4 deletions .php_cs → .php-cs-fixer.php
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);

$finder = Symfony\Component\Finder\Finder::create()
->in([
Expand All @@ -10,14 +10,14 @@
->ignoreDotFiles(true)
->ignoreVCS(true);

return PhpCsFixer\Config::create()
return (new PhpCsFixer\Config())
->setRules([
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'ordered_imports' => ['sortAlgorithm' => 'alpha'],
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'no_unused_imports' => true,
'not_operator_with_successor_space' => true,
'trailing_comma_in_multiline_array' => true,
'trailing_comma_in_multiline' => true,
'phpdoc_scalar' => true,
'unary_operator_spaces' => true,
'binary_operator_spaces' => true,
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Expand Up @@ -19,9 +19,10 @@
"php": "^7.4 || ^8.0"
},
"require-dev": {
"phpunit/phpunit": "^9.0",
"friendsofphp/php-cs-fixer": "^3.0",
"phpunit/phpunit": "^9.5",
"spatie/phpunit-snapshot-assertions": "^4.0",
"vimeo/psalm": "^4.7"
"vimeo/psalm": "^4.20"
},
"autoload": {
"psr-4": {
Expand Down

0 comments on commit 21059a7

Please sign in to comment.