Passed
Push — master ( f0d78a...818802 )
by Alexandr
12:50 queued 15s
created

PaymentAppWidgetConfig   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 1
eloc 13
dl 0
loc 29
rs 10
c 2
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getExpressCheckoutStartPageRouteName() 0 3 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
namespace Pyz\Yves\PaymentAppWidget;
9
10
use Generated\Shared\Transfer\QuoteTransfer;
11
use SprykerShop\Yves\CheckoutPage\Plugin\Router\CheckoutPageRouteProviderPlugin;
12
use SprykerShop\Yves\PaymentAppWidget\PaymentAppWidgetConfig as SprykerPaymentAppWidgetConfig;
13
14
class PaymentAppWidgetConfig extends SprykerPaymentAppWidgetConfig
15
{
16
    /**
17
     * @var list<string>
18
     */
19
    protected const CHECKOUT_STEPS_TO_SKIP_IN_EXPRESS_CHECKOUT_WORKFLOW = [
20
        'address',
21
        'shipment',
22
        'payment',
23
    ];
24
25
    /**
26
     * @var list<string>
27
     */
28
    protected const QUOTE_FIELDS_TO_CLEAN_IN_EXPRESS_CHECKOUT_WORKFLOW = [
29
        QuoteTransfer::PAYMENT,
30
        QuoteTransfer::PAYMENTS,
31
        QuoteTransfer::SHIPMENT,
32
        QuoteTransfer::BILLING_ADDRESS,
33
        QuoteTransfer::SHIPPING_ADDRESS,
34
        QuoteTransfer::PRE_ORDER_PAYMENT_DATA,
35
    ];
36
37
    /**
38
     * @return string
39
     */
40
    public function getExpressCheckoutStartPageRouteName(): string
41
    {
42
        return CheckoutPageRouteProviderPlugin::ROUTE_NAME_CHECKOUT_INDEX;
43
    }
44
}
45