Completed
Pull Request — master (#34)
by Adam
09:18
created

InsightAlertResponse::__construct()   A

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
/**
6
 * Class InsightAlertResponse
7
 * @package AcquiaCloudApi\Response
8
 */
9
class InsightAlertResponse
10
{
11
12
    public $alert_id;
13
    public $uuid;
14
    public $name;
15
    public $message;
16
    public $article_link;
17
    public $severity;
18
    public $severity_label;
19
    public $failed_value;
20
    public $fix_details;
21
    public $categories;
22
    public $flags;
23
    public $links;
24
25
    /**
26
     * InsightAlertResponse constructor.
27
     * @param object $alert
28
     */
29
    public function __construct($alert)
30
    {
31
        $this->alert_id = $alert->alert_id;
32
        $this->uuid = $alert->uuid;
33
        $this->name = $alert->name;
34
        $this->message = $alert->message;
35
        $this->article_link = $alert->article_link;
36
        $this->severity = $alert->severity;
37
        $this->severity_label = $alert->severity_label;
38
        $this->failed_value = $alert->failed_value;
39
        $this->fix_details = $alert->fix_details;
40
        $this->categories = $alert->categories;
41
        $this->flags = $alert->flags;
42
        $this->links = $alert->_links;
43
    }
44
}
45