FilterData   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 11
dl 0
loc 16
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
1
<?php
2
3
namespace App\Module\FilterSetting\Find\Data;
4
5
/**
6
 * Filter chip data.
7
 */
8
class FilterData
9
{
10
    public string $name;
11
    public string $paramName;
12
    public ?string $paramValue;
13
    // Category is the title of the group of filters, e.g. "Status" or "User"
14
    public ?string $category;
15
    public bool $authorized;
16
17 2
    public function __construct(array $data)
18
    {
19 2
        $this->name = $data['name'] ?? null;
20 2
        $this->paramName = $data['paramName'] ?? null;
21 2
        $this->paramValue = $data['paramValue'] ?? null;
22 2
        $this->category = $data['category'] ?? null;
23 2
        $this->authorized = $data['authorized'] ?? null;
24
    }
25
}
26