Response   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 52
Duplicated Lines 0 %

Test Coverage

Coverage 81.82%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 52
ccs 9
cts 11
cp 0.8182
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getNextStage() 0 3 1
A getCurrentStage() 0 3 1
A getMessage() 0 3 1
A __construct() 0 5 1
1
<?php
2
3
namespace DrLenux\Chain;
4
5
/**
6
 * Class Response
7
 * @package DrLenux\Chain
8
 */
9
class Response
10
{
11
    /**
12
     * @var string
13
     */
14
    private $currentStage;
15
16
    /**
17
     * @var string|null
18
     */
19
    private $nextStage;
20
21
    /**
22
     * @var string|null
23
     */
24
    private $message;
25
26
    /**
27
     * Response constructor.
28
     * @param string $currentStage
29
     * @param string|null $nextStage
30
     * @param string|null $message
31
     */
32 4
    public function __construct(string $currentStage, ?string $nextStage, ?string $message = null)
33
    {
34 4
        $this->currentStage = $currentStage;
35 4
        $this->nextStage = $nextStage;
36 4
        $this->message = $message;
37 4
    }
38
39
    /**
40
     * @return string
41
     */
42
    public function getCurrentStage(): string
43
    {
44
        return $this->currentStage;
45
    }
46
47
    /**
48
     * @return string|null
49
     */
50 4
    public function getNextStage(): ?string
51
    {
52 4
        return $this->nextStage;
53
    }
54
55
    /**
56
     * @return string|null
57
     */
58 4
    public function getMessage(): ?string
59
    {
60 4
        return $this->message;
61
    }
62
}