Completed
Push — master ( 35e0a4...fbed8d )
by
unknown
10s
created

HostingInfo   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 0
cbo 1
dl 0
loc 18
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 2
1
<?php
2
// Copyright 1999-2016. Parallels IP Holdings GmbH.
3
4
namespace PleskX\Api\Struct\Site;
5
6
class HostingInfo extends \PleskX\Api\Struct
7
{
8
    /** @var array */
9
    public $properties = [];
10
11
    /** @var string */
12
    public $ipAddress;
13
14
    public function __construct($apiResponse)
15
    {
16
        foreach ($apiResponse->vrt_hst->property as $property) {
17
            $this->properties[(string)$property->name] = (string)$property->value;
18
        }
19
        $this->_initScalarProperties($apiResponse->vrt_hst, [
20
            'ip_address',
21
        ]);
22
    }
23
}
24