diff --git a/.gitattributes b/.gitattributes index e67cc2b..15352c1 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6,7 +6,6 @@ /.gitattributes export-ignore /.github export-ignore /.gitignore export-ignore -/.php-cs-fixer.dist.php export-ignore /PULL_REQUEST_TEMPLATE.md export-ignore /ISSUE_TEMPLATE.md export-ignore /phpunit.xml.dist export-ignore diff --git a/.github/workflows/codestyle.yml b/.github/workflows/codestyle.yml index b673c01..3b1e4f6 100644 --- a/.github/workflows/codestyle.yml +++ b/.github/workflows/codestyle.yml @@ -1,6 +1,10 @@ name: Check code style -on: [ push, pull_request ] +on: + pull_request: + push: + paths: + - '**.php' jobs: php-style: @@ -11,6 +15,6 @@ jobs: uses: actions/checkout@v4 - name: Check style - uses: docker://oskarstark/php-cs-fixer-ga + uses: aglipanci/laravel-pint-action@v2 with: - args: -v --dry-run --using-cache=no + testMode: true diff --git a/.gitignore b/.gitignore index 03b0fb6..efb843c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,5 @@ composer.phar composer.lock /vendor/ /.idea/ -/.php-cs-fixer.cache /.phpunit.result.cache /phpunit.xml diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php deleted file mode 100644 index 681b14c..0000000 --- a/.php-cs-fixer.dist.php +++ /dev/null @@ -1,22 +0,0 @@ -in([ - __DIR__.'/config', - __DIR__.'/src', - __DIR__.'/tests', - ]) -; - -return (new PhpCsFixer\Config()) - ->setFinder($finder) - ->setRules([ - '@Symfony' => true, - 'array_syntax' => ['syntax' => 'short'], - 'linebreak_after_opening_tag' => true, - 'ordered_imports' => true, - 'phpdoc_add_missing_param_annotation' => true, - 'phpdoc_order' => true, - 'yoda_style' => false, - ]) -; diff --git a/composer.json b/composer.json index 95999e0..7146d49 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.0", + "laravel/pint": "^1.15", "mockery/mockery": "^1.5", "phpunit/phpunit": "^9.5" }, @@ -40,8 +40,8 @@ }, "scripts": { "test": "phpunit", - "check-style": "php-cs-fixer fix --dry-run -v", - "fix-style": "php-cs-fixer fix" + "check-style": "pint --test", + "fix-style": "pint" }, "extra": { "branch-alias": {