Address::getStreet()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace ShopperLibrary\ObjectModule\Properties\Base;
4
5
/**
6
 * Class Address
7
 * @package ShopperLibrary\ObjectModule\Properties\Base
8
 */
9
class Address implements \JsonSerializable
10
{
11
    /**
12
     * @var string $street
13
     */
14
    protected $street;
15
16
    /**
17
     * @var string $city
18
     */
19
    protected $city;
20
21
    /**
22
     * @var string $zipCode
23
     */
24
    protected $zipCode;
25
26
    /**
27
     * @return string
28
     */
29
    public function getStreet()
30
    {
31
        return $this->street;
32
    }
33
34
    /**
35
     * @param string $street
36
     *
37
     * @return Address
38
     */
39
    public function setStreet($street)
40
    {
41
        $this->street = $street;
42
43
        return $this;
44
    }
45
46
    /**
47
     * @return string
48
     */
49
    public function getCity()
50
    {
51
        return $this->city;
52
    }
53
54
    /**
55
     * @param string $city
56
     *
57
     * @return Address
58
     */
59
    public function setCity($city)
60
    {
61
        $this->city = $city;
62
63
        return $this;
64
    }
65
66
    /**
67
     * @return string
68
     */
69
    public function getZipCode()
70
    {
71
        return $this->zipCode;
72
    }
73
74
    /**
75
     * @param string $zipCode
76
     *
77
     * @return Address
78
     */
79
    public function setZipCode($zipCode)
80
    {
81
        $this->zipCode = $zipCode;
82
83
        return $this;
84
    }
85
86
    /**
87
     * Encode protected properties
88
     *
89
     * @return array
90
     */
91
    public function jsonSerialize()
92
    {
93
        $object = array();
94
95
        foreach ($this as $key => $value) {
96
            $object[$key] = $value;
97
        }
98
99
        return $object;
100
    }
101
}
102