Skip to content

Commit 6de7ec1

Browse files
committed
chore: config PHPStan
1 parent 3edde02 commit 6de7ec1

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

composer.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
}
3636
},
3737
"scripts": {
38+
"analyze": [
39+
"bash -c \"XDEBUG_MODE=off phpstan analyse\""
40+
],
41+
"sa": "@analyze",
3842
"cs": "php-cs-fixer fix --ansi --verbose --dry-run --diff",
3943
"cs-fix": "php-cs-fixer fix --ansi --verbose --diff",
4044
"test": "phpunit"

phpstan.neon.dist

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
parameters:
2+
tmpDir: build/phpstan
3+
level: 5
4+
paths:
5+
- src/
6+
- tests/
7+
bootstrapFiles:
8+
- vendor/codeigniter4/framework/system/Test/bootstrap.php
9+
excludePaths:
10+
- app/Config/Routes.php
11+
- app/Views/*
12+
ignoreErrors:
13+
universalObjectCratesClasses:
14+
- CodeIgniter\Entity
15+
- CodeIgniter\Entity\Entity
16+
- Faker\Generator
17+
scanDirectories:
18+
- vendor/codeigniter4/framework/system/Helpers
19+
dynamicConstantNames:
20+
- APP_NAMESPACE
21+
- CI_DEBUG
22+
- ENVIRONMENT

0 commit comments

Comments
 (0)