mirror of
https://github.com/coollabsio/coolify.git
synced 2026-03-11 08:55:47 +00:00
chore(tooling): improve phpstan config
- update rules to the latest Larastan and PHPStan version - group rules with comments for easier updating in the future - reorder rules and includes
This commit is contained in:
parent
d57c876719
commit
6abf9cff02
1 changed files with 15 additions and 8 deletions
23
phpstan.neon
23
phpstan.neon
|
|
@ -1,23 +1,30 @@
|
|||
includes:
|
||||
- vendor/phpstan/phpstan/conf/bleedingEdge.neon
|
||||
- vendor/phpstan/phpstan-strict-rules/rules.neon
|
||||
- vendor/phpstan/phpstan-deprecation-rules/rules.neon
|
||||
- vendor/larastan/larastan/extension.neon
|
||||
- vendor/nesbot/carbon/extension.neon
|
||||
- vendor/phpstan/phpstan-deprecation-rules/rules.neon
|
||||
- vendor/phpstan/phpstan-strict-rules/rules.neon
|
||||
|
||||
parameters:
|
||||
level: max
|
||||
checkModelProperties: true
|
||||
checkOctaneCompatibility: true
|
||||
checkMissingCallableSignature: true
|
||||
|
||||
# Additional Core PHPStan Rules
|
||||
checkTooWideReturnTypesInProtectedAndPublicMethods: true
|
||||
rememberPossiblyImpureFunctionValues: false
|
||||
checkBenevolentUnionTypes: true
|
||||
reportPossiblyNonexistentGeneralArrayOffset: true
|
||||
reportPossiblyNonexistentConstantArrayOffset: true
|
||||
reportAlwaysTrueInLastCondition: true
|
||||
reportAnyTypeWideningInVarTag: true
|
||||
checkMissingCallableSignature: true
|
||||
tipsOfTheDay: false
|
||||
|
||||
# Additional Larastan Rules
|
||||
noUnnecessaryEnumerableToArrayCalls: true
|
||||
checkModelProperties: true
|
||||
checkOctaneCompatibility: true
|
||||
checkModelMethodVisibility: true
|
||||
checkAuthCallsWhenInRequestScope: true
|
||||
checkConfigTypes: true
|
||||
|
||||
tmpDir: ./storage/phpstan
|
||||
paths:
|
||||
- app
|
||||
|
|
@ -32,4 +39,4 @@ parameters:
|
|||
strictRules:
|
||||
strictArrayFilter: false
|
||||
ignoreErrors:
|
||||
- '#Dynamic call to static method Illuminate\\Http\\Request::validate\(\)#'
|
||||
# - '#Dynamic call to static method Illuminate\\Http\\Request::validate\(\)#'
|
||||
|
|
|
|||
Loading…
Reference in a new issue