Test Failed
Pull Request — master (#24)
by Herberto
05:13
created

ProfileQuery::getSite()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Werkspot\KvkApi\Http\Search;
6
7
final class ProfileQuery implements QueryInterface
8
{
9
    /**
10
     * KvK number, identifying number for a registration in the Netherlands Business Register. Consists of 8 digits
11
     *
12
     * @var string
13
     */
14
    private $kvkNumber;
15
16
    /**
17
     * Branch number (Vestigingsnummer), identifying number of a branch. Consists of 12 digits
18
     *
19
     * @var string
20
     */
21
    private $branchNumber;
22
23
    /**
24
     * RSIN is an identification number for legal entities and partnerships. Consist of only digits
25
     *
26
     * @var int
27
     */
28
    private $rsin;
29
30
    /**
31
     * Indication  to include searching through inactive dossiers/deregistered companies.
32
     *
33
     * @note History of inactive companies is after 1 January 2012
34
     *
35
     * @var bool
36
     */
37
    private $includeInactiveRegistrations;
38
39
    /**
40
     * RestrictToMainBranch Search is restricted to main branches.
41
     * @var bool
42
     */
43
    private $restrictToMainBranch;
44
45
    /**
46
     * Defines the search collection for the query
47
     *
48
     * @var string
49
     */
50
    private $site;
51
52
    /**
53
     * User can optionally add a context to identify his result later on
54
     *
55
     * @var string
56
     */
57
    private $context;
58
59
    /**
60
     * Free format text search for in the compiled search description.
61
     *
62
     * @var string
63
     */
64
    private $freeTextQuery;
65
66 36
    public function getKvkNumber(): string
67
    {
68 36
        return $this->kvkNumber;
69
    }
70
71 7
    public function setKvkNumber(string $kvkNumber): void
72
    {
73 7
        $this->kvkNumber = $kvkNumber;
74 7
    }
75
76 12
    public function getBranchNumber(): string
77
    {
78 12
        return $this->branchNumber;
79
    }
80
81 5
    public function setBranchNumber(string $branchNumber): void
82
    {
83 5
        $this->branchNumber = $branchNumber;
84 5
    }
85
86 5
    public function getRsin(): int
87
    {
88 5
        return $this->rsin;
89
    }
90
91 5
    public function setRsin(int $rsin): void
92
    {
93 5
        $this->rsin = $rsin;
94 5
    }
95
96 2
    public function isIncludeInactiveRegistrations(): bool
97
    {
98 2
        return $this->includeInactiveRegistrations;
99
    }
100
101 2
    public function setIncludeInactiveRegistrations(bool $includeInactiveRegistrations): void
102
    {
103 2
        $this->includeInactiveRegistrations = $includeInactiveRegistrations;
104 2
    }
105
106 2
    public function isRestrictToMainBranch(): bool
107
    {
108 2
        return $this->restrictToMainBranch;
109
    }
110
111 2
    public function setRestrictToMainBranch(bool $restrictToMainBranch): void
112
    {
113 2
        $this->restrictToMainBranch = $restrictToMainBranch;
114 2
    }
115
116 5
    public function getSite()
117
    {
118 5
        return $this->site;
119
    }
120
121 5
    public function setSite($site): void
122
    {
123 5
        $this->site = $site;
124 5
    }
125
126 5
    public function getContext(): string
127
    {
128 5
        return $this->context;
129
    }
130
131 5
    public function setContext(string $context): void
132
    {
133 5
        $this->context = $context;
134 5
    }
135
136 5
    public function getFreeTextQuery(): string
137
    {
138 5
        return $this->freeTextQuery;
139
    }
140
141 5
    public function setFreeTextQuery(string $freeTextQuery): void
142
    {
143 5
        $this->freeTextQuery = $freeTextQuery;
144 5
    }
145
146 36
    public function get(): array
147
    {
148
        return [
149 36
            'kvkNumber' => $this->getKvkNumber(),
150 7
            'branchNumber' => $this->getBranchNumber(),
151
            'rsin' => $this->getRsin(),
152
            'includeInactiveRegistrations' => $this->isIncludeInactiveRegistrations(),
153
            'restrictToMainBranch' => $this->isRestrictToMainBranch(),
154
            'site' => $this->getSite(),
155
            'context' => $this->getContext(),
156
            'q' => $this->getFreeTextQuery(),
157
        ];
158
    }
159
}
160