Passed
Push — master ( 813c2b...31a484 )
by Ilya
05:35 queued 14s
created

CartReorderDependencyProvider   A

Complexity

Total Complexity 10

Size/Duplication

Total Lines 129
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 10
eloc 51
dl 0
loc 129
rs 10
c 1
b 0
f 0

10 Methods

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