DashboardData::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 1
dl 0
loc 7
ccs 6
cts 6
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace App\Module\Dashboard\DisplayPage\Data;
4
5
class DashboardData
6
{
7
    public string $title;
8
    public ?string $panelId;
9
    public ?string $panelClass;
10
    public ?string $panelHtmlContent;
11
    public bool $authorized;
12
13 1
    public function __construct(array $data)
14
    {
15 1
        $this->title = $data['title'] ?? null;
16 1
        $this->panelId = $data['panelId'] ?? null;
17 1
        $this->panelClass = $data['panelClass'] ?? null;
18 1
        $this->panelHtmlContent = $data['panelHtmlContent'] ?? null;
19 1
        $this->authorized = $data['authorized'] ?? null;
20
    }
21
}
22