Passed
Push — master ( d7c711...e54647 )
by Stanislav
19:14 queued 03:10
created

getMerchantOrderExpanderPlugins()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 0
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\MerchantSalesOrder;
11
12
use Spryker\Zed\DiscountMerchantSalesOrder\Communication\Plugin\MerchantSalesOrder\DiscountMerchantOrderFilterPlugin;
13
use Spryker\Zed\Kernel\Container;
14
use Spryker\Zed\MerchantOms\Communication\Plugin\MerchantSalesOrder\EventTriggerMerchantOrderPostCreatePlugin;
15
use Spryker\Zed\MerchantOms\Communication\Plugin\MerchantSalesOrder\MerchantOmsMerchantOrderExpanderPlugin;
16
use Spryker\Zed\MerchantSalesOrder\MerchantSalesOrderDependencyProvider as SprykerMerchantSalesOrderDependencyProvider;
17
use Spryker\Zed\MerchantSalesOrderSalesMerchantCommission\Communication\Plugin\MerchantSalesOrder\UpdateMerchantCommissionTotalsMerchantOrderPostCreatePlugin;
18
use Spryker\Zed\SalesDiscountConnector\Communication\Plugin\MerchantSalesOrder\CopyOrderContextMerchantOrderTotalsPreRecalculatePlugin;
19
20
class MerchantSalesOrderDependencyProvider extends SprykerMerchantSalesOrderDependencyProvider
21
{
22
    /**
23
     * @param \Spryker\Zed\Kernel\Container $container
24
     *
25
     * @return \Spryker\Zed\Kernel\Container
26
     */
27
    public function provideCommunicationLayerDependencies(Container $container): Container
28
    {
29
        $container = parent::provideCommunicationLayerDependencies($container);
30
31
        $container = $this->addSalesFacade($container);
32
33
        return $container;
34
    }
35
36
    /**
37
     * @return array<\Spryker\Zed\MerchantSalesOrderExtension\Dependency\Plugin\MerchantOrderPostCreatePluginInterface>
38
     */
39
    protected function getMerchantOrderPostCreatePlugins(): array
40
    {
41
        return [
42
            new EventTriggerMerchantOrderPostCreatePlugin(),
43
            new UpdateMerchantCommissionTotalsMerchantOrderPostCreatePlugin(),
44
        ];
45
    }
46
47
    /**
48
     * @return array<\Spryker\Zed\MerchantSalesOrderExtension\Dependency\Plugin\MerchantOrderExpanderPluginInterface>
49
     */
50
    protected function getMerchantOrderExpanderPlugins(): array
51
    {
52
        return [
53
            new MerchantOmsMerchantOrderExpanderPlugin(),
54
        ];
55
    }
56
57
    /**
58
     * @return array<\Spryker\Zed\MerchantSalesOrderExtension\Dependency\Plugin\MerchantOrderFilterPluginInterface>
59
     */
60
    protected function getMerchantOrderFilterPlugins(): array
61
    {
62
        return [
63
            new DiscountMerchantOrderFilterPlugin(),
64
        ];
65
    }
66
67
    /**
68
     * @return list<\Spryker\Zed\MerchantSalesOrderExtension\Dependency\Plugin\MerchantOrderTotalsPreRecalculatePluginInterface>
69
     */
70
    protected function getMerchantOrderTotalsPreRecalculatePlugins(): array
71
    {
72
        return [
0 ignored issues
show
Bug Best Practice introduced by
The expression return array(new Spryker...PreRecalculatePlugin()) returns the type array<integer,Spryker\Ze...lsPreRecalculatePlugin> which is incompatible with the documented return type Pyz\Zed\MerchantSalesOrder\list.
Loading history...
73
            new CopyOrderContextMerchantOrderTotalsPreRecalculatePlugin(),
74
        ];
75
    }
76
}
77