AddressInformation   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 0
dl 0
loc 40
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getShippingAddress() 0 4 1
A getShippingCarrierCode() 0 4 1
A getBillingAddress() 0 4 1
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