ResponseRecord   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 87
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 6
lcom 0
cbo 0
dl 0
loc 87
ccs 20
cts 20
cp 1
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A __destruct() 0 7 1
A getPid() 0 4 1
A getAlias() 0 4 1
A getTimeout() 0 4 1
A getTimeoutIncrease() 0 4 1
1
<?php
2
3
namespace Dazzle\Channel\Record;
4
5
class ResponseRecord
6
{
7
    /**
8
     * @var string
9
     */
10
    public $pid;
11
12
    /**
13
     * @var string
14
     */
15
    public $alias;
16
17
    /**
18
     * @var float
19
     */
20
    public $timeout;
21
22
    /**
23
     * @var float
24
     */
25
    public $timeoutIncrease;
26
27
    /**
28
     * @param string $pid
29
     * @param string $alias
30
     * @param float $timeout
31
     * @param float $timeoutIncrease
32
     */
33 13
    public function __construct($pid, $alias, $timeout = 0.0, $timeoutIncrease = 1.0)
34
    {
35 13
        $this->pid             = $pid;
36 13
        $this->alias           = $alias;
37 13
        $this->timeout         = $timeout;
38 13
        $this->timeoutIncrease = $timeoutIncrease;
39 13
    }
40
41
    /**
42
     *
43
     */
44 13
    public function __destruct()
45
    {
46 13
        unset($this->pid);
47 13
        unset($this->alias);
48 13
        unset($this->timeout);
49 13
        unset($this->timeoutIncrease);
50 13
    }
51
52
    /**
53
     * Return protocol ID.
54
     *
55
     * @return string
56
     */
57 2
    public function getPid()
58
    {
59 2
        return $this->pid;
60
    }
61
62
    /**
63
     * Return alias.
64
     *
65
     * @return string
66
     */
67 2
    public function getAlias()
68
    {
69 2
        return $this->alias;
70
    }
71
72
    /**
73
     * Return timeout.
74
     *
75
     * @return float
76
     */
77 2
    public function getTimeout()
78
    {
79 2
        return $this->timeout;
80
    }
81
82
    /**
83
     * Increase timeout.
84
     *
85
     * @return float
86
     */
87 2
    public function getTimeoutIncrease()
88
    {
89 2
        return $this->timeoutIncrease;
90
    }
91
}
92