Passed
Pull Request — master (#809)
by Denys
06:35
created

CartReorderDependencyProvider   A

Complexity

Total Complexity 11

Size/Duplication

Total Lines 145
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 11
eloc 59
dl 0
loc 145
rs 10
c 0
b 0
f 0

11 Methods

Rating   Name   Duplication   Size   Complexity  
A getCartPostReorderPlugins() 0 6 1
A getCartReorderQuoteProviderStrategyPlugins() 0 5 1
A getCartPreReorderPlugins() 0 21 1
A getCartReorderItemHydratorPlugins() 0 14 1
A getCartReorderValidatorPluginsForOrderAmendment() 0 6 1
A getCartReorderPreAddToCartPluginsForOrderAmendment() 0 4 1
A getCartReorderOrderItemFilterPlugins() 0 4 1
A getCartReorderRequestValidatorPlugins() 0 4 1
A getCartReorderOrderProviderPlugins() 0 5 1
A getCartReorderValidatorPlugins() 0 4 1
A getCartReorderPreAddToCartPlugins() 0 7 1
1
<?php
2
3
/**
4
 * This file is part of the Spryker Commerce OS.
5
 * For full license information, please view the LICENSE file that was distributed with this source code.
6
 */
7
8
declare(strict_types = 1);
9
10
namespace Pyz\Zed\CartsRestApi\CartReorder;
11
12
use Spryker\Zed\AvailabilityCartConnector\Communication\Plugin\CartReorder\RemoveUnavailableItemsCartReorderPreAddToCartPlugin;
13
use Spryker\Zed\CartNote\Communication\Plugin\CartReorder\CartNoteCartPreReorderPlugin;
14
use Spryker\Zed\CartNote\Communication\Plugin\CartReorder\CartNoteCartReorderItemHydratorPlugin;
15
use Spryker\Zed\CartReorder\CartReorderDependencyProvider as SprykerCartReorderDependencyProvider;
16
use Spryker\Zed\Comment\Communication\Plugin\CartReorder\CopyOrderCommentThreadCartPreReorderPlugin;
17
use Spryker\Zed\CompanyBusinessUnitSalesConnector\Communication\Plugin\CartReorder\EditBusinessUnitOrderCartReorderOrderProviderPlugin;
18
use Spryker\Zed\CompanySalesConnector\Communication\Plugin\CartReorder\EditCompanyOrderCartReorderOrderProviderPlugin;
19
use Spryker\Zed\ConfigurableBundleNote\Communication\Plugin\CartReorder\ConfigurableBundleNoteCartReorderItemHydratorPlugin;
20
use Spryker\Zed\Currency\Communication\Plugin\CartReorder\CopyOrderCurrencyCartPreReorderPlugin;
21
use Spryker\Zed\MerchantProduct\Communication\Plugin\CartReorder\MerchantProductCartReorderItemHydratorPlugin;
22
use Spryker\Zed\MerchantProductOffer\Communication\Plugin\CartReorder\MerchantProductOfferCartReorderItemHydratorPlugin;
23
use Spryker\Zed\MultiCart\Communication\Plugin\CartReorder\DefaultReorderQuoteNameCartPreReorderPlugin;
24
use Spryker\Zed\MultiCart\Communication\Plugin\CartReorder\NewPersistentCartReorderQuoteProviderStrategyPlugin;
25
use Spryker\Zed\OrderCustomReference\Communication\Plugin\CartReorder\OrderCustomReferenceCartPreReorderPlugin;
26
use Spryker\Zed\PersistentCart\Communication\Plugin\CartReorder\ReplacePersistentCartReorderQuoteProviderStrategyPlugin;
27
use Spryker\Zed\PersistentCart\Communication\Plugin\CartReorder\UpdateQuoteCartPostReorderPlugin;
28
use Spryker\Zed\Price\Communication\Plugin\CartReorder\CopyOrderPriceModeCartPreReorderPlugin;
29
use Spryker\Zed\PriceProductSalesOrderAmendment\Communication\Plugin\CartReorder\OriginalSalesOrderItemPriceCartPreReorderPlugin;
30
use Spryker\Zed\ProductBundle\Communication\Plugin\CartReorder\OriginalOrderBundleItemCartPreReorderPlugin;
31
use Spryker\Zed\ProductBundle\Communication\Plugin\CartReorder\ProductBundleCartReorderOrderItemFilterPlugin;
32
use Spryker\Zed\ProductBundle\Communication\Plugin\CartReorder\ReplaceBundledItemsCartPreReorderPlugin;
33
use Spryker\Zed\ProductCartConnector\Communication\Plugin\CartReorder\RemoveInactiveItemsCartReorderPreAddToCartPlugin;
34
use Spryker\Zed\ProductList\Communication\Plugin\CartReorder\ProductListRestrictedItemsCartPreReorderPlugin;
35
use Spryker\Zed\ProductMeasurementUnit\Communication\Plugin\CartReorder\MergeProductMeasurementUnitItemsCartPreReorderPlugin;
36
use Spryker\Zed\ProductMeasurementUnit\Communication\Plugin\CartReorder\ProductMeasurementUnitCartReorderItemHydratorPlugin;
37
use Spryker\Zed\ProductOffer\Communication\Plugin\CartReorder\ProductOfferCartReorderItemHydratorPlugin;
38
use Spryker\Zed\ProductOffer\Communication\Plugin\CartReorder\RemoveInactiveProductOffersCartReorderPreAddToCartPlugin;
39
use Spryker\Zed\ProductOption\Communication\Plugin\CartReorder\ProductOptionCartReorderItemHydratorPlugin;
40
use Spryker\Zed\ProductOptionCartConnector\Communication\Plugin\CartReorder\RemoveInactiveProductOptionItemsCartReorderPreAddToCartPlugin;
41
use Spryker\Zed\ProductPackagingUnit\Communication\Plugin\CartReorder\MergeProductPackagingUnitItemsCartPreReorderPlugin;
42
use Spryker\Zed\ProductPackagingUnit\Communication\Plugin\CartReorder\ProductPackagingUnitCartReorderItemHydratorPlugin;
43
use Spryker\Zed\ProductQuantity\Communication\Plugin\CartReorder\MergeProductQuantityRestrictionItemsCartPreReorderPlugin;
44
use Spryker\Zed\SalesConfigurableBundle\Communication\Plugin\CartReorder\ConfigurableBundleCartReorderItemHydratorPlugin;
45
use Spryker\Zed\SalesConfigurableBundle\Communication\Plugin\CartReorder\ConfiguredBundleCartPostReorderPlugin;
46
use Spryker\Zed\SalesConfigurableBundle\Communication\Plugin\CartReorder\MergeConfigurableBundleItemsCartPreReorderPlugin;
47
use Spryker\Zed\SalesOrderAmendment\Communication\Plugin\CartReorder\AmendmentOrderReferenceCartPreReorderPlugin;
48
use Spryker\Zed\SalesOrderAmendment\Communication\Plugin\CartReorder\AmendmentQuoteNameCartPreReorderPlugin;
49
use Spryker\Zed\SalesOrderAmendment\Communication\Plugin\CartReorder\OrderAmendmentCartReorderValidatorPlugin;
50
use Spryker\Zed\SalesOrderAmendment\Communication\Plugin\CartReorder\OrderAmendmentQuoteProcessFlowExpanderCartPreReorderPlugin;
51
use Spryker\Zed\SalesOrderAmendment\Communication\Plugin\CartReorder\OriginalSalesOrderItemCartPreReorderPlugin;
52
use Spryker\Zed\SalesOrderAmendment\Communication\Plugin\CartReorder\OriginalSalesOrderItemGroupKeyCartReorderItemHydratorPlugin;
53
use Spryker\Zed\SalesOrderAmendment\Communication\Plugin\CartReorder\QuoteRequestVersionCartReorderValidatorPlugin;
54
use Spryker\Zed\SalesOrderAmendmentOms\Communication\Plugin\CartReorder\IsAmendableOrderCartReorderRequestValidatorPlugin;
55
use Spryker\Zed\SalesOrderAmendmentOms\Communication\Plugin\CartReorder\StartOrderAmendmentCartReorderPostCreatePlugin;
56
use Spryker\Zed\SalesProductConfiguration\Communication\Plugin\CartReorder\ProductConfigurationCartReorderItemHydratorPlugin;
57
use Spryker\Zed\Store\Communication\Plugin\CartReorder\CurrentStoreCartReorderValidatorPlugin;
58
59
class CartReorderDependencyProvider extends SprykerCartReorderDependencyProvider
60
{
61
    /**
62
     * @return list<\Spryker\Zed\CartReorderExtension\Dependency\Plugin\CartReorderValidatorPluginInterface>
63
     */
64
    protected function getCartReorderValidatorPlugins(): array
65
    {
66
        return [
0 ignored issues
show
Bug Best Practice introduced by
The expression return array(new Spryker...orderValidatorPlugin()) returns the type array<integer,Spryker\Ze...ReorderValidatorPlugin> which is incompatible with the documented return type Pyz\Zed\CartsRestApi\CartReorder\list.
Loading history...
67
            new CurrentStoreCartReorderValidatorPlugin(),
68
        ];
69
    }
70
71
    /**
72
     * @return list<\Spryker\Zed\CartReorderExtension\Dependency\Plugin\CartReorderRequestValidatorPluginInterface>
73
     */
74
    protected function getCartReorderRequestValidatorPlugins(): array
75
    {
76
        return [
0 ignored issues
show
Bug Best Practice introduced by
The expression return array(new Spryker...questValidatorPlugin()) returns the type array<integer,Spryker\Ze...RequestValidatorPlugin> which is incompatible with the documented return type Pyz\Zed\CartsRestApi\CartReorder\list.
Loading history...
77
            new IsAmendableOrderCartReorderRequestValidatorPlugin(),
78
        ];
79
    }
80
81
    /**
82
     * @return list<\Spryker\Zed\CartReorderExtension\Dependency\Plugin\CartReorderQuoteProviderStrategyPluginInterface>
83
     */
84
    protected function getCartReorderQuoteProviderStrategyPlugins(): array
85
    {
86
        return [
0 ignored issues
show
Bug Best Practice introduced by
The expression return array(new Spryker...oviderStrategyPlugin()) returns the type array<integer,Spryker\Ze...ProviderStrategyPlugin> which is incompatible with the documented return type Pyz\Zed\CartsRestApi\CartReorder\list.
Loading history...
87
            new ReplacePersistentCartReorderQuoteProviderStrategyPlugin(),
88
            new NewPersistentCartReorderQuoteProviderStrategyPlugin(),
89
        ];
90
    }
91
92
    /**
93
     * @return list<\Spryker\Zed\CartReorderExtension\Dependency\Plugin\CartReorderValidatorPluginInterface>
94
     */
95
    protected function getCartReorderValidatorPluginsForOrderAmendment(): array
96
    {
97
        return [
0 ignored issues
show
Bug Best Practice introduced by
The expression return array(new Spryker...orderValidatorPlugin()) returns the type array<integer,Spryker\Ze...ReorderValidatorPlugin> which is incompatible with the documented return type Pyz\Zed\CartsRestApi\CartReorder\list.
Loading history...
98
            new CurrentStoreCartReorderValidatorPlugin(),
99
            new OrderAmendmentCartReorderValidatorPlugin(),
100
            new QuoteRequestVersionCartReorderValidatorPlugin(),
101
        ];
102
    }
103
104
    /**
105
     * @return list<\Spryker\Zed\CartReorderExtension\Dependency\Plugin\CartPreReorderPluginInterface>
106
     */
107
    protected function getCartPreReorderPlugins(): array
108
    {
109
        return [
110
            new CopyOrderCurrencyCartPreReorderPlugin(),
111
            new CopyOrderPriceModeCartPreReorderPlugin(),
112
            new ProductListRestrictedItemsCartPreReorderPlugin(),
113
            new DefaultReorderQuoteNameCartPreReorderPlugin(),
114
            new ReplaceBundledItemsCartPreReorderPlugin(),
115
            new MergeProductMeasurementUnitItemsCartPreReorderPlugin(),
116
            new MergeProductPackagingUnitItemsCartPreReorderPlugin(),
117
            new MergeConfigurableBundleItemsCartPreReorderPlugin(),
118
            new CartNoteCartPreReorderPlugin(),
119
            new OrderCustomReferenceCartPreReorderPlugin(),
120
            new MergeProductQuantityRestrictionItemsCartPreReorderPlugin(),
121
            new CopyOrderCommentThreadCartPreReorderPlugin(),
122
            new OrderAmendmentQuoteProcessFlowExpanderCartPreReorderPlugin(), #Order Amendment Feature
123
            new AmendmentOrderReferenceCartPreReorderPlugin(), #Order Amendment Feature
124
            new AmendmentQuoteNameCartPreReorderPlugin(), #Order Amendment Feature
125
            new OriginalSalesOrderItemPriceCartPreReorderPlugin(), #Order Amendment Feature
126
            new OriginalSalesOrderItemCartPreReorderPlugin(), #Order Amendment Feature
127
            new OriginalOrderBundleItemCartPreReorderPlugin(), #Order Amendment Feature
128
        ];
129
    }
130
131
    /**
132
     * @return list<\Spryker\Zed\CartReorderExtension\Dependency\Plugin\CartReorderItemHydratorPluginInterface>
133
     */
134
    protected function getCartReorderItemHydratorPlugins(): array
135
    {
136
        return [
137
            new ProductMeasurementUnitCartReorderItemHydratorPlugin(),
138
            new ProductPackagingUnitCartReorderItemHydratorPlugin(),
139
            new CartNoteCartReorderItemHydratorPlugin(),
140
            new ProductOfferCartReorderItemHydratorPlugin(),
141
            new MerchantProductCartReorderItemHydratorPlugin(),
142
            new MerchantProductOfferCartReorderItemHydratorPlugin(),
143
            new ProductConfigurationCartReorderItemHydratorPlugin(),
144
            new ProductOptionCartReorderItemHydratorPlugin(),
145
            new ConfigurableBundleCartReorderItemHydratorPlugin(),
146
            new ConfigurableBundleNoteCartReorderItemHydratorPlugin(),
147
            new OriginalSalesOrderItemGroupKeyCartReorderItemHydratorPlugin(),
148
        ];
149
    }
150
151
    /**
152
     * @return list<\Spryker\Zed\CartReorderExtension\Dependency\Plugin\CartPostReorderPluginInterface>
153
     */
154
    protected function getCartPostReorderPlugins(): array
155
    {
156
        return [
0 ignored issues
show
Bug Best Practice introduced by
The expression return array(new Spryker...rderPostCreatePlugin()) returns the type array<integer,Spryker\Ze...eorderPostCreatePlugin> which is incompatible with the documented return type Pyz\Zed\CartsRestApi\CartReorder\list.
Loading history...
157
            new UpdateQuoteCartPostReorderPlugin(),
158
            new ConfiguredBundleCartPostReorderPlugin(),
159
            new StartOrderAmendmentCartReorderPostCreatePlugin(),
160
        ];
161
    }
162
163
    /**
164
     * @return list<\Spryker\Zed\CartReorderExtension\Dependency\Plugin\CartReorderPreAddToCartPluginInterface>
165
     */
166
    protected function getCartReorderPreAddToCartPlugins(): array
167
    {
168
        return [
169
            new RemoveUnavailableItemsCartReorderPreAddToCartPlugin(),
170
            new RemoveInactiveItemsCartReorderPreAddToCartPlugin(),
171
            new RemoveInactiveProductOffersCartReorderPreAddToCartPlugin(),
172
            new RemoveInactiveProductOptionItemsCartReorderPreAddToCartPlugin(),
173
        ];
174
    }
175
176
    /**
177
     * @return list<\Spryker\Zed\CartReorderExtension\Dependency\Plugin\CartReorderPreAddToCartPluginInterface>
178
     */
179
    protected function getCartReorderPreAddToCartPluginsForOrderAmendment(): array
180
    {
181
        return [
0 ignored issues
show
Bug Best Practice introduced by
The expression return array(new Spryker...erPreAddToCartPlugin()) returns the type array<integer,Spryker\Ze...rderPreAddToCartPlugin> which is incompatible with the documented return type Pyz\Zed\CartsRestApi\CartReorder\list.
Loading history...
182
            new RemoveInactiveProductOptionItemsCartReorderPreAddToCartPlugin(),
183
        ];
184
    }
185
186
    /**
187
     * @return list<\Spryker\Zed\CartReorderExtension\Dependency\Plugin\CartReorderOrderItemFilterPluginInterface>
188
     */
189
    protected function getCartReorderOrderItemFilterPlugins(): array
190
    {
191
        return [
0 ignored issues
show
Bug Best Practice introduced by
The expression return array(new Spryker...rderItemFilterPlugin()) returns the type array<integer,Spryker\Ze...rOrderItemFilterPlugin> which is incompatible with the documented return type Pyz\Zed\CartsRestApi\CartReorder\list.
Loading history...
192
            new ProductBundleCartReorderOrderItemFilterPlugin(),
193
        ];
194
    }
195
196
    /**
197
     * @return list<\Spryker\Zed\CartReorderExtension\Dependency\Plugin\CartReorderOrderProviderPluginInterface>
198
     */
199
    protected function getCartReorderOrderProviderPlugins(): array
200
    {
201
        return [
0 ignored issues
show
Bug Best Practice introduced by
The expression return array(new Spryker...rOrderProviderPlugin()) returns the type array<integer,Spryker\Ze...derOrderProviderPlugin> which is incompatible with the documented return type Pyz\Zed\CartsRestApi\CartReorder\list.
Loading history...
202
            new EditCompanyOrderCartReorderOrderProviderPlugin(),
203
            new EditBusinessUnitOrderCartReorderOrderProviderPlugin(),
204
        ];
205
    }
206
}
207