Test Failed
Pull Request — master (#34)
by Adam
03:36
created

NotificationResponse   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

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

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
     * MemberResponse constructor.
23
     * @param object $notification
24
     */
25
    public function __construct($notification)
26
    {
27
        $this->uuid = $notification->uuid;
28
        $this->event = $notification->event;
29
        $this->label = $notification->label;
30
        $this->description = $notification->description;
31
        $this->created_at = $notification->created_at;
32
        $this->completed_at = $notification->completed_at;
33
        $this->status = $notification->status;
34
        $this->progress = $notification->progress;
35
        $this->context = $notification->context;
36
        if (property_exists($notification, '_links')) {
37
            $this->links = $notification->_links;
38
        }
39
    }
40
}
41