style: add wp coding standards and fix issues #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: PHPCS and PHPStan Check | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "**.php" | |
pull_request: | |
paths: | |
- "**.php" | |
jobs: | |
phpcs: | |
name: Run PHPCS | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: 🐘 Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: "8.1" | |
- name: 📥 Install PHP dependencies | |
uses: ramsey/composer-install@v2 | |
with: | |
composer-options: "--classmap-authoritative" | |
- name: ✨ PHPCS | |
run: composer analyse:phpcs | |
- name: 🧐 PHPStan | |
run: composer analyse:phpstan |