-
Notifications
You must be signed in to change notification settings - Fork 9
/
extension.neon
115 lines (96 loc) · 3.7 KB
/
extension.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
parameters:
exceptionRules:
reportUnusedCatchesOfUncheckedExceptions: false
reportUnusedCheckedThrowsInSubtypes: false
reportCheckedThrowsInGlobalScope: true
checkedExceptions: []
uncheckedExceptions: []
methodThrowTypeDeclarations: []
functionThrowTypeDeclarations: []
methodWhitelist: []
parametersSchema:
exceptionRules: structure([
reportUnusedCatchesOfUncheckedExceptions: bool()
reportUnusedCheckedThrowsInSubtypes: bool()
reportCheckedThrowsInGlobalScope: bool()
checkedExceptions: listOf(string())
uncheckedExceptions: listOf(string())
methodThrowTypeDeclarations: arrayOf(arrayOf(listOf(string())))
functionThrowTypeDeclarations: arrayOf(listOf(string()))
methodWhitelist: arrayOf(string())
])
services:
-
class: Pepakriz\PHPStanExceptionRules\DynamicThrowTypeServiceFactory
-
class: Pepakriz\PHPStanExceptionRules\DynamicThrowTypeService
factory: @Pepakriz\PHPStanExceptionRules\DynamicThrowTypeServiceFactory::create
-
class: Pepakriz\PHPStanExceptionRules\ThrowsAnnotationReader
arguments:
phpParser: @defaultAnalysisParser
-
class: Pepakriz\PHPStanExceptionRules\CheckedExceptionService
factory: Pepakriz\PHPStanExceptionRules\CheckedExceptionService(%exceptionRules.checkedExceptions%, %exceptionRules.uncheckedExceptions%)
-
class: Pepakriz\PHPStanExceptionRules\DefaultThrowTypeService
factory: Pepakriz\PHPStanExceptionRules\DefaultThrowTypeService(%exceptionRules.methodThrowTypeDeclarations%, %exceptionRules.functionThrowTypeDeclarations%)
-
class: Pepakriz\PHPStanExceptionRules\DefaultThrowTypeExtension
tags:
- exceptionRules.dynamicMethodThrowTypeExtension
- exceptionRules.dynamicStaticMethodThrowTypeExtension
- exceptionRules.dynamicConstructorThrowTypeExtension
- exceptionRules.dynamicFunctionThrowTypeExtension
-
class: Pepakriz\PHPStanExceptionRules\Extension\ReflectionExtension
tags:
- exceptionRules.dynamicConstructorThrowTypeExtension
-
class: Pepakriz\PHPStanExceptionRules\Extension\DateTimeExtension
tags:
- exceptionRules.dynamicConstructorThrowTypeExtension
-
class: Pepakriz\PHPStanExceptionRules\Extension\DateIntervalExtension
tags:
- exceptionRules.dynamicConstructorThrowTypeExtension
-
class: Pepakriz\PHPStanExceptionRules\Extension\SimpleXMLElementExtension
tags:
- exceptionRules.dynamicConstructorThrowTypeExtension
-
class: Pepakriz\PHPStanExceptionRules\Extension\SplFileObjectExtension
tags:
- exceptionRules.dynamicConstructorThrowTypeExtension
-
class: Pepakriz\PHPStanExceptionRules\Extension\DOMDocumentExtension
tags:
- exceptionRules.dynamicMethodThrowTypeExtension
-
class: Pepakriz\PHPStanExceptionRules\Extension\JsonEncodeDecodeExtension
tags:
- exceptionRules.dynamicFunctionThrowTypeExtension
-
class: Pepakriz\PHPStanExceptionRules\Extension\IntdivExtension
tags:
- exceptionRules.dynamicFunctionThrowTypeExtension
-
class: Pepakriz\PHPStanExceptionRules\Rules\ThrowsPhpDocRule
arguments:
reportUnusedCatchesOfUncheckedExceptions: %exceptionRules.reportUnusedCatchesOfUncheckedExceptions%
reportUnusedCheckedThrowsInSubtypes: %exceptionRules.reportUnusedCheckedThrowsInSubtypes%
reportCheckedThrowsInGlobalScope: %exceptionRules.reportCheckedThrowsInGlobalScope%
methodWhitelist: %exceptionRules.methodWhitelist%
tags: [phpstan.rules.rule]
-
class: Pepakriz\PHPStanExceptionRules\Rules\ThrowsPhpDocInheritanceRule
tags: [phpstan.rules.rule]
-
class: Pepakriz\PHPStanExceptionRules\Rules\UnreachableCatchRule
tags: [phpstan.rules.rule]
-
class: Pepakriz\PHPStanExceptionRules\Rules\DeadCatchUnionRule
tags: [phpstan.rules.rule]
-
class: Pepakriz\PHPStanExceptionRules\Rules\UselessThrowsPhpDocRule
tags: [phpstan.rules.rule]