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

FindStreetRequest::getType()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace VasilDakov\Speedy\Service\Location\Street;
6
7
use VasilDakov\Speedy\Traits\ToArray;
8
9
/**
10
 * Class FindStreetRequest.
11
 *
12
 * @author Vasil Dakov <[email protected]>
13
 * @copyright 2009-2022 Neutrino.bg
14
 *
15
 * @version 1.0
16
 */
17
class FindStreetRequest
18
{
19
    use ToArray;
20
21
    private int $siteId;
22
23
    private string $name;
24
25
    private ?string $type = null;
26
27 1
    public function __construct(int $siteId, string $name, ?string $type)
28
    {
29 1
        $this->siteId = $siteId;
30 1
        $this->name = $name;
31 1
        $this->type = $type;
32
    }
33
34
    /**
35
     * @return int
36
     */
37
    public function getSiteId(): int
38
    {
39
        return $this->siteId;
40
    }
41
42
    /**
43
     * @return string
44
     */
45
    public function getName(): string
46
    {
47
        return $this->name;
48
    }
49
50
    /**
51
     * @return string|null
52
     */
53
    public function getType(): ?string
54
    {
55
        return $this->type;
56
    }
57
}
58