AddressInformation::getShippingCarrierCode()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file has been created by developers from BitBag.
5
 * Feel free to contact us once you face any issues or want to start
6
 * another great project.
7
 * You can find more information about us on https://bitbag.io and write us
8
 * an email on [email protected].
9
 */
10
11
declare(strict_types=1);
12
13
namespace BitBag\SyliusVueStorefrontPlugin\Model\Request\Common;
14
15
use BitBag\SyliusVueStorefrontPlugin\Model\Request\Order\OrderAddress;
16
17
class AddressInformation
18
{
19
    /** @var OrderAddress */
20
    public $shippingAddress;
21
22
    /** @var OrderAddress */
23
    public $billingAddress;
24
25
    /** @var string */
26
    public $payment_method_code;
27
28
    /** @var string */
29
    public $shipping_method_code;
30
31
    /** @var string */
32
    public $shipping_carrier_code;
33
34
    /** workaround for /cart/shipping-information case inconsistency in vsf */
35
36
    /** @var string|null */
37
    public $shippingMethodCode;
38
39
    /** @var string|null */
40
    public $shippingCarrierCode;
41
42
    public function getShippingAddress(): Address
43
    {
44
        return $this->shippingAddress;
45
    }
46
47
    public function getShippingCarrierCode(): string
48
    {
49
        return $this->shipping_carrier_code ?? $this->shippingCarrierCode;
50
    }
51
52
    public function getBillingAddress(): Address
53
    {
54
        return $this->billingAddress;
55
    }
56
}
57