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

NotificationResponse   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 22
dl 0
loc 31
rs 10
c 1
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 13 2
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