Failed Conditions
Pull Request — master (#229)
by
unknown
02:42
created

CreateAddress   A

Complexity

Total Complexity 10

Size/Duplication

Total Lines 89
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

10 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A firstName() 0 4 1
A lastName() 0 4 1
A company() 0 4 1
A street() 0 4 1
A countryCode() 0 4 1
A provinceCode() 0 4 1
A city() 0 4 1
A postcode() 0 4 1
A phoneNumber() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Sylius\ShopApiPlugin\Command;
6
7
use Sylius\ShopApiPlugin\Model\Address;
8
9
final class CreateAddress
10
{
11
    /**
12
     * @var Address
13
     */
14
    private $address;
15
16
    /**
17
     * CreateAddress constructor.
18
     *
19
     * @param Address $address
20
     */
21
    public function __construct(Address $address)
22
    {
23
        $this->address = $address;
24
    }
25
26
    /**
27
     * @return string
28
     */
29
    public function firstName(): string
30
    {
31
        return $this->address->firstName();
32
    }
33
34
    /**
35
     * @return string
36
     */
37
    public function lastName(): string
38
    {
39
        return $this->address->lastName();
40
    }
41
42
    /**
43
     * @return string|null
44
     */
45
    public function company(): ?string
46
    {
47
        return $this->address->company();
48
    }
49
50
    /**
51
     * @return string
52
     */
53
    public function street(): string
54
    {
55
        return $this->address->street();
56
    }
57
58
    /**
59
     * @return string
60
     */
61
    public function countryCode(): string
62
    {
63
        return $this->address->countryCode();
64
    }
65
66
    /**
67
     * @return string|null
68
     */
69
    public function provinceCode(): ?string
70
    {
71
        return $this->address->provinceCode();
72
    }
73
74
    /**
75
     * @return string
76
     */
77
    public function city(): string
78
    {
79
        return $this->address->city();
80
    }
81
82
    /**
83
     * @return string
84
     */
85
    public function postcode(): string
86
    {
87
        return $this->address->postcode();
88
    }
89
90
    /**
91
     * @return string|null
92
     */
93
    public function phoneNumber(): ?string
94
    {
95
        return $this->address->phoneNumber();
96
    }
97
}
98