Test Failed
Pull Request — master (#20)
by
unknown
05:08
created

SearchQuery::setQ()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Werkspot\KvkApi\Http\Search;
6
7
/**
8
 * Class SearchQuery
9
 *
10
 * @author Patrick Development <[email protected]>
11
 */
12
final class SearchQuery implements QueryInterface
13
{
14
    /**
15
     * KvK number, identifying number for a registration in the Netherlands Business Register. Consists of 8 digits
16
     *
17
     * @var string
18
     */
19
    private $kvkNumber;
20
21
    /**
22
     * Branch number (Vestigingsnummer), identifying number of a branch. Consists of 12 digits
23
     *
24
     * @var string
25
     */
26
    private $branchNumber;
27
28
    /**
29
     * RSIN is an identification number for legal entities and partnerships. Consist of only digits
30
     *
31
     * @var int
32
     */
33
    private $rsin;
34
35
    /**
36
     * Street of an address
37
     *
38
     * @var string
39
     */
40
    private $street;
41
42
    /**
43
     * House number of an address
44
     *
45
     * @var string
46
     */
47
    private $houseNumber;
48
49
    /**
50
     * Postal code or ZIP code, example 1000AA
51
     *
52
     * @var string
53
     */
54
    private $postalCode;
55
56
    /**
57
     * City or Town name
58
     *
59
     * @var string
60
     */
61
    private $city;
62
63
    /**
64
     * Indication  to include searching through inactive dossiers/deregistered companies.
65
     * @note History of inactive companies is after 1 January 2012
66
     *
67
     * @var bool
68
     */
69
    private $includeInactiveRegistrations;
70
71
    /**
72
     * restrictToMainBranch Search is restricted to main branches.
73
     *
74
     * @var bool
75
     */
76
    private $restrictToMainBranch;
77
78
    /**
79
     * Defines the search collection for the query
80
     *
81
     * @var string
82
     */
83
    private $site;
84
85
    /**
86
     * User can optionally add a context to identify his result later on
87
     *
88
     * @var string
89
     */
90
    private $context;
91
92
    /**
93
     * Free format text search for in the compiled search description.
94
     *
95
     * @var string
96
     */
97
    private $q;
98
99
    public function getStreet(): string
100
    {
101
        return $this->street;
102
    }
103
104
    public function setStreet(string $street): SearchQuery
105
    {
106
        $this->street = $street;
107
108
        return $this;
109
    }
110
111
    public function getHouseNumber(): string
112
    {
113
        return $this->houseNumber;
114
    }
115
116
    public function setHouseNumber(string $houseNumber): SearchQuery
117
    {
118
        $this->houseNumber = $houseNumber;
119
120
        return $this;
121
    }
122
123
    public function getKvkNumber(): string
124
    {
125
        return $this->kvkNumber;
126
    }
127
128
    public function setKvkNumber(string $kvkNumber): SearchQuery
129
    {
130
        $this->kvkNumber = $kvkNumber;
131
132
        return $this;
133
    }
134
135
    public function getBranchNumber(): string
136
    {
137
        return $this->branchNumber;
138
    }
139
140
    public function setBranchNumber(string $branchNumber): SearchQuery
141
    {
142
        $this->branchNumber = $branchNumber;
143
144
        return $this;
145
    }
146
147
    public function getRsin(): int
148
    {
149
        return $this->rsin;
150
    }
151
152
    public function setRsin(int $rsin): SearchQuery
153
    {
154
        $this->rsin = $rsin;
155
156
        return $this;
157
    }
158
159
    public function getPostalCode(): string
160
    {
161
        return $this->postalCode;
162
    }
163
164
    public function setPostalCode(string $postalCode): SearchQuery
165
    {
166
        $this->postalCode = $postalCode;
167
168
        return $this;
169
    }
170
171
    public function getCity(): string
172
    {
173
        return $this->city;
174
    }
175
176
    public function setCity(string $city): SearchQuery
177
    {
178
        $this->city = $city;
179
180
        return $this;
181
    }
182
183
    public function isIncludeInactiveRegistrations(): bool
184
    {
185
        return $this->includeInactiveRegistrations;
186
    }
187
188
    public function setIncludeInactiveRegistrations(bool $includeInactiveRegistrations): SearchQuery
189
    {
190
        $this->includeInactiveRegistrations = $includeInactiveRegistrations;
191
192
        return $this;
193
    }
194
195
    public function isRestrictToMainBranch(): bool
196
    {
197
        return $this->restrictToMainBranch;
198
    }
199
200
    public function setRestrictToMainBranch(bool $restrictToMainBranch): SearchQuery
201
    {
202
        $this->restrictToMainBranch = $restrictToMainBranch;
203
204
        return $this;
205
    }
206
207
    public function getSite(): string
208
    {
209
        return $this->site;
210
    }
211
212
    public function setSite(string $site): SearchQuery
213
    {
214
        $this->site = $site;
215
216
        return $this;
217
    }
218
219
    public function getContext(): string
220
    {
221
        return $this->context;
222
    }
223
224
    public function setContext(string $context): SearchQuery
225
    {
226
        $this->context = $context;
227
228
        return $this;
229
    }
230
231
    public function getQ(): string
232
    {
233
        return $this->q;
234
    }
235
236
    public function setQ(string $q): SearchQuery
237
    {
238
        $this->q = $q;
239
240
        return $this;
241
    }
242
243
    public function get(): array
244
    {
245
        return get_object_vars($this);
246
    }
247
}
248