Passed
Push — main ( 2bc5a4...5ffc2f )
by Vasil
16:31 queued 13:09
created

FindSiteRequest::getCountryId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
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 VasilDakov\Speedy\Service\Location\Site;
6
7
use VasilDakov\Speedy\Traits\ToArray;
8
9
/**
10
 * Class FindSiteRequest.
11
 *
12
 * @author    Vasil Dakov <[email protected]>
13
 * @author    Valentin Valkanov <[email protected]>
14
 * @copyright 2009-2022 Neutrino.bg
15
 *
16
 * @version   1.0
17
 *
18
 * @see       https://services.speedy.bg/api/api_examples.html#FindSiteRequest
19
 */
20
class FindSiteRequest
21
{
22
    use ToArray;
23
24
    private int $countryId;
25
26
    private ?string $name = null;
27
28
    private ?string $postCode = null;
29
30
    private ?string $type = null;
31
32
    private ?string $municipality = null;
33
34 5
    public function __construct(int $countryId, ?string $name)
35
    {
36 5
        $this->countryId = $countryId;
37 5
        $this->name = $name;
38
    }
39
40 1
    public function getCountryId(): int
41
    {
42 1
        return $this->countryId;
43
    }
44
45
    public function setCountryId(int $countryId): void
46
    {
47
        $this->countryId = $countryId;
48
    }
49
50 1
    public function getName(): ?string
51
    {
52 1
        return $this->name;
53
    }
54
55
    public function setName(?string $name): void
56
    {
57
        $this->name = $name;
58
    }
59
60 1
    public function getPostCode(): ?string
61
    {
62 1
        return $this->postCode;
63
    }
64
65 1
    public function setPostCode(?string $postCode): void
66
    {
67 1
        $this->postCode = $postCode;
68
    }
69
70 1
    public function getType(): ?string
71
    {
72 1
        return $this->type;
73
    }
74
75 1
    public function setType(?string $type): void
76
    {
77 1
        $this->type = $type;
78
    }
79
80 1
    public function getMunicipality(): ?string
81
    {
82 1
        return $this->municipality;
83
    }
84
85 1
    public function setMunicipality(?string $municipality): void
86
    {
87 1
        $this->municipality = $municipality;
88
    }
89
}
90