Passed
Push — main ( bcc232...2bc5a4 )
by Vasil
03:27
created

GetContractClientsRequest::getClientSystemId()   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
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace VasilDakov\Speedy\Service\Client;
6
7
use JMS\Serializer\Annotation as Serializer;
8
9
/**
10
 * Class GetContractClientsRequest
11
 *
12
 * @Serializer\AccessType("public_method")
13
 * @author Vasil Dakov <[email protected]>
14
 * @copyright 2009-2022 Neutrino.bg
15
 * @version 1.0
16
 */
17
class GetContractClientsRequest
18
{
19
    /**
20
     * @var string|null
21
     * @Serializer\Type("string")
22
     */
23
    private ?string $clientSystemId;
24
25 2
    public function __construct(?string $clientSystemId = null)
26
    {
27 2
        $this->clientSystemId = $clientSystemId;
28
    }
29
30
    /**
31
     * @return string|null
32
     */
33 1
    public function getClientSystemId(): ?string
34
    {
35 1
        return $this->clientSystemId;
36
    }
37
38
    /**
39
     * @param string|null $clientSystemId
40
     */
41 1
    public function setClientSystemId(?string $clientSystemId): void
42
    {
43 1
        $this->clientSystemId = $clientSystemId;
44
    }
45
46
    /**
47
     * @return array
48
     */
49 2
    public function toArray(): array
50
    {
51 2
        $array = [];
52
53 2
        if (! is_null($this->clientSystemId)) {
54 1
            $array['clientSystemId'] = $this->clientSystemId;
55
        }
56
57 2
        return $array;
58
    }
59
}
60