Test Failed
Push — main ( f82a65...6b4729 )
by Vasil
03:36
created

GetContractClientsRequest::__serialize()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 1
cts 1
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\Client;
6
7
use JMS\Serializer\Annotation as Serializer;
8
use VasilDakov\Speedy\Property;
9
10
/**
11
 * Class GetContractClientsRequest.
12
 *
13
 * @Serializer\AccessType("public_method")
14
 *
15
 * @author Vasil Dakov <[email protected]>
16
 * @copyright 2009-2022 Neutrino.bg
17
 *
18
 * @version 1.0
19
 */
20
class GetContractClientsRequest
21
{
22
    /**
23
     * @Serializer\Type("string")
24
     */
25
    private ?string $clientSystemId = null;
26 2
27
    public function __construct(?string $clientSystemId)
28 2
    {
29
        $this->clientSystemId = $clientSystemId;
30
    }
31 1
32
    public function getClientSystemId(): ?string
33 1
    {
34
        return $this->clientSystemId;
35
    }
36 1
37
    public function setClientSystemId(?string $clientSystemId): void
38 1
    {
39
        $this->clientSystemId = $clientSystemId;
40
    }
41 2
42
    public function __serialize(): array
43 2
    {
44
        return $this->toArray();
45 2
    }
46 1
47
    public function toArray(): array
48
    {
49 2
        return [
50
            Property::CLIENT_SYSTEM_ID->value => $this->clientSystemId
51
        ];
52
    }
53
}
54