-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathphpstan.neon
93 lines (86 loc) · 2.85 KB
/
phpstan.neon
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
parameters:
paths:
- packages
- dev
excludePaths:
- dev/bootstrap
- dev/storage
- dev/vendor (?)
scanDirectories:
- vendor/larastan/larastan
# The level 10 is the highest level
level: 10
# Settings
phpVersion: 80300
rememberPossiblyImpureFunctionValues: false
checkMissingOverrideMethodAttribute: true
checkMissingCallableSignature: true
checkOctaneCompatibility: true
checkBenevolentUnionTypes: true
checkUninitializedProperties: true
noEnvCallsOutsideOfConfig: true
# Package
classMustBeFinal:
classes:
- PHPUnit\Framework\TestCase
classMustBeInternal:
classes:
- PHPUnit\Framework\TestCase
ignored:
- Tests\TestCase
- LastDragon_ru\LaraASP\Testing\TestCase
# Forbidden
disallowedNamespaces:
-
namespace: Illuminate\Support\Facades\*
exclude:
- Illuminate\Support\Facades\Date
allowIn:
- packages/dev/src/App/*
- packages/*/docs/*
disallowedFunctionCalls:
-
function: 'strlen()'
message: 'use mb_strlen() instead'
-
function: 'substr()'
message: 'use mb_substr() instead'
-
function: 'trim()'
message: 'use mb_trim() instead'
-
function: 'ltrim()'
message: 'use mb_ltrim() instead'
-
function: 'rtrim()'
message: 'use mb_rtrim() instead'
-
function: 'str_pad()'
message: 'use mb_str_pad() instead'
-
function: 'lcfirst()'
message: 'use mb_lcfirst() instead'
-
function: 'ucfirst()'
message: 'use mb_ucfirst() instead'
includes:
# Vendor
- ./vendor/phpstan/phpstan/conf/bleedingEdge.neon
- ./vendor/phpstan/phpstan-mockery/extension.neon
- ./vendor/phpstan/phpstan-phpunit/extension.neon
- ./vendor/phpstan/phpstan-phpunit/rules.neon
- ./vendor/phpstan/phpstan-strict-rules/rules.neon
- ./vendor/spaze/phpstan-disallowed-calls/extension.neon
- ./vendor/spaze/phpstan-disallowed-calls/disallowed-dangerous-calls.neon
- ./vendor/spaze/phpstan-disallowed-calls/disallowed-execution-calls.neon
- ./vendor/spaze/phpstan-disallowed-calls/disallowed-insecure-calls.neon
- ./vendor/spaze/phpstan-disallowed-calls/disallowed-loose-calls.neon
# Package
- ./phpstan-larastan.neon
- ./packages/dev/src/PhpStan/Container/extension.neon
- ./packages/dev/src/PhpStan/ClassConstantMustBeTyped/extension.neon
- ./packages/dev/src/PhpStan/ClassMustBeFinal/extension.neon
- ./packages/dev/src/PhpStan/ClassMustBeInternal/extension.neon
# Baseline
- phpstan-baseline-well-known.neon
- phpstan-baseline.neon