Setting up php code sniffer (phpcs), PHP Code Beautifier and Fixer, (… #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Automatically Run PHPCBF to fix code style issues | |
on: [push] | |
jobs: | |
phpcbf: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.3 | |
- name: Install Composer dependencies | |
run: composer install --no-progress --prefer-dist --optimize-autoloader | |
- name: Run PHPCBF | |
run: ./vendor/bin/phpcbf --standard=psr12 ./bad.php | |
continue-on-error: true | |
#- name: Commit Changes | |
# uses: stefanzweifel/git-auto-commit-action@v4 |