Completed
Push — master ( 3229d6...c9eeb2 )
by Baldur
03:55
created

Address::getCountry()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace LAShowroom\TaxJarBundle\Model;
4
5
class Address
6
{
7
    /**
8
     * @var string
9
     */
10
    private $street;
11
12
    /**
13
     * @var string
14
     */
15
    private $city;
16
17
    /**
18
     * @var string
19
     */
20
    private $state;
21
22
    /**
23
     * @var string
24
     */
25
    private $zip;
26
27
    /**
28
     * @var string
29
     */
30
    private $country;
31
32
    /**
33
     * @param string $street
34
     * @param string $city
35
     * @param string $state
36
     * @param string $zip
37
     * @param string $country
38
     */
39 16
    public function __construct($street, $city, $state, $zip, $country)
40
    {
41 16
        $this->street = $street;
42 16
        $this->city = $city;
43 16
        $this->state = $state;
44 16
        $this->zip = $zip;
45 16
        $this->country = $country;
46 16
    }
47
48
    /**
49
     * @return string
50
     */
51 12
    public function getStreet()
52
    {
53 12
        return $this->street;
54
    }
55
56
    /**
57
     * @return string
58
     */
59 12
    public function getCity()
60
    {
61 12
        return $this->city;
62
    }
63
64
    /**
65
     * @return string
66
     */
67 12
    public function getState()
68
    {
69 12
        return $this->state;
70
    }
71
72
    /**
73
     * @return string
74
     */
75 12
    public function getZip()
76
    {
77 12
        return $this->zip;
78
    }
79
80
    /**
81
     * @return string
82
     */
83 12
    public function getCountry()
84
    {
85 12
        return $this->country;
86
    }
87
88 12
    public function toArray()
89
    {
90
        return [
91 12
            'country' => $this->getCountry(),
92 12
            'zip' => $this->getZip(),
93 12
            'state' => $this->getState(),
94 12
            'city' => $this->getCity(),
95 12
            'street' => $this->getStreet(),
96
        ];
97
    }
98
}
99