Address   A
last analyzed

Complexity

Total Complexity 13

Size/Duplication

Total Lines 97
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

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

13 Methods

Rating   Name   Duplication   Size   Complexity  
A getLine1() 0 4 1
A setLine1() 0 4 1
A getLine2() 0 4 1
A setLine2() 0 4 1
A getFullAddress() 0 4 1
A getPostcode() 0 4 1
A setPostcode() 0 4 1
A getCity() 0 4 1
A setCity() 0 4 1
A getState() 0 4 1
A setState() 0 4 1
A getCountry() 0 4 1
A setCountry() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Linio\Type;
6
7
class Address
8
{
9
    /**
10
     * @var string
11
     */
12
    protected $line1;
13
14
    /**
15
     * @var string
16
     */
17
    protected $line2;
18
19
    /**
20
     * @var string
21
     */
22
    protected $postcode;
23
24
    /**
25
     * @var string
26
     */
27
    protected $city;
28
29
    /**
30
     * @var string
31
     */
32
    protected $state;
33
34
    /**
35
     * @var string
36
     */
37
    protected $country;
38
39
    public function getLine1(): string
40
    {
41
        return $this->line1;
42
    }
43
44
    public function setLine1(string $line1)
45
    {
46
        $this->line1 = $line1;
47
    }
48
49
    public function getLine2(): string
50
    {
51
        return $this->line2;
52
    }
53
54
    public function setLine2(string $line2)
55
    {
56
        $this->line2 = $line2;
57
    }
58
59
    public function getFullAddress(): string
60
    {
61
        return $this->line1 . ' ' . $this->line2;
62
    }
63
64
    public function getPostcode(): string
65
    {
66
        return $this->postcode;
67
    }
68
69
    public function setPostcode(string $postcode)
70
    {
71
        $this->postcode = $postcode;
72
    }
73
74
    public function getCity(): string
75
    {
76
        return $this->city;
77
    }
78
79
    public function setCity(string $city)
80
    {
81
        $this->city = $city;
82
    }
83
84
    public function getState(): string
85
    {
86
        return $this->state;
87
    }
88
89
    public function setState(string $state)
90
    {
91
        $this->state = $state;
92
    }
93
94
    public function getCountry(): string
95
    {
96
        return $this->country;
97
    }
98
99
    public function setCountry(string $country)
100
    {
101
        $this->country = $country;
102
    }
103
}
104