Completed
Push — master ( 930490...fc561b )
by
unknown
23s queued 11s
created

Limits::__construct()   A

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-2019. Plesk International GmbH.
3
4
namespace PleskX\Api\Struct\Webspace;
5
6
class Limits extends \PleskX\Api\Struct
7
{
8
    /** @var string */
9
    public $overuse;
10
11
    /** @var array */
12
    public $limits;
13
14
    public function __construct($apiResponse)
15
    {
16
        $this->_initScalarProperties($apiResponse, ['overuse']);
17
        $this->limits = [];
18
19
        foreach ($apiResponse->limit as $limit) {
20
            $this->limits[(string) $limit->name] = new Limit($limit);
21
        }
22
    }
23
}
24