Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PHP CS Fixer and run it in CI #13

Merged
merged 1 commit into from
Aug 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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