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

GetContractClientsRequest   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

5 Methods

Rating   Name   Duplication   Size   Complexity  
A toArray() 0 4 1
A getClientSystemId() 0 3 1
A __serialize() 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
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