PersistentCartDependencyProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 6
dl 0
loc 27
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getQuoteItemFinderPlugin() 0 3 1
A getRemoveItemsRequestExpanderPlugins() 0 4 1
A getQuotePostMergePlugins() 0 4 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\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