Passed
Pull Request — master (#507)
by
unknown
02:18
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
     * @param object $site
23
     */
24
    public function __construct(object $site)
25
    {
26
        $this->id = $site->id;
27
        $this->name = $site->name;
28
        $this->label = $site->label;
29
        $this->description = $site->description ?? null;
30
        $this->codebaseId = $site->codebase_id ?? null;
31
        $this->links = $site->_links;
32
    }
33
}
34