CartsRestApiDependencyProvider   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 4
eloc 15
dl 0
loc 45
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getCartItemExpanderPlugins() 0 7 1
A getRestCartAttributesMapperPlugins() 0 5 1
A getCartItemFilterPlugins() 0 4 1
A getRestCartItemsAttributesMapperPlugins() 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\Glue\CartsRestApi;
11
12
use Spryker\Glue\CartsRestApi\CartsRestApiDependencyProvider as SprykerCartsRestApiDependencyProvider;
13
use Spryker\Glue\ConfigurableBundleCartsRestApi\Plugin\CartsRestApi\ConfiguredBundleItemsAttributesMapperPlugin;
14
use Spryker\Glue\DiscountPromotionsRestApi\Plugin\CartsRestApi\DiscountPromotionCartItemExpanderPlugin;
15
use Spryker\Glue\MerchantProductsRestApi\Plugin\CartsRestApi\MerchantProductCartItemExpanderPlugin;
16
use Spryker\Glue\OrderAmendmentsRestApi\Plugin\CartsRestApi\OrderAmendmentRestCartAttributesMapperPlugin;
17
use Spryker\Glue\ProductBundleCartsRestApi\Plugin\CartsRestApi\ProductBundleCartItemFilterPlugin;
18
use Spryker\Glue\ProductConfigurationsRestApi\Plugin\CartsRestApi\ProductConfigurationCartItemExpanderPlugin;
19
use Spryker\Glue\ProductConfigurationsRestApi\Plugin\CartsRestApi\ProductConfigurationRestCartItemsAttributesMapperPlugin;
20
use Spryker\Glue\ProductOptionsRestApi\Plugin\CartsRestApi\ProductOptionCartItemExpanderPlugin;
21
use Spryker\Glue\ProductOptionsRestApi\Plugin\CartsRestApi\ProductOptionRestCartItemsAttributesMapperPlugin;
22
use Spryker\Glue\SalesOrderThresholdsRestApi\Plugin\CartsRestApi\SalesOrderThresholdRestCartAttributesMapperPlugin;
23
24
class CartsRestApiDependencyProvider extends SprykerCartsRestApiDependencyProvider
25
{
26
    /**
27
     * @return array<\Spryker\Glue\CartsRestApiExtension\Dependency\Plugin\RestCartItemsAttributesMapperPluginInterface>
28
     */
29
    protected function getRestCartItemsAttributesMapperPlugins(): array
30
    {
31
        return [
32
            new ProductOptionRestCartItemsAttributesMapperPlugin(),
33
            new ConfiguredBundleItemsAttributesMapperPlugin(),
34
            new ProductConfigurationRestCartItemsAttributesMapperPlugin(),
35
        ];
36
    }
37
38
    /**
39
     * @return array<\Spryker\Glue\CartsRestApiExtension\Dependency\Plugin\CartItemExpanderPluginInterface>
40
     */
41
    protected function getCartItemExpanderPlugins(): array
42
    {
43
        return [
44
            new ProductOptionCartItemExpanderPlugin(),
45
            new DiscountPromotionCartItemExpanderPlugin(),
46
            new MerchantProductCartItemExpanderPlugin(),
47
            new ProductConfigurationCartItemExpanderPlugin(),
48
        ];
49
    }
50
51
    /**
52
     * @return array<\Spryker\Glue\CartsRestApiExtension\Dependency\Plugin\CartItemFilterPluginInterface>
53
     */
54
    protected function getCartItemFilterPlugins(): array
55
    {
56
        return [
57
            new ProductBundleCartItemFilterPlugin(),
58
        ];
59
    }
60
61
    /**
62
     * @return array<\Spryker\Glue\CartsRestApiExtension\Dependency\Plugin\RestCartAttributesMapperPluginInterface>
63
     */
64
    protected function getRestCartAttributesMapperPlugins(): array
65
    {
66
        return [
67
            new SalesOrderThresholdRestCartAttributesMapperPlugin(),
68
            new OrderAmendmentRestCartAttributesMapperPlugin(),
69
        ];
70
    }
71
}
72