Skip to content

Commit 87704e9

Browse files
Create phpstan.yml
Signed-off-by: Max Barrett <maximilliangroup@gmail.com>
1 parent d245d1d commit 87704e9

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/phpstan.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: PHPStan
2+
3+
on:
4+
push:
5+
paths:
6+
- '**.php'
7+
- 'phpstan.neon.dist'
8+
pull_request:
9+
paths:
10+
- '**.php'
11+
- 'phpstan.neon.dist'
12+
13+
jobs:
14+
phpstan:
15+
name: Static Analysis (PHPStan)
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
22+
- name: Setup PHP
23+
uses: shivammathur/setup-php@v2
24+
with:
25+
php-version: '8.2'
26+
extensions: mbstring, json
27+
coverage: none
28+
29+
- name: Install dependencies (if needed)
30+
run: |
31+
if [ -f composer.json ]; then
32+
composer install --no-interaction --prefer-dist
33+
fi
34+
35+
- name: Run PHPStan
36+
run: vendor/bin/phpstan analyse --configuration=phpstan.neon.dist

0 commit comments

Comments
 (0)