Skip to content

Commit 8819928

Browse files
authored
Merge pull request #61 from neo-garaix/add-php-stan
Add PHP Stan
2 parents 5d29f80 + bf49d31 commit 8819928

File tree

13 files changed

+1201
-182
lines changed

13 files changed

+1201
-182
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: PHPStan 🐘 💣
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
eslint:
9+
name: "PHPStan 💣"
10+
runs-on: ubuntu-latest
11+
steps:
12+
13+
- uses: actions/checkout@v4
14+
15+
- name: Install modules
16+
run: composer install
17+
18+
- name: Run PHPStan
19+
run: composer phpstan

CONTRIBUTING.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,11 @@ If you want to fix the issues automatically, you can run the following command:
6464
```bash
6565
composer cs-fix
6666
```
67+
68+
### PHPStan for PHP
69+
70+
If you want to see all your issues on the PHP code through PHPStan, you can run the following command:
71+
72+
```bash
73+
composer phpstan
74+
```

composer.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,19 @@
3333
}
3434
},
3535
"require-dev": {
36-
"friendsofphp/php-cs-fixer": "^3.68"
36+
"friendsofphp/php-cs-fixer": "^3.68",
37+
"phpstan/phpstan": "^2.1",
38+
"jelix/jelix": "^1.8",
39+
"proj4php/proj4php": "^2.0"
3740
},
3841
"scripts": {
3942
"cs-fix": "./vendor/bin/php-cs-fixer fix",
40-
"cs-check": "./vendor/bin/php-cs-fixer fix --dry-run --diff"
43+
"cs-check": "./vendor/bin/php-cs-fixer fix --dry-run --diff",
44+
"phpstan": "./vendor/bin/phpstan analyse -c phpstan.neon"
45+
},
46+
"config": {
47+
"allow-plugins": {
48+
"jelix/composer-module-setup": true
49+
}
4150
}
4251
}

0 commit comments

Comments
 (0)