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

FindStreetRequest   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Test Coverage

Coverage 40%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 11
dl 0
loc 39
ccs 4
cts 10
cp 0.4
rs 10
c 1
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getType() 0 3 1
A getName() 0 3 1
A getSiteId() 0 3 1
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