-
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathpsalm-baseline.xml
More file actions
289 lines (288 loc) · 15.7 KB
/
psalm-baseline.xml
File metadata and controls
289 lines (288 loc) · 15.7 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="6.13.1@1e3b7f0a8ab32b23197b91107adc0a7ed8a05b51">
<file src="src/ComponentInstaller.php">
<InvalidArgument>
<code><![CDATA[new Collection(array_keys(self::PACKAGE_TYPES))]]></code>
</InvalidArgument>
<InvalidReturnStatement>
<code><![CDATA[(new Collection(self::PACKAGE_TYPES))
->filter(fn(string $configKey) => isset($extra[$configKey]))]]></code>
</InvalidReturnStatement>
<InvalidReturnType>
<code><![CDATA[Collection<InjectorInterface::TYPE_*,non-empty-string>]]></code>
</InvalidReturnType>
<PossiblyNullArgument>
<code><![CDATA[preg_replace('/[\s"\']/', '', $m[1])]]></code>
</PossiblyNullArgument>
</file>
<file src="src/ConfigDiscovery.php">
<InvalidReturnStatement>
<code><![CDATA[new Collection([
new ConfigOption('Do not inject', new Injector\NoopInjector()),
...$options->toArray(),
])]]></code>
</InvalidReturnStatement>
<InvalidReturnType>
<code><![CDATA[Collection<int,ConfigOption>]]></code>
</InvalidReturnType>
</file>
<file src="src/ConfigDiscovery/AbstractDiscovery.php">
<PossiblyFalseArgument>
<code><![CDATA[$config]]></code>
</PossiblyFalseArgument>
</file>
<file src="src/ConfigDiscovery/DevelopmentWorkConfig.php">
<PossiblyUnusedMethod>
<code><![CDATA[__construct]]></code>
</PossiblyUnusedMethod>
</file>
<file src="src/ConfigDiscovery/MezzioDevelopmentConfig.php">
<PossiblyUnusedMethod>
<code><![CDATA[__construct]]></code>
</PossiblyUnusedMethod>
</file>
<file src="src/ConfigDiscovery/MezzioDevelopmentWorkConfig.php">
<PossiblyUnusedMethod>
<code><![CDATA[__construct]]></code>
</PossiblyUnusedMethod>
</file>
<file src="src/Injector/AbstractInjector.php">
<ArgumentTypeCoercion>
<code><![CDATA[sprintf($this->isRegisteredPattern, preg_quote($dependency, '/'))]]></code>
<code><![CDATA[sprintf($this->isRegisteredPattern, preg_quote($module, '/'))]]></code>
<code><![CDATA[sprintf($this->isRegisteredPattern, preg_quote($package, '/'))]]></code>
<code><![CDATA[sprintf($this->isRegisteredPattern, preg_quote(addslashes($package), '/'))]]></code>
<code><![CDATA[sprintf($this->removalPatterns['pattern'], preg_quote($package))]]></code>
</ArgumentTypeCoercion>
<PossiblyFalseArgument>
<code><![CDATA[$config]]></code>
<code><![CDATA[$config]]></code>
<code><![CDATA[$config]]></code>
<code><![CDATA[$config]]></code>
<code><![CDATA[$config]]></code>
<code><![CDATA[$config]]></code>
<code><![CDATA[$config]]></code>
<code><![CDATA[$config]]></code>
</PossiblyFalseArgument>
<PossiblyNullArgument>
<code><![CDATA[$config]]></code>
<code><![CDATA[$config]]></code>
<code><![CDATA[$config]]></code>
<code><![CDATA[$config]]></code>
<code><![CDATA[$config]]></code>
</PossiblyNullArgument>
<RiskyTruthyFalsyComparison>
<code><![CDATA[$firstApplicationModule = $this->findFirstEnabledApplicationModule($this->applicationModules, $config)]]></code>
</RiskyTruthyFalsyComparison>
</file>
<file src="src/Injector/ConfigInjectorChain.php">
<PossiblyNullReference>
<code><![CDATA[getTypesAllowed]]></code>
</PossiblyNullReference>
</file>
<file src="src/Injector/DevelopmentConfigInjector.php">
<PossiblyUnusedMethod>
<code><![CDATA[__construct]]></code>
</PossiblyUnusedMethod>
</file>
<file src="src/Injector/DevelopmentWorkConfigInjector.php">
<PossiblyUnusedMethod>
<code><![CDATA[__construct]]></code>
</PossiblyUnusedMethod>
</file>
<file src="src/Injector/MezzioConfigInjector.php">
<PossiblyUnusedMethod>
<code><![CDATA[__construct]]></code>
</PossiblyUnusedMethod>
</file>
<file src="src/Injector/MezzioDevelopmentConfigInjector.php">
<PossiblyUnusedMethod>
<code><![CDATA[__construct]]></code>
</PossiblyUnusedMethod>
</file>
<file src="src/Injector/MezzioDevelopmentWorkConfigInjector.php">
<PossiblyUnusedMethod>
<code><![CDATA[__construct]]></code>
</PossiblyUnusedMethod>
</file>
<file src="test/ComponentInstallerTest.php">
<PossiblyFalseArgument>
<code><![CDATA[$config]]></code>
<code><![CDATA[$config]]></code>
<code><![CDATA[$config]]></code>
<code><![CDATA[$config]]></code>
<code><![CDATA[$config]]></code>
<code><![CDATA[$config]]></code>
<code><![CDATA[$config]]></code>
<code><![CDATA[$config]]></code>
<code><![CDATA[$config]]></code>
<code><![CDATA[$config]]></code>
<code><![CDATA[$config]]></code>
<code><![CDATA[$config]]></code>
<code><![CDATA[$config]]></code>
<code><![CDATA[$config]]></code>
</PossiblyFalseArgument>
<PossiblyFalseReference>
<code><![CDATA[matches]]></code>
<code><![CDATA[matches]]></code>
<code><![CDATA[toString]]></code>
<code><![CDATA[toString]]></code>
</PossiblyFalseReference>
</file>
<file src="test/ConfigDiscoveryTest.php">
<InvalidPropertyAssignmentValue>
<code><![CDATA[new Collection([
InjectorInterface::TYPE_CONFIG_PROVIDER,
InjectorInterface::TYPE_COMPONENT,
InjectorInterface::TYPE_MODULE,
])]]></code>
</InvalidPropertyAssignmentValue>
</file>
<file src="test/Injector/AbstractConfigAggregatorInjectorTestCase.php">
<InvalidNullableReturnType>
<code><![CDATA[string]]></code>
</InvalidNullableReturnType>
<LessSpecificReturnStatement>
<code><![CDATA[[
'fqcn-long-array' => [$baseContentsFqcnLongArray, $expectedContentsFqcnLongArray],
'global-long-array' => [$baseContentsGloballyQualifiedLongArray, $expectedContentsGloballyQualifiedLongArray],
'import-long-array' => [$baseContentsImportLongArray, $expectedContentsImportLongArray],
'import-long-array-alt-indent' => [$baseContentsImportLongArrayAltIndent, $expectedContentsImportLongArrayAltIndent],
'fqcn-short-array' => [$baseContentsFqcnShortArray, $expectedContentsFqcnShortArray],
'global-short-array' => [$baseContentsGloballyQualifiedShortArray, $expectedContentsGloballyQualifiedShortArray],
'import-short-array' => [$baseContentsImportShortArray, $expectedContentsImportShortArray],
'import-short-array-alt-indent' => [$baseContentsImportShortArrayAltIndent, $expectedContentsImportShortArrayAltIndent],
]]]></code>
<code><![CDATA[[
'fqcn-long-array' => [ConfigAggregatorInjector::TYPE_CONFIG_PROVIDER, $baseContentsFqcnLongArray, $expectedContentsFqcnLongArray],
'global-long-array' => [ConfigAggregatorInjector::TYPE_CONFIG_PROVIDER, $baseContentsGloballyQualifiedLongArray, $expectedContentsGloballyQualifiedLongArray],
'import-long-array' => [ConfigAggregatorInjector::TYPE_CONFIG_PROVIDER, $baseContentsImportLongArray, $expectedContentsImportLongArray],
'import-long-array-alt-indent' => [ConfigAggregatorInjector::TYPE_CONFIG_PROVIDER, $baseContentsImportLongArrayAltIndent, $expectedContentsImportLongArrayAltIndent],
'fqcn-short-array' => [ConfigAggregatorInjector::TYPE_CONFIG_PROVIDER, $baseContentsFqcnShortArray, $expectedContentsFqcnShortArray],
'global-short-array' => [ConfigAggregatorInjector::TYPE_CONFIG_PROVIDER, $baseContentsGloballyQualifiedShortArray, $expectedContentsGloballyQualifiedShortArray],
'import-short-array' => [ConfigAggregatorInjector::TYPE_CONFIG_PROVIDER, $baseContentsImportShortArray, $expectedContentsImportShortArray],
'import-short-array-alt-indent' => [ConfigAggregatorInjector::TYPE_CONFIG_PROVIDER, $baseContentsImportShortArrayAltIndent, $expectedContentsImportShortArrayAltIndent],
// see https://github.com/laminas/laminas-component-installer/issues/21
'inject-only-first-occurence' => [ConfigAggregatorInjector::TYPE_CONFIG_PROVIDER, $injectOnlyFirstOccurrenceInitial, $injectOnlyFirstOccurrenceExpected],
]]]></code>
<code><![CDATA[[
'fqcn-long-array' => [$fqcnLongArray, ConfigAggregatorInjector::TYPE_CONFIG_PROVIDER],
'global-long-array' => [$globallyQualifiedLongArray, ConfigAggregatorInjector::TYPE_CONFIG_PROVIDER],
'import-long-array' => [$importLongArray, ConfigAggregatorInjector::TYPE_CONFIG_PROVIDER],
'fqcn-short-array' => [$fqcnShortArray, ConfigAggregatorInjector::TYPE_CONFIG_PROVIDER],
'global-short-array' => [$globallyQualifiedShortArray, ConfigAggregatorInjector::TYPE_CONFIG_PROVIDER],
'import-short-array' => [$importShortArray, ConfigAggregatorInjector::TYPE_CONFIG_PROVIDER],
]]]></code>
<code><![CDATA[[
'fqcn-long-array' => [$fqcnLongArray],
'global-long-array' => [$globallyQualifiedLongArray],
'import-long-array' => [$importLongArray],
'fqcn-short-array' => [$fqcnShortArray],
'global-short-array' => [$globallyQualifiedShortArray],
'import-short-array' => [$importShortArray],
]]]></code>
</LessSpecificReturnStatement>
<MoreSpecificReturnType>
<code><![CDATA[array]]></code>
<code><![CDATA[array]]></code>
<code><![CDATA[array]]></code>
<code><![CDATA[array]]></code>
</MoreSpecificReturnType>
<NullableReturnStatement>
<code><![CDATA[preg_replace('/array\(([^)]+)\)/s', '[$1]', $contents)]]></code>
</NullableReturnStatement>
<PossiblyFalseArgument>
<code><![CDATA[$baseContentsFqcnLongArray]]></code>
<code><![CDATA[$baseContentsFqcnLongArray]]></code>
<code><![CDATA[$baseContentsGloballyQualifiedLongArray]]></code>
<code><![CDATA[$baseContentsGloballyQualifiedLongArray]]></code>
<code><![CDATA[$baseContentsImportLongArray]]></code>
<code><![CDATA[$baseContentsImportLongArray]]></code>
<code><![CDATA[$baseContentsImportLongArrayAltIndent]]></code>
<code><![CDATA[$baseContentsImportLongArrayAltIndent]]></code>
<code><![CDATA[$contents]]></code>
<code><![CDATA[$expectedContentsFqcnLongArray]]></code>
<code><![CDATA[$expectedContentsFqcnLongArray]]></code>
<code><![CDATA[$expectedContentsGloballyQualifiedLongArray]]></code>
<code><![CDATA[$expectedContentsGloballyQualifiedLongArray]]></code>
<code><![CDATA[$expectedContentsImportLongArray]]></code>
<code><![CDATA[$expectedContentsImportLongArray]]></code>
<code><![CDATA[$expectedContentsImportLongArrayAltIndent]]></code>
<code><![CDATA[$expectedContentsImportLongArrayAltIndent]]></code>
<code><![CDATA[$fqcnLongArray]]></code>
<code><![CDATA[$fqcnLongArray]]></code>
<code><![CDATA[$globallyQualifiedLongArray]]></code>
<code><![CDATA[$globallyQualifiedLongArray]]></code>
<code><![CDATA[$importLongArray]]></code>
<code><![CDATA[$importLongArray]]></code>
</PossiblyFalseArgument>
</file>
<file src="test/Injector/MezzioConfigInjectorTest.php">
<InvalidNullableReturnType>
<code><![CDATA[string]]></code>
</InvalidNullableReturnType>
<LessSpecificReturnStatement>
<code><![CDATA[[
'fqcn-long-array' => [$baseContentsFqcnLongArray, $expectedContentsFqcnLongArray],
'global-long-array' => [$baseContentsGloballyQualifiedLongArray, $expectedContentsGloballyQualifiedLongArray],
'import-long-array' => [$baseContentsImportLongArray, $expectedContentsImportLongArray],
'fqcn-short-array' => [$baseContentsFqcnShortArray, $expectedContentsFqcnShortArray],
'global-short-array' => [$baseContentsGloballyQualifiedShortArray, $expectedContentsGloballyQualifiedShortArray],
'import-short-array' => [$baseContentsImportShortArray, $expectedContentsImportShortArray],
]]]></code>
<code><![CDATA[[
'fqcn-long-array' => [$fqcnLongArray, InjectorInterface::TYPE_CONFIG_PROVIDER],
'global-long-array' => [$globallyQualifiedLongArray, InjectorInterface::TYPE_CONFIG_PROVIDER],
'import-long-array' => [$importLongArray, InjectorInterface::TYPE_CONFIG_PROVIDER],
'fqcn-short-array' => [$fqcnShortArray, InjectorInterface::TYPE_CONFIG_PROVIDER],
'global-short-array' => [$globallyQualifiedShortArray, InjectorInterface::TYPE_CONFIG_PROVIDER],
'import-short-array' => [$importShortArray, InjectorInterface::TYPE_CONFIG_PROVIDER],
]]]></code>
<code><![CDATA[[
'fqcn-long-array' => [$fqcnLongArray],
'global-long-array' => [$globallyQualifiedLongArray],
'import-long-array' => [$importLongArray],
'fqcn-short-array' => [$fqcnShortArray],
'global-short-array' => [$globallyQualifiedShortArray],
'import-short-array' => [$importShortArray],
]]]></code>
<code><![CDATA[[
'fqcn-long-array' => [InjectorInterface::TYPE_CONFIG_PROVIDER, $baseContentsFqcnLongArray, $expectedContentsFqcnLongArray],
'global-long-array' => [InjectorInterface::TYPE_CONFIG_PROVIDER, $baseContentsGloballyQualifiedLongArray, $expectedContentsGloballyQualifiedLongArray],
'import-long-array' => [InjectorInterface::TYPE_CONFIG_PROVIDER, $baseContentsImportLongArray, $expectedContentsImportLongArray],
'fqcn-short-array' => [InjectorInterface::TYPE_CONFIG_PROVIDER, $baseContentsFqcnShortArray, $expectedContentsFqcnShortArray],
'global-short-array' => [InjectorInterface::TYPE_CONFIG_PROVIDER, $baseContentsGloballyQualifiedShortArray, $expectedContentsGloballyQualifiedShortArray],
'import-short-array' => [InjectorInterface::TYPE_CONFIG_PROVIDER, $baseContentsImportShortArray, $expectedContentsImportShortArray],
]]]></code>
</LessSpecificReturnStatement>
<MoreSpecificReturnType>
<code><![CDATA[array]]></code>
<code><![CDATA[array]]></code>
<code><![CDATA[array]]></code>
<code><![CDATA[array]]></code>
</MoreSpecificReturnType>
<NullableReturnStatement>
<code><![CDATA[preg_replace('/array\(([^)]+)\)/s', '[$1]', $contents)]]></code>
</NullableReturnStatement>
<PossiblyFalseArgument>
<code><![CDATA[$baseContentsFqcnLongArray]]></code>
<code><![CDATA[$baseContentsFqcnLongArray]]></code>
<code><![CDATA[$baseContentsGloballyQualifiedLongArray]]></code>
<code><![CDATA[$baseContentsGloballyQualifiedLongArray]]></code>
<code><![CDATA[$baseContentsImportLongArray]]></code>
<code><![CDATA[$baseContentsImportLongArray]]></code>
<code><![CDATA[$expectedContentsFqcnLongArray]]></code>
<code><![CDATA[$expectedContentsFqcnLongArray]]></code>
<code><![CDATA[$expectedContentsGloballyQualifiedLongArray]]></code>
<code><![CDATA[$expectedContentsGloballyQualifiedLongArray]]></code>
<code><![CDATA[$expectedContentsImportLongArray]]></code>
<code><![CDATA[$expectedContentsImportLongArray]]></code>
<code><![CDATA[$fqcnLongArray]]></code>
<code><![CDATA[$fqcnLongArray]]></code>
<code><![CDATA[$globallyQualifiedLongArray]]></code>
<code><![CDATA[$globallyQualifiedLongArray]]></code>
<code><![CDATA[$importLongArray]]></code>
<code><![CDATA[$importLongArray]]></code>
</PossiblyFalseArgument>
</file>
</files>