DetailedEvent::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 12
rs 9.8666
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
// Copyright 1999-2021. Plesk International GmbH.
3
4
namespace PleskX\Api\Struct\EventLog;
5
6
class DetailedEvent extends \PleskX\Api\Struct
7
{
8
    /** @var int */
9
    public $id;
10
11
    /** @var string */
12
    public $type;
13
14
    /** @var int */
15
    public $time;
16
17
    /** @var string */
18
    public $class;
19
20
    /** @var string */
21
    public $objectId;
22
23
    /** @var string */
24
    public $user;
25
26
    /** @var string */
27
    public $host;
28
29
    public function __construct($apiResponse)
30
    {
31
        $this->_initScalarProperties($apiResponse, [
32
            'id',
33
            'type',
34
            'time',
35
            'class',
36
            ['obj_id' => 'objectId'],
37
            'user',
38
            'host',
39
        ]);
40
    }
41
}
42