getQuotePostMergePlugins()   A
last analyzed

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
rs 10
c 0
b 0
f 0
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\PersistentCart;
11
12
use Spryker\Zed\PersistentCart\PersistentCartDependencyProvider as SprykerPersistentCartDependencyProvider;
13
use Spryker\Zed\PersistentCartExtension\Dependency\Plugin\QuoteItemFinderPluginInterface;
14
use Spryker\Zed\ProductBundle\Communication\Plugin\PersistentCart\BundleProductQuoteItemFinderPlugin;
15
use Spryker\Zed\ProductBundle\Communication\Plugin\PersistentCart\RemoveBundleChangeRequestExpanderPlugin;
16
use Spryker\Zed\SalesOrderAmendment\Communication\Plugin\PersistentCart\ResetAmendmentQuoteProcessFlowQuotePostMergePlugin;
17
18
class PersistentCartDependencyProvider extends SprykerPersistentCartDependencyProvider
19
{
20
    /**
21
     * @return \Spryker\Zed\PersistentCartExtension\Dependency\Plugin\QuoteItemFinderPluginInterface
22
     */
23
    protected function getQuoteItemFinderPlugin(): QuoteItemFinderPluginInterface
24
    {
25
        return new BundleProductQuoteItemFinderPlugin(); #ProductBundleFeature
26
    }
27
28
    /**
29
     * @return array<\Spryker\Zed\PersistentCartExtension\Dependency\Plugin\CartChangeRequestExpandPluginInterface>
30
     */
31
    protected function getRemoveItemsRequestExpanderPlugins(): array
32
    {
33
        return [
34
            new RemoveBundleChangeRequestExpanderPlugin(), #ProductBundleFeature
35
        ];
36
    }
37
38
    /**
39
     * @return list<\Spryker\Zed\PersistentCartExtension\Dependency\Plugin\QuotePostMergePluginInterface>
40
     */
41
    protected function getQuotePostMergePlugins(): array
42
    {
43
        return [
0 ignored issues
show
Bug Best Practice introduced by
The expression return array(new Spryker...QuotePostMergePlugin()) returns the type array<integer,Spryker\Ze...owQuotePostMergePlugin> which is incompatible with the documented return type Pyz\Zed\PersistentCart\list.
Loading history...
44
            new ResetAmendmentQuoteProcessFlowQuotePostMergePlugin(),
45
        ];
46
    }
47
}
48