getRemoveItemsRequestExpanderPlugins()   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
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\PersistentCart;
11
12
use Spryker\Zed\Kernel\Container;
13
use Spryker\Zed\MultiCart\Communication\Plugin\CustomerCartQuoteResponseExpanderPlugin;
14
use Spryker\Zed\PersistentCart\PersistentCartDependencyProvider as SprykerPersistentCartDependencyProvider;
0 ignored issues
show
Bug introduced by
The type Spryker\Zed\PersistentCa...tCartDependencyProvider was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
15
use Spryker\Zed\PersistentCartExtension\Dependency\Plugin\QuoteItemFinderPluginInterface;
16
use Spryker\Zed\ProductBundle\Communication\Plugin\PersistentCart\BundleProductQuoteItemFinderPlugin;
17
use Spryker\Zed\ProductBundle\Communication\Plugin\PersistentCart\RemoveBundleChangeRequestExpanderPlugin;
18
use Spryker\Zed\ProductPackagingUnit\Communication\Plugin\PersistentCart\ProductPackagingUnitCartAddItemStrategyPlugin;
19
use Spryker\Zed\SalesOrderAmendment\Communication\Plugin\PersistentCart\ResetAmendmentQuoteProcessFlowQuotePostMergePlugin;
20
use Spryker\Zed\SharedCart\Communication\Plugin\SharedCartQuoteResponseExpanderPlugin;
21
22
class PersistentCartDependencyProvider extends SprykerPersistentCartDependencyProvider
23
{
24
    /**
25
     * @return array<\Spryker\Zed\PersistentCartExtension\Dependency\Plugin\QuoteResponseExpanderPluginInterface>
26
     */
27
    protected function getQuoteResponseExpanderPlugins(): array
28
    {
29
        return [
30
            new CustomerCartQuoteResponseExpanderPlugin(), #MultiCartFeature
31
            new SharedCartQuoteResponseExpanderPlugin(), #SharedCartFeature
32
        ];
33
    }
34
35
    protected function getQuoteItemFinderPlugin(): QuoteItemFinderPluginInterface
36
    {
37
        return new BundleProductQuoteItemFinderPlugin(); #ProductBundleFeature
38
    }
39
40
    /**
41
     * @return array<\Spryker\Zed\PersistentCartExtension\Dependency\Plugin\CartChangeRequestExpandPluginInterface>
42
     */
43
    protected function getRemoveItemsRequestExpanderPlugins(): array
44
    {
45
        return [
46
            new RemoveBundleChangeRequestExpanderPlugin(), #ProductBundleFeature
47
        ];
48
    }
49
50
    /**
51
     * @param \Spryker\Zed\Kernel\Container $container
52
     *
53
     * @return array<\Spryker\Zed\CartExtension\Dependency\Plugin\CartOperationStrategyPluginInterface>
54
     */
55
    protected function getCartAddItemStrategyPlugins(Container $container): array // phpcs:ignore SlevomatCodingStandard.Functions.UnusedParameter
56
    {
57
        return [
58
            new ProductPackagingUnitCartAddItemStrategyPlugin(),
59
        ];
60
    }
61
62
    /**
63
     * @return list<\Spryker\Zed\PersistentCartExtension\Dependency\Plugin\QuotePostMergePluginInterface>
0 ignored issues
show
Bug introduced by
The type Pyz\Zed\PersistentCart\list was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
64
     */
65
    protected function getQuotePostMergePlugins(): array
66
    {
67
        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...
68
            new ResetAmendmentQuoteProcessFlowQuotePostMergePlugin(),
69
        ];
70
    }
71
}
72