NotificationResponse   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 13 2
1
<?php
2
3
namespace AcquiaCloudApi\Response;
4
5
class NotificationResponse
6
{
7
    public string $uuid;
8
9
    public string $event;
10
11
    public string $label;
12
13
    public string $description;
14
15
    public string $created_at;
16
17
    public ?string $completed_at;
18
19
    public string $status;
20
21
    public int $progress;
22
23
    public object $context;
24
25
    public ?object $links;
26
27
    public function __construct(object $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