PermissionDescriptor::__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 PermissionDescriptor extends \PleskX\Api\Struct
7
{
8
    /** @var array */
9
    public $permissions;
10
11
    public function __construct($apiResponse)
12
    {
13
        $this->permissions = [];
14
15
        foreach ($apiResponse->descriptor->property as $propertyInfo) {
16
            $this->permissions[(string) $propertyInfo->name] = new PermissionInfo($propertyInfo);
17
        }
18
    }
19
}
20