LimitDescriptor::__construct()   A
last analyzed

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-2021. Plesk International GmbH.
3
4
namespace PleskX\Api\Struct\Webspace;
5
6
class LimitDescriptor extends \PleskX\Api\Struct
7
{
8
    /** @var array */
9
    public $limits;
10
11
    public function __construct($apiResponse)
12
    {
13
        $this->limits = [];
14
15
        foreach ($apiResponse->descriptor->property as $propertyInfo) {
16
            $this->limits[(string) $propertyInfo->name] = new LimitInfo($propertyInfo);
17
        }
18
    }
19
}
20