ServerResponse   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 21
c 1
b 0
f 0
dl 0
loc 37
rs 10

1 Method

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