Repository navigation
Expand file tree
/
Copy pathphpstan.dist.neon
More file actions
69 lines (58 loc) · 2.39 KB
/
Copy pathphpstan.dist.neon
File metadata and controls
69 lines (58 loc) · 2.39 KB
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
includes:
- vendor/mspirkov/yii2-phpstan/extension.neon
- vendor/phpstan/phpstan-strict-rules/rules.neon
- vendor/phpstan/phpstan-phpunit/extension.neon
- vendor/shipmonk/phpstan-rules/rules.neon
- vendor/ergebnis/phpstan-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
parameters:
level: max
paths:
- src
- tests
checkBenevolentUnionTypes: true
checkMissingCallableSignature: true
checkTooWideReturnTypesInProtectedAndPublicMethods: true
reportIgnoresWithoutComments: true
reportPossiblyNonexistentConstantArrayOffset: true
reportMaybesInPropertyPhpDocTypes: false
shipmonkRules:
forbidCast:
enabled: true
blacklist!: ['(unset)', '(object)']
classSuffixNaming:
superclassToSuffixMapping!:
\MSpirkov\Yii2\Web\Tests\AbstractTestCase: Test
mspirkovYii2:
noForbiddenYiiAppProperties:
enabled: false
ergebnis:
allRules: false
final:
enabled: true
classesNotRequiredToBeAbstractOrFinal:
- MSpirkov\Yii2\Web\Request
bootstrapFiles:
- tools/phpstan/bootstrap.php
ignoreErrors:
-
message: '#^Missing native return typehint bool\|float\|int\|null#'
count: 1
reportUnmatched: false # fails only for PHP > 7.4
path: src/Request.php
# This is done intentionally here
-
message: '#^Direct use of superglobal \$_COOKIE is forbidden\. Use yii\\web\\Request\:\:cookies for reading cookies or yii\\web\\Response\:\:cookies for writing them instead\.$#'
identifier: mspirkovYii2.noDirectSuperglobals
path: src/CookieManager.php
# This is done intentionally here
-
message: '#^Direct use of superglobal \$_COOKIE is forbidden\. Use yii\\web\\Request\:\:cookies for reading cookies or yii\\web\\Response\:\:cookies for writing them instead\.$#'
identifier: mspirkovYii2.noDirectSuperglobals
path: tests/CookieManagerTest.php
# For the convenience of testing, disable the rule
-
identifier: mspirkovYii2.noYiiAppPropertyMutation
path: tests