Completed
Push — master ( aed86d...e8b4c8 )
by Adam
04:04
created

NotificationResponse::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 13
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 11
c 1
b 0
f 0
dl 0
loc 13
rs 9.9
cc 2
nc 2
nop 1
1
<?php
2
3
namespace AcquiaCloudApi\Response;
4
5
/**
6
 * Class NotificationResponse
7
 * @package AcquiaCloudApi\Response
8
 */
9
class NotificationResponse
10
{
11
    public $uuid;
12
    public $event;
13
    public $label;
14
    public $description;
15
    public $created_at;
16
    public $completed_at;
17
    public $status;
18
    public $progress;
19
    public $context;
20
    public $links;
21
22
23
    /**
24
     * MemberResponse constructor.
25
     * @param object $notification
26
     */
27
    public function __construct($notification)
28
    {
29
        $this->uuid = $notification->uuid;
30
        $this->event = $notification->event;
31
        $this->label = $notification->label;
32
        $this->description = $notification->description;
33
        $this->created_at = $notification->created_at;
34
        $this->completed_at = $notification->completed_at;
35
        $this->status = $notification->status;
36
        $this->progress = $notification->progress;
37
        $this->context = $notification->context;
38
        if (property_exists($notification, '_links')) {
39
            $this->links = $notification->_links;
40
        }
41
    }
42
}
43