Passed
Push — master ( 73bf48...047dc7 )
by Ilya
05:56 queued 16s
created

CartReorderDependencyProvider   A

Complexity

Total Complexity 10

Size/Duplication

Total Lines 134
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 10
eloc 56
dl 0
loc 134
rs 10
c 2
b 0
f 0

10 Methods

Rating   Name   Duplication   Size   Complexity  
A getCartReorderPreAddToCartPluginsForOrderAmendment() 0 4 1
A getCartReorderQuoteProviderStrategyPlugins() 0 5 1
A getCartReorderPreAddToCartPlugins() 0 7 1
A getCartReorderValidatorPlugins() 0 4 1
A getCartReorderOrderItemFilterPlugins() 0 4 1
A getCartReorderRequestValidatorPlugins() 0 4 1
A getCartPreReorderPlugins() 0 21 1
A getCartPostReorderPlugins() 0 6 1
A getCartReorderItemHydratorPlugins() 0 14 1
A getCartReorderValidatorPluginsForOrderAmendment() 0 6 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\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\ConfigurableBundleNote\Communication\Plugin\CartReorder\ConfigurableBundleNoteCartReorderItemHydratorPlugin;
18
use Spryker\Zed\Currency\Communication\Plugin\CartReorder\CopyOrderCurrencyCartPreReorderPlugin;
19
use Spryker\Zed\MerchantProduct\Communication\Plugin\CartReorder\MerchantProductCartReorderItemHydratorPlugin;
20
use Spryker\Zed\MerchantProductOffer\Communication\Plugin\CartReorder\MerchantProductOfferCartReorderItemHydratorPlugin;
21
use Spryker\Zed\MultiCart\Communication\Plugin\CartReorder\DefaultReorderQuoteNameCartPreReorderPlugin;
22
use Spryker\Zed\MultiCart\Communication\Plugin\CartReorder\NewPersistentCartReorderQuoteProviderStrategyPlugin;
23
use Spryker\Zed\OrderCustomReference\Communication\Plugin\CartReorder\OrderCustomReferenceCartPreReorderPlugin;
24
use Spryker\Zed\PersistentCart\Communication\Plugin\CartReorder\ReplacePersistentCartReorderQuoteProviderStrategyPlugin;
25
use Spryker\Zed\PersistentCart\Communication\Plugin\CartReorder\UpdateQuoteCartPostReorderPlugin;
26
use Spryker\Zed\Price\Communication\Plugin\CartReorder\CopyOrderPriceModeCartPreReorderPlugin;
27
use Spryker\Zed\PriceProductSalesOrderAmendment\Communication\Plugin\CartReorder\OriginalSalesOrderItemPriceCartPreReorderPlugin;
28
use Spryker\Zed\ProductBundle\Communication\Plugin\CartReorder\OriginalOrderBundleItemCartPreReorderPlugin;
29
use Spryker\Zed\ProductBundle\Communication\Plugin\CartReorder\ProductBundleCartReorderOrderItemFilterPlugin;
30
use Spryker\Zed\ProductBundle\Communication\Plugin\CartReorder\ReplaceBundledItemsCartPreReorderPlugin;
31
use Spryker\Zed\ProductCartConnector\Communication\Plugin\CartReorder\RemoveInactiveItemsCartReorderPreAddToCartPlugin;
32
use Spryker\Zed\ProductList\Communication\Plugin\CartReorder\ProductListRestrictedItemsCartPreReorderPlugin;
33
use Spryker\Zed\ProductMeasurementUnit\Communication\Plugin\CartReorder\MergeProductMeasurementUnitItemsCartPreReorderPlugin;
34
use Spryker\Zed\ProductMeasurementUnit\Communication\Plugin\CartReorder\ProductMeasurementUnitCartReorderItemHydratorPlugin;
35
use Spryker\Zed\ProductOffer\Communication\Plugin\CartReorder\ProductOfferCartReorderItemHydratorPlugin;
36
use Spryker\Zed\ProductOffer\Communication\Plugin\CartReorder\RemoveInactiveProductOffersCartReorderPreAddToCartPlugin;
37
use Spryker\Zed\ProductOption\Communication\Plugin\CartReorder\ProductOptionCartReorderItemHydratorPlugin;
38
use Spryker\Zed\ProductOptionCartConnector\Communication\Plugin\CartReorder\RemoveInactiveProductOptionItemsCartReorderPreAddToCartPlugin;
39
use Spryker\Zed\ProductPackagingUnit\Communication\Plugin\CartReorder\MergeProductPackagingUnitItemsCartPreReorderPlugin;
40
use Spryker\Zed\ProductPackagingUnit\Communication\Plugin\CartReorder\ProductPackagingUnitCartReorderItemHydratorPlugin;
41
use Spryker\Zed\ProductQuantity\Communication\Plugin\CartReorder\MergeProductQuantityRestrictionItemsCartPreReorderPlugin;
42
use Spryker\Zed\SalesConfigurableBundle\Communication\Plugin\CartReorder\ConfigurableBundleCartReorderItemHydratorPlugin;
43
use Spryker\Zed\SalesConfigurableBundle\Communication\Plugin\CartReorder\ConfiguredBundleCartPostReorderPlugin;
44
use Spryker\Zed\SalesConfigurableBundle\Communication\Plugin\CartReorder\MergeConfigurableBundleItemsCartPreReorderPlugin;
45
use Spryker\Zed\SalesOrderAmendment\Communication\Plugin\CartReorder\AmendmentOrderReferenceCartPreReorderPlugin;
46
use Spryker\Zed\SalesOrderAmendment\Communication\Plugin\CartReorder\AmendmentQuoteNameCartPreReorderPlugin;
47
use Spryker\Zed\SalesOrderAmendment\Communication\Plugin\CartReorder\OrderAmendmentCartReorderValidatorPlugin;
48
use Spryker\Zed\SalesOrderAmendment\Communication\Plugin\CartReorder\OrderAmendmentQuoteProcessFlowExpanderCartPreReorderPlugin;
49
use Spryker\Zed\SalesOrderAmendment\Communication\Plugin\CartReorder\OriginalSalesOrderItemCartPreReorderPlugin;
50
use Spryker\Zed\SalesOrderAmendment\Communication\Plugin\CartReorder\OriginalSalesOrderItemGroupKeyCartReorderItemHydratorPlugin;
51
use Spryker\Zed\SalesOrderAmendment\Communication\Plugin\CartReorder\QuoteRequestVersionCartReorderValidatorPlugin;
52
use Spryker\Zed\SalesOrderAmendmentOms\Communication\Plugin\CartReorder\IsAmendableOrderCartReorderRequestValidatorPlugin;
53
use Spryker\Zed\SalesOrderAmendmentOms\Communication\Plugin\CartReorder\StartOrderAmendmentCartReorderPostCreatePlugin;
54
use Spryker\Zed\SalesProductConfiguration\Communication\Plugin\CartReorder\ProductConfigurationCartReorderItemHydratorPlugin;
55
use Spryker\Zed\Store\Communication\Plugin\CartReorder\CurrentStoreCartReorderValidatorPlugin;
56
57
class CartReorderDependencyProvider extends SprykerCartReorderDependencyProvider
58
{
59
    /**
60
     * @return list<\Spryker\Zed\CartReorderExtension\Dependency\Plugin\CartReorderValidatorPluginInterface>
61
     */
62
    protected function getCartReorderValidatorPlugins(): array
63
    {
64
        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\CartReorder\list.
Loading history...
65
            new CurrentStoreCartReorderValidatorPlugin(),
66
        ];
67
    }
68
69
    /**
70
     * @return list<\Spryker\Zed\CartReorderExtension\Dependency\Plugin\CartReorderRequestValidatorPluginInterface>
71
     */
72
    protected function getCartReorderRequestValidatorPlugins(): array
73
    {
74
        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\CartReorder\list.
Loading history...
75
            new IsAmendableOrderCartReorderRequestValidatorPlugin(),
76
        ];
77
    }
78
79
    /**
80
     * @return list<\Spryker\Zed\CartReorderExtension\Dependency\Plugin\CartReorderQuoteProviderStrategyPluginInterface>
81
     */
82
    protected function getCartReorderQuoteProviderStrategyPlugins(): array
83
    {
84
        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\CartReorder\list.
Loading history...
85
            new ReplacePersistentCartReorderQuoteProviderStrategyPlugin(),
86
            new NewPersistentCartReorderQuoteProviderStrategyPlugin(),
87
        ];
88
    }
89
90
    /**
91
     * @return list<\Spryker\Zed\CartReorderExtension\Dependency\Plugin\CartReorderValidatorPluginInterface>
92
     */
93
    protected function getCartReorderValidatorPluginsForOrderAmendment(): array
94
    {
95
        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\CartReorder\list.
Loading history...
96
            new CurrentStoreCartReorderValidatorPlugin(),
97
            new OrderAmendmentCartReorderValidatorPlugin(),
98
            new QuoteRequestVersionCartReorderValidatorPlugin(),
99
        ];
100
    }
101
102
    /**
103
     * @return list<\Spryker\Zed\CartReorderExtension\Dependency\Plugin\CartPreReorderPluginInterface>
104
     */
105
    protected function getCartPreReorderPlugins(): array
106
    {
107
        return [
108
            new CopyOrderCurrencyCartPreReorderPlugin(),
109
            new CopyOrderPriceModeCartPreReorderPlugin(),
110
            new ProductListRestrictedItemsCartPreReorderPlugin(),
111
            new DefaultReorderQuoteNameCartPreReorderPlugin(),
112
            new ReplaceBundledItemsCartPreReorderPlugin(),
113
            new MergeProductMeasurementUnitItemsCartPreReorderPlugin(),
114
            new MergeProductPackagingUnitItemsCartPreReorderPlugin(),
115
            new MergeConfigurableBundleItemsCartPreReorderPlugin(),
116
            new CartNoteCartPreReorderPlugin(),
117
            new OrderCustomReferenceCartPreReorderPlugin(),
118
            new MergeProductQuantityRestrictionItemsCartPreReorderPlugin(),
119
            new CopyOrderCommentThreadCartPreReorderPlugin(),
120
            new OrderAmendmentQuoteProcessFlowExpanderCartPreReorderPlugin(), #Order Amendment Feature
121
            new AmendmentOrderReferenceCartPreReorderPlugin(), #Order Amendment Feature
122
            new AmendmentQuoteNameCartPreReorderPlugin(), #Order Amendment Feature
123
            new OriginalSalesOrderItemPriceCartPreReorderPlugin(), #Order Amendment Feature
124
            new OriginalSalesOrderItemCartPreReorderPlugin(), #Order Amendment Feature
125
            new OriginalOrderBundleItemCartPreReorderPlugin(), #Order Amendment Feature
126
        ];
127
    }
128
129
    /**
130
     * @return list<\Spryker\Zed\CartReorderExtension\Dependency\Plugin\CartReorderItemHydratorPluginInterface>
131
     */
132
    protected function getCartReorderItemHydratorPlugins(): array
133
    {
134
        return [
135
            new ProductMeasurementUnitCartReorderItemHydratorPlugin(),
136
            new ProductPackagingUnitCartReorderItemHydratorPlugin(),
137
            new CartNoteCartReorderItemHydratorPlugin(),
138
            new ProductOfferCartReorderItemHydratorPlugin(),
139
            new MerchantProductCartReorderItemHydratorPlugin(),
140
            new MerchantProductOfferCartReorderItemHydratorPlugin(),
141
            new ProductConfigurationCartReorderItemHydratorPlugin(),
142
            new ProductOptionCartReorderItemHydratorPlugin(),
143
            new ConfigurableBundleCartReorderItemHydratorPlugin(),
144
            new ConfigurableBundleNoteCartReorderItemHydratorPlugin(),
145
            new OriginalSalesOrderItemGroupKeyCartReorderItemHydratorPlugin(),
146
        ];
147
    }
148
149
    /**
150
     * @return list<\Spryker\Zed\CartReorderExtension\Dependency\Plugin\CartPostReorderPluginInterface>
151
     */
152
    protected function getCartPostReorderPlugins(): array
153
    {
154
        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\CartReorder\list.
Loading history...
155
            new UpdateQuoteCartPostReorderPlugin(),
156
            new ConfiguredBundleCartPostReorderPlugin(),
157
            new StartOrderAmendmentCartReorderPostCreatePlugin(),
158
        ];
159
    }
160
161
    /**
162
     * @return list<\Spryker\Zed\CartReorderExtension\Dependency\Plugin\CartReorderPreAddToCartPluginInterface>
163
     */
164
    protected function getCartReorderPreAddToCartPlugins(): array
165
    {
166
        return [
167
            new RemoveUnavailableItemsCartReorderPreAddToCartPlugin(),
168
            new RemoveInactiveItemsCartReorderPreAddToCartPlugin(),
169
            new RemoveInactiveProductOffersCartReorderPreAddToCartPlugin(),
170
            new RemoveInactiveProductOptionItemsCartReorderPreAddToCartPlugin(),
171
        ];
172
    }
173
174
    /**
175
     * @return list<\Spryker\Zed\CartReorderExtension\Dependency\Plugin\CartReorderPreAddToCartPluginInterface>
176
     */
177
    protected function getCartReorderPreAddToCartPluginsForOrderAmendment(): array
178
    {
179
        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\CartReorder\list.
Loading history...
180
            new RemoveInactiveProductOptionItemsCartReorderPreAddToCartPlugin(),
181
        ];
182
    }
183
184
    /**
185
     * @return list<\Spryker\Zed\CartReorderExtension\Dependency\Plugin\CartReorderOrderItemFilterPluginInterface>
186
     */
187
    protected function getCartReorderOrderItemFilterPlugins(): array
188
    {
189
        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\CartReorder\list.
Loading history...
190
            new ProductBundleCartReorderOrderItemFilterPlugin(),
191
        ];
192
    }
193
}
194