Passed
Push — master ( 7cd6c5...dd963e )
by Laurens
04:05
created

ProfileQuery   A

Complexity

Total Complexity 17

Size/Duplication

Total Lines 136
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 17
lcom 0
cbo 0
dl 0
loc 136
ccs 42
cts 42
cp 1
rs 10
c 0
b 0
f 0

17 Methods

Rating   Name   Duplication   Size   Complexity  
A getKvkNumber() 0 4 1
A setKvkNumber() 0 4 1
A getBranchNumber() 0 4 1
A setBranchNumber() 0 4 1
A getRsin() 0 4 1
A setRsin() 0 4 1
A isIncludeInactiveRegistrations() 0 4 1
A setIncludeInactiveRegistrations() 0 4 1
A isRestrictToMainBranch() 0 4 1
A setRestrictToMainBranch() 0 4 1
A getSite() 0 4 1
A setSite() 0 4 1
A getContext() 0 4 1
A setContext() 0 4 1
A getQ() 0 4 1
A setQ() 0 4 1
A get() 0 4 1
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
     * @info KvK number, identifying number for a registration in the Netherlands Business Register. Consists of 8 digits
11
     * @var int
12
     */
13
    private $kvkNumber;
14
15
    /**
16
     * @info Branch number (Vestigingsnummer), identifying number of a branch. Consists of 12 digits
17
     * @var string
18
     */
19
    private $branchNumber;
20
21
    /**
22
     * @info RSIN is an identification number for legal entities and partnerships. Consist of only digits
23
     * @var int
24
     */
25
    private $rsin;
26
27
    /**
28
     * @info Indication  to include searching through inactive dossiers/deregistered companies.
29
     * @note History of inactive companies is after 1 January 2012
30
     * @var bool
31
     */
32
    private $includeInactiveRegistrations;
33
34
    /**
35
     * @info restrictToMainBranch Search is restricted to main branches.
36
     * @var bool
37
     */
38
    private $restrictToMainBranch;
39
40
    /**
41
     * @info Defines the search collection for the query
42
     * @var string
43
     */
44
    private $site;
45
46
    /**
47
     * @info User can optionally add a context to identify his result later on
48
     * @var string
49
     */
50
    private $context;
51
52
    /**
53
     * @info Free format text search for in the compiled search description.
54
     * @var string
55
     */
56
    private $q;
57
58 5
    public function getKvkNumber(): int
59
    {
60 5
        return $this->kvkNumber;
61
    }
62
63 23
    public function setKvkNumber(int $kvkNumber): void
64
    {
65 23
        $this->kvkNumber = $kvkNumber;
66 23
    }
67
68 5
    public function getBranchNumber(): string
69
    {
70 5
        return $this->branchNumber;
71
    }
72
73 5
    public function setBranchNumber(string $branchNumber): void
74
    {
75 5
        $this->branchNumber = $branchNumber;
76 5
    }
77
78 5
    public function getRsin(): int
79
    {
80 5
        return $this->rsin;
81
    }
82
83 5
    public function setRsin(int $rsin): void
84
    {
85 5
        $this->rsin = $rsin;
86 5
    }
87
88 2
    public function isIncludeInactiveRegistrations(): bool
89
    {
90 2
        return $this->includeInactiveRegistrations;
91
    }
92
93 2
    public function setIncludeInactiveRegistrations(bool $includeInactiveRegistrations): void
94
    {
95 2
        $this->includeInactiveRegistrations = $includeInactiveRegistrations;
96 2
    }
97
98 2
    public function isRestrictToMainBranch(): bool
99
    {
100 2
        return $this->restrictToMainBranch;
101
    }
102
103 2
    public function setRestrictToMainBranch(bool $restrictToMainBranch): void
104
    {
105 2
        $this->restrictToMainBranch = $restrictToMainBranch;
106 2
    }
107
108 5
    public function getSite()
109
    {
110 5
        return $this->site;
111
    }
112
113 5
    public function setSite($site): void
114
    {
115 5
        $this->site = $site;
116 5
    }
117
118 5
    public function getContext(): string
119
    {
120 5
        return $this->context;
121
    }
122
123 5
    public function setContext(string $context): void
124
    {
125 5
        $this->context = $context;
126 5
    }
127
128 5
    public function getQ(): string
129
    {
130 5
        return $this->q;
131
    }
132
133 5
    public function setQ(string $q): void
134
    {
135 5
        $this->q = $q;
136 5
    }
137
138 52
    public function get(): array
139
    {
140 52
        return get_object_vars($this);
141
    }
142
}
143