ProductAlternativeDependencyProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 8
dl 0
loc 30
c 0
b 0
f 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getPostProductAlternativeDeletePlugins() 0 4 1
A getPostProductAlternativeCreatePlugins() 0 4 1
A getAlternativeProductApplicablePlugins() 0 5 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\ProductAlternative;
11
12
use Spryker\Zed\Availability\Communication\Plugin\ProductAlternative\AvailabilityCheckAlternativeProductApplicablePlugin;
13
use Spryker\Zed\ProductAlternative\ProductAlternativeDependencyProvider as SprykerProductAlternativeDependencyProvider;
14
use Spryker\Zed\ProductAlternativeProductLabelConnector\Communication\Plugin\PostProductAlternativeCreatePlugin;
15
use Spryker\Zed\ProductAlternativeProductLabelConnector\Communication\Plugin\PostProductAlternativeDeletePlugin;
16
use Spryker\Zed\ProductDiscontinued\Communication\Plugin\ProductAlternative\DiscontinuedCheckAlternativeProductApplicablePlugin;
17
18
class ProductAlternativeDependencyProvider extends SprykerProductAlternativeDependencyProvider
19
{
20
    /**
21
     * @return array<\Spryker\Zed\ProductAlternativeExtension\Dependency\Plugin\PostProductAlternativeCreatePluginInterface>
22
     */
23
    protected function getPostProductAlternativeCreatePlugins(): array
24
    {
25
        return [
26
            new PostProductAlternativeCreatePlugin(),
27
        ];
28
    }
29
30
    /**
31
     * @return array<\Spryker\Zed\ProductAlternativeExtension\Dependency\Plugin\PostProductAlternativeDeletePluginInterface>
32
     */
33
    protected function getPostProductAlternativeDeletePlugins(): array
34
    {
35
        return [
36
            new PostProductAlternativeDeletePlugin(),
37
        ];
38
    }
39
40
    /**
41
     * @return array<\Spryker\Zed\ProductAlternativeExtension\Dependency\Plugin\AlternativeProductApplicablePluginInterface>
42
     */
43
    protected function getAlternativeProductApplicablePlugins(): array
44
    {
45
        return [
46
            new DiscontinuedCheckAlternativeProductApplicablePlugin(), #ProductDiscontinuedFeature
47
            new AvailabilityCheckAlternativeProductApplicablePlugin(),
48
        ];
49
    }
50
}
51