AsteriskInfo   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 56
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 1
dl 0
loc 56
ccs 0
cts 24
cp 0
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getBuildInfo() 0 4 1
A getConfigInfo() 0 4 1
A getStatusInfo() 0 4 1
A getSystemInfo() 0 4 1
A __construct() 0 9 1
1
<?php
2
3
/*
4
 * Copyright 2014 Brian Smith <[email protected]>.
5
 *
6
 * Licensed under the Apache License, Version 2.0 (the "License");
7
 * you may not use this file except in compliance with the License.
8
 * You may obtain a copy of the License at
9
 *
10
 *      http://www.apache.org/licenses/LICENSE-2.0
11
 *
12
 * Unless required by applicable law or agreed to in writing, software
13
 * distributed under the License is distributed on an "AS IS" BASIS,
14
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
 * See the License for the specific language governing permissions and
16
 * limitations under the License.
17
 */
18
19
namespace phparia\Resources;
20
21
/**
22
 * Asterisk system information
23
 *
24
 * @author Brian Smith <[email protected]>
25
 */
26
class AsteriskInfo extends Response
27
{
28
    /**
29
     * @var BuildInfo Info about how Asterisk was built
30
     */
31
    private $buildInfo;
32
33
    /**
34
     * @var ConfigInfo Info about Asterisk configuration
35
     */
36
    private $configInfo;
37
38
    /**
39
     * @var StatusInfo Info about Asterisk status
40
     */
41
    private $statusInfo;
42
43
    /**
44
     * @var SystemInfo Info about Asterisk
45
     */
46
    private $systemInfo;
47
48
    public function getBuildInfo()
49
    {
50
        return $this->buildInfo;
51
    }
52
53
    public function getConfigInfo()
54
    {
55
        return $this->configInfo;
56
    }
57
58
    public function getStatusInfo()
59
    {
60
        return $this->statusInfo;
61
    }
62
63
    public function getSystemInfo()
64
    {
65
        return $this->systemInfo;
66
    }
67
68
    /**
69
     * @param string $response
70
     */
71
    public function __construct($response)
72
    {
73
        parent::__construct($response);
74
75
        $this->buildInfo = $this->getResponseValue('build', 'phparia\Resources\BuildInfo');
76
        $this->configInfo = $this->getResponseValue('config', 'phparia\Resources\ConfigInfo');
77
        $this->statusInfo = $this->getResponseValue('statusInfo', 'phparia\Resources\StatusInfo');
78
        $this->systemInfo = $this->getResponseValue('systemInfo', 'phparia\Resources\SystemInfo');
79
    }
80
81
}
82