ApplicationResponse::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 14
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 1 Features 1
Metric Value
cc 2
eloc 11
c 2
b 1
f 1
nc 2
nop 1
dl 0
loc 14
rs 9.9
1
<?php
2
3
namespace AcquiaCloudApi\Response;
4
5
class ApplicationResponse
6
{
7
    public int $id;
8
9
    public string $uuid;
10
11
    public string $name;
12
13
    public ?object $hosting;
14
15
    public object $subscription;
16
17
    public object $organization;
18
19
    public ?string $type;
20
21
    public object $flags;
22
23
    public string $status;
24
25
    public object $links;
26
27
    public function __construct(object $application)
28
    {
29
        $this->id = $application->id;
30
        $this->uuid = $application->uuid;
31
        $this->name = $application->name;
32
        $this->hosting = $application->hosting;
33
        $this->subscription = $application->subscription;
34
        $this->organization = $application->organization;
35
        if (property_exists($application, 'type')) {
36
            $this->type = $application->type;
37
        }
38
        $this->flags = $application->flags;
39
        $this->status = $application->status;
40
        $this->links = $application->_links;
41
    }
42
}
43