Completed
Push — master ( 9673b1...85c376 )
by Baldur
02:00
created

Model/Address.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

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
    public function __construct($street, $city, $state, $zip, $country)
40
    {
41
        $this->street = $street;
42
        $this->city = $city;
43
        $this->state = $state;
44
        $this->zip = $zip;
45
        $this->country = $country;
46
    }
47
48
    /**
49
     * @return string
50
     */
51
    public function getStreet()
52
    {
53
        return $this->street;
54
    }
55
56
    /**
57
     * @return string
58
     */
59
    public function getCity()
60
    {
61
        return $this->city;
62
    }
63
64
    /**
65
     * @return string
66
     */
67
    public function getState()
68
    {
69
        return $this->state;
70
    }
71
72
    /**
73
     * @return string
74
     */
75
    public function getZip()
76
    {
77
        return $this->zip;
78
    }
79
80
    /**
81
     * @return string
82
     */
83
    public function getCountry()
84
    {
85
        return $this->country;
86
    }
87
88
    function toArray()
0 ignored issues
show
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
89
    {
90
        return [
91
            'country' => $this->getCountry(),
92
            'zip' => $this->getZip(),
93
            'state' => $this->getState(),
94
            'city' => $this->getCity(),
95
            'street' => $this->getStreet(),
96
        ];
97
    }
98
}
99