Completed
Push — master ( 36c636...10fb37 )
by
unknown
01:53
created

PhpSettings::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 1
1
<?php
2
// Copyright 1999-2019. Parallels IP Holdings GmbH.
3
4
namespace PleskX\Api\Struct\Webspace;
5
6
class PhpSettings extends \PleskX\Api\Struct
7
{
8
    /** @var array */
9
    public $properties;
10
11
    public function __construct($apiResponse)
12
    {
13
        $this->properties = [];
14
15
        foreach ($apiResponse->webspace->get->result->data->{'php-settings'}->setting as $setting) {
16
            $this->properties[(string)$setting->name] = (string)$setting->value;
17
        }
18
    }
19
}
20