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

SingleVoterResult   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 42
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getDecision() 0 4 1
A getReason() 0 4 1
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
}