Completed
Pull Request — master (#1)
by Ondrej
01:51
created

SingleVoterResult::getDecision()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
namespace SpareParts\Overseer\Voter;
3
4
use SpareParts\Overseer\VotingDecisionEnum;
5
6
class SingleVoterResult implements ISingleVoterResult
7
{
8
9
    /**
10
     * @var VotingDecisionEnum
11
     */
12
    private $decision;
13
14
    /**
15
     * @var mixed
16
     */
17
    private $reason;
18
19
20
    /**
21
     * SingleVoterResult constructor.
22
     * @param VotingDecisionEnum $decision
23
     * @param mixed $reason
24
     */
25
    public function __construct(VotingDecisionEnum $decision, $reason = null)
26
    {
27
        $this->decision = $decision;
28
        $this->reason = $reason;
29
    }
30
31
32
    /**
33
     * @return VotingDecisionEnum
34
     */
35
    public function getDecision()
36
    {
37
        return $this->decision;
38
    }
39
40
    /**
41
     * @return mixed
42
     */
43
    public function getReason()
44
    {
45
        return $this->reason;
46
    }
47
}