Skip to content

Commit

Permalink
Fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
antonmedv committed Oct 13, 2024
1 parent 67939df commit 21d73c6
Show file tree
Hide file tree
Showing 202 changed files with 3,144 additions and 1,599 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Run test suite
run: composer phpstan

phpcs:
code-style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -63,5 +63,5 @@ jobs:
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress

- name: Run PHP_CodeSniffer
run: composer phpcs
- name: Run php-cs-fixer
run: composer check
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
*.phar
.phpunit.result.cache
docker-compose.override.yml
.php-cs-fixer.cache
13 changes: 13 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

$finder = (new PhpCsFixer\Finder())
->in(__DIR__ . '/src')
->in(__DIR__ . '/recipe')
->in(__DIR__ . '/contrib')
->in(__DIR__ . '/tests');

return (new PhpCsFixer\Config())
->setRules([
'@PER-CS' => true,
])
->setFinder($finder);
9 changes: 4 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"scripts": {
"test": "pest",
"test:e2e": "pest --config tests/e2e/phpunit-e2e.xml",
"phpcs": "phpcs",
"fix": "phpcbf",
"check": "php-cs-fixer check",
"fix": "php-cs-fixer fix",
"phpstan": "phpstan analyse -c phpstan.neon",
"phpstan:baseline": "@phpstan --generate-baseline tests/phpstan-baseline.neon"
},
Expand All @@ -46,12 +46,11 @@
"ext-json": "*"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.64",
"pestphp/pest": "^3.3",
"phpstan/phpstan": "^1.4",
"phpunit/php-code-coverage": "^11.0",
"phpunit/phpunit": "^11.4",
"slevomat/coding-standard": "^8.0",
"squizlabs/php_codesniffer": "^3.5"
"phpunit/phpunit": "^11.4"
},
"config": {
"sort-packages": true,
Expand Down
Loading

0 comments on commit 21d73c6

Please sign in to comment.