Passed
Push — master ( 813c2b...31a484 )
by Ilya
05:35 queued 14s
created

QuoteDependencyProvider   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 52
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 5
eloc 14
dl 0
loc 52
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getQuoteExpandBeforeCreatePlugins() 0 4 1
A getQuoteFieldsAllowedForSavingProviderPlugins() 0 4 1
A getQuoteExpanderPlugins() 0 5 1
A getQuoteValidatorPlugins() 0 6 1
A getQuoteDeleteAfterPlugins() 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\Quote;
11
12
use Spryker\Zed\Currency\Communication\Plugin\Quote\DefaultCurrencyQuoteExpandBeforeCreatePlugin;
13
use Spryker\Zed\Currency\Communication\Plugin\Quote\QuoteCurrencyValidatorPlugin;
14
use Spryker\Zed\MerchantShipment\Communication\Plugin\Quote\MerchantShipmentQuoteExpanderPlugin;
15
use Spryker\Zed\OrderCustomReference\Communication\Plugin\Quote\OrderCustomReferenceQuoteFieldsAllowedForSavingProviderPlugin;
16
use Spryker\Zed\Price\Communication\Plugin\Quote\QuotePriceModeValidatorPlugin;
17
use Spryker\Zed\Quote\QuoteDependencyProvider as SprykerQuoteDependencyProvider;
18
use Spryker\Zed\SalesOrderAmendmentOms\Communication\Plugin\Quote\CancelOrderAmendmentQuoteDeleteAfterPlugin;
19
use Spryker\Zed\ShipmentTypeCart\Communication\Plugin\Quote\ShipmentTypeQuoteExpanderPlugin;
20
use Spryker\Zed\Store\Communication\Plugin\Quote\QuoteStoreValidatorPlugin;
21
22
class QuoteDependencyProvider extends SprykerQuoteDependencyProvider
23
{
24
    /**
25
     * @return list<\Spryker\Zed\QuoteExtension\Dependency\Plugin\QuoteDeleteAfterPluginInterface>
26
     */
27
    protected function getQuoteDeleteAfterPlugins(): array
28
    {
29
        return [
0 ignored issues
show
Bug Best Practice introduced by
The expression return array(new Spryker...oteDeleteAfterPlugin()) returns the type array<integer,Spryker\Ze...QuoteDeleteAfterPlugin> which is incompatible with the documented return type Pyz\Zed\Quote\list.
Loading history...
30
            new CancelOrderAmendmentQuoteDeleteAfterPlugin(),
31
        ];
32
    }
33
34
    /**
35
     * @return array<\Spryker\Zed\QuoteExtension\Dependency\Plugin\QuoteValidatorPluginInterface>
36
     */
37
    protected function getQuoteValidatorPlugins(): array
38
    {
39
        return [
40
            new QuoteCurrencyValidatorPlugin(),
41
            new QuotePriceModeValidatorPlugin(),
42
            new QuoteStoreValidatorPlugin(),
43
        ];
44
    }
45
46
    /**
47
     * @return array<\Spryker\Zed\QuoteExtension\Dependency\Plugin\QuoteExpandBeforeCreatePluginInterface>
48
     */
49
    protected function getQuoteExpandBeforeCreatePlugins(): array
50
    {
51
        return [
52
            new DefaultCurrencyQuoteExpandBeforeCreatePlugin(),
53
        ];
54
    }
55
56
    /**
57
     * @return array<\Spryker\Zed\QuoteExtension\Dependency\Plugin\QuoteFieldsAllowedForSavingProviderPluginInterface>
58
     */
59
    protected function getQuoteFieldsAllowedForSavingProviderPlugins(): array
60
    {
61
        return [
62
            new OrderCustomReferenceQuoteFieldsAllowedForSavingProviderPlugin(),
63
        ];
64
    }
65
66
    /**
67
     * @return array<\Spryker\Zed\QuoteExtension\Dependency\Plugin\QuoteExpanderPluginInterface>
68
     */
69
    protected function getQuoteExpanderPlugins(): array
70
    {
71
        return [
72
            new MerchantShipmentQuoteExpanderPlugin(),
73
            new ShipmentTypeQuoteExpanderPlugin(),
74
        ];
75
    }
76
}
77