CustomButton   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 40
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 13 1
1
<?php
2
// Copyright 1999-2021. Plesk International GmbH.
3
4
namespace PleskX\Api\Struct\Ui;
5
6
class CustomButton extends \PleskX\Api\Struct
7
{
8
    /** @var string */
9
    public $id;
10
11
    /** @var int */
12
    public $sortKey;
13
14
    /** @var bool */
15
    public $public;
16
17
    /** @var bool */
18
    public $internal;
19
20
    /** @var bool */
21
    public $noFrame;
22
23
    /** @var string */
24
    public $place;
25
26
    /** @var string */
27
    public $url;
28
29
    /** @var string */
30
    public $text;
31
32
    public function __construct($apiResponse)
33
    {
34
        $this->_initScalarProperties($apiResponse, ['id']);
35
        $this->_initScalarProperties($apiResponse->properties, [
36
            'sort_key',
37
            'public',
38
            'internal',
39
            ['noframe' => 'noFrame'],
40
            'place',
41
            'url',
42
            'text',
43
        ]);
44
    }
45
}
46