InsightAlertResponse::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 14
Code Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 12
nc 1
nop 1
dl 0
loc 14
rs 9.8666
c 1
b 0
f 0
1
<?php
2
3
namespace AcquiaCloudApi\Response;
4
5
class InsightAlertResponse
6
{
7
    public int $alert_id;
8
9
    public string $uuid;
10
11
    public string $name;
12
13
    public string $message;
14
15
    public string $article_link;
16
17
    public int $severity;
18
19
    public string $severity_label;
20
21
    public string $failed_value;
22
23
    public string $fix_details;
24
25
    /**
26
     * @var array<string> $categories
27
     */
28
    public array $categories;
29
30
    public object $flags;
31
32
    public object $links;
33
34
    public function __construct(object $alert)
35
    {
36
        $this->alert_id = $alert->alert_id;
37
        $this->uuid = $alert->uuid;
38
        $this->name = $alert->name;
39
        $this->message = $alert->message;
40
        $this->article_link = $alert->article_link;
41
        $this->severity = $alert->severity;
42
        $this->severity_label = $alert->severity_label;
43
        $this->failed_value = $alert->failed_value;
44
        $this->fix_details = $alert->fix_details;
45
        $this->categories = $alert->categories;
46
        $this->flags = $alert->flags;
47
        $this->links = $alert->_links;
48
    }
49
}
50