ServerResponse::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 10
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 12
rs 9.9332
1
<?php
2
3
namespace AcquiaCloudApi\Response;
4
5
class ServerResponse
6
{
7
    public string $id;
8
9
    public string $name;
10
11
    public string $hostname;
12
13
    public string $ip;
14
15
    public string $status;
16
17
    public string $region;
18
19
    /**
20
     * @var array<string> $roles
21
     */
22
    public array $roles;
23
24
    public string $amiType;
25
26
    public object $configuration;
27
28
    public object $flags;
29
30
    public function __construct(object $server)
31
    {
32
        $this->id = $server->id;
33
        $this->name = $server->name;
34
        $this->hostname = $server->hostname;
35
        $this->ip = $server->ip;
36
        $this->status = $server->status;
37
        $this->region = $server->region;
38
        $this->roles = $server->roles;
39
        $this->amiType = $server->ami_type;
40
        $this->configuration = $server->configuration;
41
        $this->flags = $server->flags;
42
    }
43
}
44