Passed
Pull Request — master (#493)
by
unknown
13:26
created

CodebaseResponse   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 27
c 1
b 0
f 1
dl 0
loc 35
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 15 2
1
<?php
2
3
namespace AcquiaCloudApi\Response;
4
5
/**
6
 * Class CodebaseResponse
7
 * @package AcquiaCloudApi\Response
8
 */
9
class CodebaseResponse
10
{
11
    public $id;
12
    public $label;
13
    public $region;
14
    public $vcs_url;
15
    public $repository_id;
16
    public $created_at;
17
    public $updated_at;
18
    public $description;
19
    public $flags;
20
    public $hash;
21
    public $applications_total;
22
    public $links;
23
    public $embedded;
24
25
    /**
26
     * CodebaseResponse constructor.
27
     * @param object $codebase
28
     */
29
    public function __construct($codebase)
30
    {
31
        $this->id = $codebase->id;
32
        $this->label = $codebase->label;
33
        $this->region = $codebase->region;
34
        $this->vcs_url = $codebase->vcs_url;
35
        $this->repository_id = $codebase->repository_id;
36
        $this->created_at = $codebase->created_at;
37
        $this->updated_at = $codebase->updated_at;
38
        $this->description = $codebase->description;
39
        $this->flags = $codebase->flags;
40
        $this->hash = $codebase->hash;
41
        $this->applications_total = $codebase->applications_total;
42
        $this->links = $codebase->_links;
43
        $this->embedded = isset($codebase->_embedded) ? $codebase->_embedded : null;
44
    }
45
}
46