-
Notifications
You must be signed in to change notification settings - Fork 0
/
extension.neon
101 lines (87 loc) · 3.31 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
parameters:
dynamicConstantNames:
- APP_NAMESPACE
- CI_DEBUG
- ENVIRONMENT
universalObjectCratesClasses:
- CodeIgniter\Entity\Entity
codeigniter:
additionalConfigNamespaces:
- CodeIgniter\Config\
additionalModelNamespaces: []
additionalServices: []
notStringFormattedFields: []
checkArgumentTypeOfFactories: true
checkArgumentTypeOfConfig: true
checkArgumentTypeOfModel: true
checkArgumentTypeOfServices: true
parametersSchema:
codeigniter: structure([
additionalConfigNamespaces: listOf(string())
additionalModelNamespaces: listOf(string())
additionalServices: listOf(string())
notStringFormattedFields: arrayOf(string())
checkArgumentTypeOfFactories: bool()
checkArgumentTypeOfConfig: bool()
checkArgumentTypeOfModel: bool()
checkArgumentTypeOfServices: bool()
])
services:
# helpers
factoriesReturnTypeHelper:
class: CodeIgniter\PHPStan\Type\FactoriesReturnTypeHelper
arguments:
additionalConfigNamespaces: %codeigniter.additionalConfigNamespaces%
additionalModelNamespaces: %codeigniter.additionalModelNamespaces%
modelFetchedReturnTypeHelper:
class: CodeIgniter\PHPStan\Type\ModelFetchedReturnTypeHelper
arguments:
notStringFormattedFieldsArray: %codeigniter.notStringFormattedFields%
servicesReturnTypeHelper:
class: CodeIgniter\PHPStan\Type\ServicesReturnTypeHelper
arguments:
additionalServices: %codeigniter.additionalServices%
superglobalRuleHelper:
class: CodeIgniter\PHPStan\Rules\Superglobals\SuperglobalRuleHelper
# Node Visitors
-
class: CodeIgniter\PHPStan\NodeVisitor\ModelReturnTypeTransformVisitor
tags:
- phpstan.parser.richParserNodeVisitor
# DynamicFunctionReturnTypeExtension
-
class: CodeIgniter\PHPStan\Type\FactoriesFunctionReturnTypeExtension
tags:
- phpstan.broker.dynamicFunctionReturnTypeExtension
-
class: CodeIgniter\PHPStan\Type\FakeFunctionReturnTypeExtension
tags:
- phpstan.broker.dynamicFunctionReturnTypeExtension
-
class: CodeIgniter\PHPStan\Type\ServicesFunctionReturnTypeExtension
tags:
- phpstan.broker.dynamicFunctionReturnTypeExtension
# DynamicMethodReturnTypeExtension
-
class: CodeIgniter\PHPStan\Type\ModelFindReturnTypeExtension
tags:
- phpstan.broker.dynamicMethodReturnTypeExtension
# conditional rules
-
class: CodeIgniter\PHPStan\Rules\Functions\FactoriesFunctionArgumentTypeRule
arguments:
checkArgumentTypeOfConfig: %codeigniter.checkArgumentTypeOfConfig%
checkArgumentTypeOfModel: %codeigniter.checkArgumentTypeOfModel%
-
class: CodeIgniter\PHPStan\Rules\Functions\ServicesFunctionArgumentTypeRule
conditionalTags:
CodeIgniter\PHPStan\Rules\Functions\FactoriesFunctionArgumentTypeRule:
phpstan.rules.rule: %codeigniter.checkArgumentTypeOfFactories%
CodeIgniter\PHPStan\Rules\Functions\ServicesFunctionArgumentTypeRule:
phpstan.rules.rule: %codeigniter.checkArgumentTypeOfServices%
rules:
- CodeIgniter\PHPStan\Rules\Classes\CacheHandlerInstantiationRule
- CodeIgniter\PHPStan\Rules\Classes\FrameworkExceptionInstantiationRule
- CodeIgniter\PHPStan\Rules\Functions\NoClassConstFetchOnFactoriesFunctions
- CodeIgniter\PHPStan\Rules\Superglobals\SuperglobalAccessRule
- CodeIgniter\PHPStan\Rules\Superglobals\SuperglobalAssignRule