Repository navigation
Expand file tree
/
Copy pathphpstan.neon.dist
More file actions
96 lines (81 loc) · 3.29 KB
/
Copy pathphpstan.neon.dist
File metadata and controls
96 lines (81 loc) · 3.29 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
includes:
- phpstan-baseline.neon
- phar://phpstan.phar/conf/bleedingEdge.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
rules:
# Hand-picked symplify/phpstan-rules rules (its rule sets are off, see
# parameters.symplify).
- Symplify\PHPStanRules\Rules\StringFileAbsolutePathExistsRule
- Symplify\PHPStanRules\Rules\Complexity\NoArrayMapWithArrayCallableRule
- Symplify\PHPStanRules\Rules\Complexity\ForbiddenArrayMethodCallRule
- Symplify\PHPStanRules\Rules\ForbiddenMultipleClassLikeInOneFileRule
- Symplify\PHPStanRules\Rules\NoDynamicNameRule
- Symplify\PHPStanRules\Rules\NoGlobalConstRule
- Symplify\PHPStanRules\Rules\PreventParentMethodVisibilityOverrideRule
- Symplify\PHPStanRules\Rules\Enum\RequireUniqueEnumConstantRule
- Symplify\PHPStanRules\Rules\UppercaseConstantRule
- Symplify\PHPStanRules\Rules\PHPUnit\PublicStaticDataProviderRule
- Symplify\PHPStanRules\Rules\Explicit\NoMissingVariableDimFetchRule
parameters:
tmpDir: .cache/phpstan
# symplify/phpstan-rules turns several rule sets on by default; this project uses none of them as a set (the `rules:` block picks single rules).
# 14.19 added `modern` and `collections`, both on by default, so the floor is 14.19 and each set is listed.
symplify:
naming: false
complexity: false
configurable: false
static: false
modern: false
symfony: false
symfonyConfig: false
doctrine: false
collections: false
phpunit: false
# See the file's docblock: Larastan's own bootstrap leaves LARAVEL_VERSION undefined on CI, and
# its stub-file extension then aborts the run.
bootstrapFiles:
- phpstan-bootstrap.php
paths:
- src
- tests
- workbench
excludePaths:
# Verbatim analysis input for Laravel Brain and the tracers — deliberately app-shaped
# (framework-convention properties, blade files), not held to package strictness.
- tests/Fixtures
level: max
strictRules:
allRules: true
editorUrl: 'phpstorm://open?file=%%file%%&line=%%line%%'
type_coverage:
return: 100
param: 100
property: 100
constant: 100
type_perfect:
null_over_false: true
narrow_return: true
narrow_param: true
cognitive_complexity:
class: 80
function: 20
# Off at every level, and phpstan-strict-rules does not set them.
checkTooWideReturnTypesInProtectedAndPublicMethods: true
checkTooWideParameterOutInProtectedAndPublicMethods: true
checkTooWideThrowTypesInProtectedAndPublicMethods: true
reportAlwaysTrueInLastCondition: true
reportAnyTypeWideningInVarTag: true
treatPhpDocTypesAsCertain: false
ignoreErrors:
-
identifier: trait.unused
reportUnmatched: false
# Pest's expectation API is marked @internal but is the intended public
# surface for tests. Allow calling it from our tests/.
-
identifier: method.internalClass
paths:
- tests/*
reportUnmatched: false