Lookup   A
last analyzed

Complexity

Total Complexity 19

Size/Duplication

Total Lines 79
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 19
lcom 0
cbo 0
dl 0
loc 79
rs 10
c 0
b 0
f 0

13 Methods

Rating   Name   Duplication   Size   Complexity  
B __construct() 0 9 7
A setStreet() 0 4 1
A getStreet() 0 4 1
A setStreetNumber() 0 4 1
A getStreetNumber() 0 4 1
A setPlace() 0 4 1
A getPlace() 0 4 1
A setPostcode() 0 4 1
A getPostcode() 0 4 1
A setCountry() 0 4 1
A getCountry() 0 4 1
A setGeocode() 0 4 1
A getGeocode() 0 4 1
1
<?php
2
3
namespace SmartyStreets\Location;
4
5
class Lookup
6
{
7
    private $street;
8
    private $streetNumber;
9
    private $place;
10
    private $postcode;
11
    private $country = 'Switzerland';
12
    private $geocode = 'true';
13
14
    public function __construct($values)
15
    {
16
        $this->setStreet(isset($values['street']) ? $values['street'] : '');
17
        $this->setStreetNumber(isset($values['street_number']) ? $values['street_number'] : '');
18
        $this->setPlace(isset($values['place']) ? $values['place'] : '');
19
        $this->setPostcode(isset($values['postcode']) ? $values['postcode'] : '');
20
        $this->setCountry(isset($values['country']) ? $values['country'] : 'Switzerland');
21
        $this->setGeocode(isset($values['geocodes']) ? $values['geocodes'] : 'true');
22
    }
23
24
    public function setStreet($value)
25
    {
26
        $this->street = $value;
27
    }
28
29
    public function getStreet()
30
    {
31
        return $this->street;
32
    }
33
34
    public function setStreetNumber($value)
35
    {
36
        $this->streetNumber = $value;
37
    }
38
39
    public function getStreetNumber()
40
    {
41
        return $this->streetNumber;
42
    }
43
44
    public function setPlace($value)
45
    {
46
        $this->place = $value;
47
    }
48
49
    public function getPlace()
50
    {
51
        return $this->place;
52
    }
53
54
    public function setPostcode($value)
55
    {
56
        $this->postcode = $value;
57
    }
58
59
    public function getPostcode()
60
    {
61
        return $this->postcode;
62
    }
63
64
    public function setCountry($value)
65
    {
66
        $this->country = $value;
67
    }
68
69
    public function getCountry()
70
    {
71
        return $this->country;
72
    }
73
74
    public function setGeocode($value)
75
    {
76
        $this->geocode = $value;
77
    }
78
79
    public function getGeocode()
80
    {
81
        return $this->geocode;
82
    }
83
}
84