forked from shopware/SwagPayPal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpsalm.xml
271 lines (242 loc) · 15.2 KB
/
psalm.xml
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
<?xml version="1.0"?>
<psalm
cacheDirectory="var/cache/psalm"
autoloader="bin/static-analyze-autoloader.php"
findUnusedVariablesAndParams="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
>
<projectFiles>
<directory name="src"/>
<directory name="tests"/>
<ignoreFiles>
<directory name="../../../src"/> <!-- would otherwise inspect Shopware -->
<directory name="../../../vendor"/> <!-- would otherwise inspect vendor -->
<directory name="vendor"/> <!-- would otherwise inspect vendor -->
<file name="tests/TestBootstrapper.php"/>
</ignoreFiles>
</projectFiles>
<plugins>
<pluginClass class="Psalm\SymfonyPsalmPlugin\Plugin"/>
<pluginClass class="Psalm\PhpUnitPlugin\Plugin"/>
</plugins>
<forbiddenFunctions>
<function name="dump"/>
<function name="dd"/>
<function name="var_dump"/>
<function name="error_log"/>
</forbiddenFunctions>
<issueHandlers>
<MoreSpecificImplementedParamType>
<errorLevel type="info">
<file name="src/Webhook/Handler/*.php"/>
<file name="src/Pos/Sync/Product/Util/ProductGroupingCollection.php"/>
<file name="src/Pos/DataAbstractionLayer/Entity/*Collection.php"/>
<file name="src/Pos/MessageQueue/Handler/*Handler.php"/>
<file name="src/Pos/MessageQueue/Handler/Sync/*Handler.php"/>
<file name="src/Pos/Webhook/Handler/*Handler.php"/>
</errorLevel>
</MoreSpecificImplementedParamType>
<InternalClass>
<errorLevel type="info">
<!-- only used in tests -->
<referencedClass name="Shopware\Core\Checkout\Test\Cart\Common\Generator"/>
<referencedClass name="Shopware\Core\Framework\Test\IdsCollection"/>
</errorLevel>
</InternalClass>
<InternalMethod>
<errorLevel type="info">
<file name="src/Pos/Command/*Command.php"/>
<file name="src/Pos/Schedule/*Handler.php"/>
<file name="src/Checkout/Payment/ScheduledTask/CancelTransactionsTaskHandler.php"/>
<!-- is only used on webhook registration, no caching issues -->
<referencedMethod name="Shopware\Core\System\SystemConfig\SystemConfigService::getDomain"/>
<directory name="tests"/>
<!-- internal rule names - replace after NEXT-21510 -->
<referencedMethod name="Shopware\Core\Checkout\Customer\Rule\BillingCountryRule::__construct"/>
<referencedMethod name="Shopware\Core\Checkout\Cart\Rule\CartAmountRule::__construct"/>
<referencedMethod name="Shopware\Core\System\Currency\Rule\CurrencyRule::__construct"/>
<!-- ToDo PPI-646 -->
<referencedMethod name="Shopware\Core\System\SystemConfig\Api\SystemConfigController::__construct"/>
</errorLevel>
</InternalMethod>
<DeprecatedMethod>
<errorLevel type="info">
<!-- <deprecated> tag:v6.0.0 - remove with Shopware 6.5 compatibility -->
<referencedMethod name="Shopware\Core\Framework\Struct\Collection::getIterator"/>
<referencedMethod
name="Shopware\Core\System\SalesChannel\SalesChannelContext::getFallbackCustomerGroup"/>
<referencedMethod name="Shopware\Core\System\StateMachine\StateMachineRegistry::getInitialState"/>
<referencedMethod name="Doctrine\DBAL\Connection::executeUpdate"/>
<!-- <deprecated> tag:v6.0.0 - remove -->
<file name="src/Checkout/Payment/PayPalPuiPaymentHandler.php"/>
<file name="tests/Checkout/CheckoutSubscriberTest.php"/>
<referencedMethod name="Swag\PayPal\OrdersApi\Builder\AbstractOrderBuilder::createAddress"/>
<referencedMethod name="Swag\PayPal\OrdersApi\Builder\AbstractOrderBuilder::__construct"/>
<referencedMethod name="Swag\PayPal\Checkout\Payment\Handler\PlusPuiHandler::handlePlusPayment"/>
<referencedMethod name="Swag\PayPal\Checkout\Payment\Method\AbstractSyncAPMHandler::__construct"/>
<referencedMethod name="Swag\PayPal\Storefront\Data\Struct\AbstractCheckoutData::getClientToken"/>
<referencedMethod name="Swag\PayPal\Setting\Service\MerchantIntegrationsService::fetchMerchantIntegrations"/>
<!-- <deprecated> tag:v6.0.0 - remove with minVersion Shopware 6.5 -->
<referencedMethod name="Shopware\Core\Framework\Struct\ExtendableTrait::addExtension"/>
</errorLevel>
</DeprecatedMethod>
<DeprecatedConstant>
<errorLevel type="info">
<!-- <deprecated> tag:v6.0.0 - remove with Shopware 6.5 compatibility due to usage of Defaults::SALES_CHANNEL -->
<directory name="tests"/>
<file name="src/Checkout/Payment/PayPalPaymentHandler.php"/>
<file name="src/Util/PaymentStatusUtilV2.php"/>
<file name="tests/Checkout/Payment/ScheduledTask/CancelTransactionsTaskHandlerTest.php"/>
<file name="tests/Checkout/Payment/PayPalPaymentHandlerTest.php"/>
<file name="tests/Util/PaymentStatusUtilV2Test.php"/>
<!-- <deprecated> tag:v6.0.0 - remove -->
<file name="src/Util/Lifecycle/Installer/SettingsInstaller.php"/>
<file name="src/Setting/Settings.php"/>
<file name="src/Checkout/SPBCheckout/Service/SPBMarksDataService.php"/>
<file name="src/Checkout/SPBCheckout/SPBCheckoutSubscriber.php"/>
<file name="src/Checkout/Plus/Service/PlusDataService.php"/>
<file name="src/Checkout/Plus/PlusSubscriber.php"/>
<file name="src/Checkout/Plus/PlusPaymentFinalizeController.php"/>
<file name="src/Checkout/PayUponInvoice/PayUponInvoiceSubscriber.php"/>
<file name="src/Storefront/Data/Service/SPBCheckoutDataService.php"/>
</errorLevel>
</DeprecatedConstant>
<DeprecatedClass>
<errorLevel type="info">
<!-- <deprecated> tag:v6.0.0 - remove -->
<referencedClass name="Swag\PayPal\Checkout\Payment\Handler\AbstractPaymentHandler"/>
<referencedClass name="Swag\PayPal\Util\Lifecycle\Method\PayPalMethodData"/>
<file name="tests/Checkout/SPBCheckout/SPBCheckoutSubscriberTest.php"/>
<file name="tests/Checkout/SPBCheckout/SalesChannel/SPBCreateOrderRouteTest.php"/>
<file name="src/Checkout/SPBCheckout/SalesChannel/SPBCreateOrderRoute.php"/>
<file name="src/Checkout/PayUponInvoice/PayUponInvoiceSubscriber.php"/>
<file name="tests/Checkout/PayUponInvoice/PayUponInvoiceSubscriberTest.php"/>
<file name="tests/Checkout/Payment/PayPalPuiPaymentHandlerTest.php"/>
<file name="src/Checkout/Plus/Service/PlusDataService.php"/>
<file name="src/Checkout/Plus/PlusSubscriber.php"/>
<file name="tests/Checkout/Plus/PlusSubscriberTest.php"/>
<file name="tests/Checkout/Plus/PlusPaymentFinalizeControllerTest.php"/>
<file name="tests/Checkout/SPBCheckout/SPBMarksSubscriberTest.php"/>
<file name="tests/Storefront/Data/CheckoutSubscriberTest.php"/>
<file name="src/Checkout/SPBCheckout/Service/SPBMarksDataService.php"/>
<file name="src/Checkout/SPBCheckout/SPBMarksSubscriber.php"/>
<file name="src/Checkout/SPBCheckout/SPBCheckoutSubscriber.php"/>
<file name="src/Storefront/Data/Service/SPBCheckoutDataService.php"/>
<file name="src/Util/Lifecycle/Method/PayPalMethodData.php"/>
<file name="src/Checkout/SPBCheckout/Service/SPBMarksDataServiceInterface.php"/>
<!-- <deprecated> tag:v6.0.0 - remove with minVersion Shopware 6.5 -->
<referencedClass name="Shopware\Core\Framework\DataAbstractionLayer\Search\Criteria"/>
<referencedClass name="Shopware\Core\Framework\DataAbstractionLayer\Search\EntitySearchResult"/>
<referencedClass name="Shopware\Core\Framework\DataAbstractionLayer\Search\IdSearchResult"/>
<referencedClass name="Shopware\Core\Framework\DataAbstractionLayer\Search\Filter\Filter"/>
<referencedClass name="Shopware\Core\Framework\DataAbstractionLayer\Search\Filter\ContainsFilter"/>
<referencedClass name="Shopware\Core\Framework\DataAbstractionLayer\Search\Filter\EqualsFilter"/>
<referencedClass name="Shopware\Core\Framework\DataAbstractionLayer\Search\Filter\EqualsAnyFilter"/>
<referencedClass name="Shopware\Core\Framework\DataAbstractionLayer\Search\Filter\RangeFilter"/>
<referencedClass name="Shopware\Core\Framework\DataAbstractionLayer\Search\Aggregation\Aggregation"/>
<referencedClass name="Shopware\Core\Framework\DataAbstractionLayer\Search\Aggregation\Bucket\TermsAggregation"/>
<referencedClass name="Shopware\Core\Framework\DataAbstractionLayer\Search\Aggregation\Metric\SumAggregation"/>
<referencedClass name="Shopware\Core\Framework\DataAbstractionLayer\Search\Aggregation\Metric\CountAggregation"/>
<referencedClass name="Shopware\Core\Framework\DataAbstractionLayer\Search\AggregationResult\AggregationResult"/>
<referencedClass name="Shopware\Core\Framework\DataAbstractionLayer\Search\AggregationResult\Bucket\Bucket"/>
<referencedClass name="Shopware\Core\Framework\DataAbstractionLayer\Search\AggregationResult\Bucket\TermsResult"/>
<referencedClass name="Shopware\Core\Framework\DataAbstractionLayer\Search\AggregationResult\Metric\CountResult"/>
<referencedClass name="Shopware\Core\Framework\DataAbstractionLayer\Search\AggregationResult\Metric\SumResult"/>
<referencedClass name="Shopware\Core\Framework\DataAbstractionLayer\Write\WriteContext"/>
<referencedClass name="Shopware\Core\Framework\DataAbstractionLayer\Write\Command\WriteCommand"/>
<!-- fix with Shopware 6.5 compatibility -->
<referencedClass name="Shopware\Core\Framework\DataAbstractionLayer\EntityRepositoryInterface"/>
<referencedClass name="Shopware\Core\System\SalesChannel\Entity\SalesChannelRepositoryInterface"/>
<referencedClass name="Shopware\Core\Framework\Api\ApiDefinition\Generator\OpenApi\Event\OpenApiPathsEvent"/>
<referencedClass name="Shopware\Core\Checkout\Cart\Exception\OrderNotFoundException"/>
<referencedClass name="Shopware\Core\Checkout\Cart\Exception\OrderDeliveryNotFoundException"/>
<referencedClass name="Shopware\Core\Checkout\Cart\Exception\OrderTransactionNotFoundException"/>
</errorLevel>
</DeprecatedClass>
<DeprecatedProperty>
<errorLevel type="info">
<!-- <deprecated> tag:v6.0.0 - remove -->
<file name="src/Storefront/Data/Struct/AbstractCheckoutData.php"/>
</errorLevel>
</DeprecatedProperty>
<DeprecatedInterface>
<errorLevel type="info">
<!-- <deprecated> tag:v6.0.0 - remove -->
<referencedClass name="Swag\PayPal\Setting\Service\MerchantIntegrationsServiceInterface"/>
<referencedClass name="Swag\PayPal\Checkout\SPBCheckout\Service\SPBMarksDataServiceInterface"/>
<!-- fix with Shopware 6.5 compatibility -->
<referencedClass name="Shopware\Core\Framework\DataAbstractionLayer\EntityRepositoryInterface"/>
<referencedClass name="Shopware\Core\System\SalesChannel\Entity\SalesChannelRepositoryInterface"/>
</errorLevel>
</DeprecatedInterface>
<PossiblyInvalidArgument>
<errorLevel type="info">
<file name="tests/Pos/Sync/Inventory/StockSubscriberTest.php"/>
</errorLevel>
</PossiblyInvalidArgument>
<PossiblyUndefinedMethod>
<errorLevel type="info">
<file name="tests/Pos/Sync/Inventory/StockSubscriberTest.php"/>
</errorLevel>
</PossiblyUndefinedMethod>
<UndefinedConstant>
<errorLevel type="info">
<file name="tests/Checkout/Payment/PayPalPaymentHandlerTest.php"/>
<file name="tests/Checkout/Payment/PayPalPuiPaymentHandlerTest.php"/>
</errorLevel>
</UndefinedConstant>
<UndefinedClass>
<errorLevel type="info">
<!-- only inside a catch block, does not hurt exception. Remove with min-Version 6.4.3.0 -->
<referencedClass name="Shopware\Core\System\StateMachine\Exception\UnnecessaryTransitionException"/>
</errorLevel>
</UndefinedClass>
<UnsafeInstantiation>
<errorLevel type="info">
<file name="tests/Pos/Mock/Repositories/RepoTrait.php"/>
<file name="tests/OrdersApi/Builder/APMOrderBuilderTest.php"/>
<file name="tests/Checkout/Method/AbstractSyncAPMHandlerTest.php"/>
</errorLevel>
</UnsafeInstantiation>
<NonInvariantDocblockPropertyType>
<errorLevel type="info">
<file name="src/Checkout/TokenResponse.php"/>
</errorLevel>
</NonInvariantDocblockPropertyType>
<UndefinedDocblockClass>
<errorLevel type="info">
<referencedClass name="UnitEnum"/>
</errorLevel>
</UndefinedDocblockClass>
<DocblockTypeContradiction>
<errorLevel type="info">
<!-- remove with Symfony 5.4 base -->
<file name="src/Administration/PayPalPaymentMethodController.php"/>
</errorLevel>
</DocblockTypeContradiction>
<RedundantCastGivenDocblockType>
<errorLevel type="info">
<!-- remove with Symfony 5.4 base -->
<file name="src/PaymentsApi/Administration/PayPalPaymentController.php"/>
<file name="src/OrdersApi/Administration/Service/CaptureRefundCreator.php"/>
<file name="src/OrdersApi/Administration/PayPalOrdersController.php"/>
</errorLevel>
</RedundantCastGivenDocblockType>
<TooManyTemplateParams>
<errorLevel type="info">
<!-- remove with min-Version 6.4.14.0 -->
<file name="src/Checkout/TokenResponse.php"/>
</errorLevel>
</TooManyTemplateParams>
<!-- level 3 issues - slightly lazy code writing, but provably low false-negatives -->
<PropertyNotSetInConstructor errorLevel="info"/>
<MissingConstructor errorLevel="info"/>
<MissingFile>
<errorLevel type="info">
<file name="tests/TestBootstrap.php"/>
</errorLevel>
</MissingFile>
</issueHandlers>
</psalm>