Passed
Push — master ( 62dee2...4b8e5c )
by Dane
02:13
created

SiteResponse::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 6
nc 1
nop 1
dl 0
loc 8
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace AcquiaCloudApi\Response;
4
5
class SiteResponse
6
{
7
    public string $id;
8
9
    public string $name;
10
11
    public string $label;
12
13
    public ?string $description;
14
15
    public ?string $codebaseId;
16
17
    public object $links;
18
19
    /**
20
     * SiteResponse constructor.
21
     */
22
    public function __construct(object $site)
23
    {
24
        $this->id = $site->id;
25
        $this->name = $site->name;
26
        $this->label = $site->label;
27
        $this->description = $site->description ?? null;
28
        $this->codebaseId = $site->codebase_id ?? null;
29
        $this->links = $site->_links;
30
    }
31
}
32