LicensePlateResponse::setCountry()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace PBurggraf\LicensePlate\Response;
4
5
/**
6
 * @author Philip Burggraf <[email protected]>
7
 */
8
class LicensePlateResponse
9
{
10
    /**
11
     * @var string
12
     */
13
    protected $licensePlate;
14
15
    /**
16
     * @var bool
17
     */
18
    protected $valid;
19
20
    /**
21
     * @var string[]
22
     */
23
    protected $details;
24
25
    /**
26
     * @var string
27
     */
28
    protected $country;
29
30
    /**
31
     * @var int
32
     */
33
    protected $type;
34
35
    /**
36
     * @param $licensePlate
37
     */
38
    public function __construct($licensePlate)
39
    {
40
        $this->licensePlate = $licensePlate;
41
        $this->valid = false;
42
        $this->details = [];
43
        $this->country = '';
44
        $this->type = 0;
45
    }
46
47
    /**
48
     * @return string
49
     */
50
    public function getLicensePlate()
51
    {
52
        return $this->licensePlate;
53
    }
54
55
    /**
56
     * @param string $licensePlate
57
     */
58
    public function setLicensePlate($licensePlate)
59
    {
60
        $this->licensePlate = $licensePlate;
61
    }
62
63
    /**
64
     * @return bool
65
     */
66
    public function isValid()
67
    {
68
        return $this->valid;
69
    }
70
71
    /**
72
     * @param bool $valid
73
     */
74
    public function setValid($valid)
75
    {
76
        $this->valid = $valid;
77
    }
78
79
    /**
80
     * @return string[]
81
     */
82
    public function getDetails()
83
    {
84
        return $this->details;
85
    }
86
87
    /**
88
     * @param string[] $details
89
     */
90
    public function setDetails($details)
91
    {
92
        $this->details = $details;
93
    }
94
95
    /**
96
     * @param string|null $detail
97
     */
98
    public function addDetail($detail)
99
    {
100
        $this->details[] = $detail;
101
    }
102
103
    /**
104
     * @return string
105
     */
106
    public function getCountry()
107
    {
108
        return $this->country;
109
    }
110
111
    /**
112
     * @param string $country
113
     */
114
    public function setCountry($country)
115
    {
116
        $this->country = $country;
117
    }
118
119
    /**
120
     * @return int
121
     */
122
    public function getType()
123
    {
124
        return $this->type;
125
    }
126
127
    /**
128
     * @param int $type
129
     */
130
    public function setType($type)
131
    {
132
        $this->type = $type;
133
    }
134
}
135