Response::getNextStage()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
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
}