-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphpstan.neon
91 lines (77 loc) · 3.41 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
includes:
- ../../../vendor/phpstan/phpstan-deprecation-rules/rules.neon
- ../../../vendor/thecodingmachine/phpstan-safe-rule/phpstan-safe-rule.neon
- ../../../vendor/phpstan/phpstan-strict-rules/rules.neon
- ../../../vendor/symplify/phpstan-rules/config/services/services.neon
# - ../../../vendor/symplify/phpstan-rules/config/naming-rules.neon
# ../../../ is required because this file is use as base and we want to include all those extra rules
services:
-
class: SlamPhpStan\UnusedVariableRule
tags:
- phpstan.rules.rule
-
class: Lycheeorg\PHPStan\Rules\DisallowedConstructs\DisallowedBooleanCastRule
tags:
- phpstan.rules.rule
-
class: Lycheeorg\PHPStan\Rules\DisallowedConstructs\DisallowedBooleanConversionRule
tags:
- phpstan.rules.rules
- # https://github.com/symplify/phpstan-rules/blob/main/docs/rules_overview.md#checkclassnamespacefollowpsr4rule
class: Symplify\PHPStanRules\Rules\CheckClassNamespaceFollowPsr4Rule
tags:
- phpstan.rules.rule
- # https://github.com/symplify/phpstan-rules/blob/main/docs/rules_overview.md#checkrequiredinterfaceincontractnamespacerule
class: Symplify\PHPStanRules\Rules\CheckRequiredInterfaceInContractNamespaceRule
tags:
- phpstan.rules.rule
- # https://github.com/symplify/phpstan-rules/blob/main/docs/rules_overview.md#forbiddenfunccallrule
class: Symplify\PHPStanRules\Rules\ForbiddenFuncCallRule
tags:
- phpstan.rules.rule
arguments:
forbiddenFunctions:
eval: 'eval is not allowed'
dd: 'seems you missed some dd debugging function'
dump: 'seems you missed some dump debugging function'
- # https://github.com/symplify/phpstan-rules/blob/main/docs/rules_overview.md#forbiddenmultipleclasslikeinonefilerule
class: Symplify\PHPStanRules\Rules\ForbiddenMultipleClassLikeInOneFileRule
tags:
- phpstan.rules.rule
# - # https://github.com/symplify/phpstan-rules/blob/main/docs/rules_overview.md#forbiddenparamtyperemovalrule
# class: Symplify\PHPStanRules\Rules\ForbiddenParamTypeRemovalRule
# tags:
# - phpstan.rules.rule
- # https://github.com/symplify/phpstan-rules/blob/main/docs/rules_overview.md#noissetonobjectrule
class: Symplify\PHPStanRules\Rules\NoIssetOnObjectRule
tags:
- phpstan.rules.rule
- # https://github.com/symplify/phpstan-rules/blob/main/docs/rules_overview.md#prefixabstractclassrule
class: Lycheeorg\PHPStan\Rules\NamingConventions\PrefixAbstractClassRule
tags:
- phpstan.rules.rule
- # https://github.com/symplify/phpstan-rules/blob/main/docs/rules_overview.md#nonullablearraypropertyrule
class: Symplify\PHPStanRules\Rules\NoNullableArrayPropertyRule
tags:
- phpstan.rules.rule
- # https://github.com/symplify/phpstan-rules/blob/main/docs/rules_overview.md#uppercaseconstantrule
class: Symplify\PHPStanRules\Rules\UppercaseConstantRule
tags:
- phpstan.rules.rule
# - # https://github.com/symplify/phpstan-rules/blob/main/docs/rules_overview.md#switchtomatchspotterrule
# class: Symplify\PHPStanRules\Rules\Spotter\SwitchToMatchSpotterRule
# tags:
# - phpstan.rules.rule
- # https://github.com/symplify/phpstan-rules/blob/main/docs/rules_overview.md#forbiddenparamtyperemovalrule
class: Symplify\PHPStanRules\Rules\ForbiddenNodeRule
tags:
- phpstan.rules.rule
arguments:
forbiddenNodes:
- PhpParser\Node\Expr\ErrorSuppress # disallow the use of '@' to silence errors
parameters:
level: 7
reportMaybesInPropertyPhpDocTypes: false
featureToggles:
bleedingEdge: true