Completed
Push — master ( 09a563...bb361a )
by Stanislav
47s queued 13s
created

SelfServicePortalConfig   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getDeliveryLikeShipmentTypes() 0 5 1
A getShipmentTypeSortOrder() 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\Yves\SelfServicePortal;
11
12
use SprykerFeature\Yves\SelfServicePortal\SelfServicePortalConfig as SprykerSelfServicePortalConfig;
13
14
/**
15
 * @method \SprykerFeature\Shared\SelfServicePortal\SelfServicePortalConfig getSharedConfig()
16
 */
17
class SelfServicePortalConfig extends SprykerSelfServicePortalConfig
18
{
19
    protected const SHIPMENT_TYPE_IN_CENTER_SERVICE = 'in-center-service';
20
21
    public const SHIPMENT_TYPE_ON_SITE_SERVICE = 'on-site-service';
22
23
    public const SHIPMENT_TYPE_DELIVERY = 'delivery';
24
25
    /**
26
     * Specification:
27
     * - Returns the shipment type keys in the order they should be displayed.
28
     * - Shipment types not in this list will be displayed after the ones in this list.
29
     *
30
     * @api
31
     *
32
     * @return list<string>
33
     */
34
    public function getShipmentTypeSortOrder(): array
35
    {
36
        return [
0 ignored issues
show
Bug Best Practice introduced by
The expression return array(static::SHI...TYPE_IN_CENTER_SERVICE) returns the type array<integer,string> which is incompatible with the documented return type Pyz\Yves\SelfServicePortal\list.
Loading history...
37
            static::SHIPMENT_TYPE_DELIVERY,
38
            static::SHIPMENT_TYPE_IN_CENTER_SERVICE,
39
        ];
40
    }
41
42
    /**
43
     * @return list<string>
44
     */
45
    public function getDeliveryLikeShipmentTypes(): array
46
    {
47
        return [
0 ignored issues
show
Bug Best Practice introduced by
The expression return array(static::SHI...T_TYPE_ON_SITE_SERVICE) returns the type array<integer,string> which is incompatible with the documented return type Pyz\Yves\SelfServicePortal\list.
Loading history...
48
            static::SHIPMENT_TYPE_DELIVERY,
49
            static::SHIPMENT_TYPE_ON_SITE_SERVICE,
50
        ];
51
    }
52
}
53