ClientListResult   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 18
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A jsonSerialize() 0 5 1
1
<?php
2
3
namespace App\Module\Client\List\Data;
4
5
use App\Module\Client\Data\ClientData;
6
7
/**
8
 * Aggregate DTO to store ClientData combined with
9
 * client status and assigned user privileges.
10
 */
11
class ClientListResult extends ClientData
12
{
13
    public ?string $clientStatusPrivilege = null;
14
    public ?string $assignedUserPrivilege = null;
15
16 13
    public function __construct(array $clientResultData = [])
17
    {
18 13
        parent::__construct($clientResultData);
19
    }
20
21
    /**
22
     * Output for json_encode.
23
     */
24 12
    public function jsonSerialize(): array
25
    {
26 12
        return array_merge(parent::jsonSerialize(), [
27 12
            'clientStatusPrivilege' => $this->clientStatusPrivilege,
28 12
            'assignedUserPrivilege' => $this->assignedUserPrivilege,
29 12
        ]);
30
    }
31
}
32