Passed
Push — main ( 5b7f1c...98c11d )
by Vasil
03:17
created

FindComplexRequest::setName()   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 1
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\Complex;
6
7
use VasilDakov\Speedy\ToArray;
8
9
/**
10
 * Class FindComplexRequest
11
 *
12
 * @author Vasil Dakov <[email protected]>
13
 * @copyright 2009-2022 Neutrino.bg
14
 * @version 1.0
15
 */
16
class FindComplexRequest
17
{
18
    use ToArray;
19
20
    /**
21
     * @var int
22
     */
23
    private int $siteId;
24
25
    /**
26
     * @var string
27
     */
28
    private string $name;
29
30 3
    public function __construct(int $siteId, string $name)
31
    {
32 3
        $this->setSiteId($siteId);
33 3
        $this->setName($name);
34
    }
35
36
    /**
37
     * @param int $siteId
38
     */
39 3
    public function setSiteId(int $siteId): void
40
    {
41 3
        $this->siteId = $siteId;
42
    }
43
44
    /**
45
     * @return int
46
     */
47 1
    public function getSiteId(): int
48
    {
49 1
        return $this->siteId;
50
    }
51
52
    /**
53
     * @param string $name
54
     */
55 3
    public function setName(string $name): void
56
    {
57 3
        $this->name = $name;
58
    }
59
60
    /**
61
     * @return string
62
     */
63 1
    public function getName(): string
64
    {
65 1
        return $this->name;
66
    }
67
}
68