Skip to content

Commit

Permalink
Add PHP CS Fixer and run it in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
matks committed Aug 17, 2022
1 parent 065632b commit 366594a
Show file tree
Hide file tree
Showing 4 changed files with 1,691 additions and 3 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
on: [push, pull_request]
name: PHP
jobs:
php-cs-fixer:
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4

- name: Checkout
uses: actions/checkout@v3

- name: Composer Install
run: composer install --ansi --prefer-dist --no-interaction --no-progress

- name: Run php-cs-fixer
run: ./vendor/bin/php-cs-fixer fix . --dry-run --diff
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
vendor/
docs/
docs/
.php-cs-fixer.cache
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,8 @@
"knplabs/github-api": "^2.12",
"php-http/guzzle6-adapter": "^1.1",
"nikic/php-parser": "^4.5"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.9"
}
}
Loading

0 comments on commit 366594a

Please sign in to comment.