-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathphpstan.neon
77 lines (73 loc) · 2.21 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
parameters:
level: 8
paths:
- .
excludePaths:
- vendor
- dev
- tests
- node_modules
- release
- dist
- svn
- build
phpVersion: 70400
reportUnmatchedIgnoredErrors: false
checkAlwaysTrueInstanceof: false
checkAlwaysTrueStrictComparison: false
polluteScopeWithLoopInitialAssignments: false
# these are enabled by php-strict, but we don't want them until we review them
checkAlwaysTrueCheckTypeFunctionCall: false
checkAlwaysTrueLooseComparison: false
checkDynamicProperties: false
checkExplicitMixedMissingReturn: false
checkFunctionNameCase: false
checkInternalClassCaseSensitivity: false
reportMaybesInMethodSignatures: false
reportStaticMethodSignatures: false
reportMaybesInPropertyPhpDocTypes: false
reportWrongPhpDocTypeInVarTag: false
parallel:
maximumNumberOfProcesses: 4
strictRules:
allRules: false
switchConditionsMatchingType: true # mostly needed the extension for this, for now
disallowedLooseComparison: false
booleansInConditions: false
uselessCast: false
requireParentConstructorCall: false
disallowedConstructs: false
overwriteVariablesWithLoop: false
closureUsesThis: false
matchingInheritedMethodNames: false
numericOperandsInArithmeticOperators: false
strictCalls: false
noVariableVariables: false
disallowedFunctionCalls:
-
function: 'var_dump()'
message: 'forgot about it? if needed just add a phpstan ignore line'
-
function: 'print_r()'
message: 'forgot about it? if needed just add a phpstan ignore line'
-
function: 'error_log()'
message: 'forgot about it? if needed just add a phpstan ignore line'
-
function: 'debug_print_var()'
message: 'forgot about it? if needed just add a phpstan ignore line'
services:
-
class: Automattic\Gravatar\PHPStanExtensions\ArrayMergeTypeNodeResolverExtension
tags:
- phpstan.phpDoc.typeNodeResolverExtension
-
class: Automattic\Gravatar\PHPStanExtensions\OptionalPropertiesOfTypeNodeResolverExtension
tags:
- phpstan.phpDoc.typeNodeResolverExtension
-
class: Automattic\Gravatar\PHPStanExtensions\PropertiesOfTypeNodeResolverExtension
tags:
- phpstan.phpDoc.typeNodeResolverExtension
errorFormatter.gravatar:
class: Automattic\Gravatar\PHPStanExtensions\GravatarErrorFormatter