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

GetContractClientsRequest   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 9
c 2
b 0
f 0
dl 0
loc 41
ccs 11
cts 11
cp 1
rs 10
wmc 5

4 Methods

Rating   Name   Duplication   Size   Complexity  
A toArray() 0 9 2
A getClientSystemId() 0 3 1
A setClientSystemId() 0 3 1
A __construct() 0 3 1
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