HostingInfo::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.9666
c 0
b 0
f 0
cc 2
nc 2
nop 1
1
<?php
2
// Copyright 1999-2021. Plesk International 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