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

VotingResult   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 42
ccs 0
cts 13
cp 0
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 getPartialResults() 0 4 1
1
<?php
2
namespace SpareParts\Overseer;
3
4
use SpareParts\Overseer\Voter\ISingleVoterResult;
5
6
class VotingResult implements IVotingResult
7
{
8
    /**
9
     * @var VotingDecisionEnum
10
     */
11
    private $decision;
12
13
    /**
14
     * @var ISingleVoterResult[]
15
     */
16
    private $partialResults;
17
18
19
    /**
20
     * VotingResult constructor.
21
     * @param VotingDecisionEnum $decision
22
     * @param ISingleVoterResult[] $partialResults
23
     */
24
    public function __construct(VotingDecisionEnum $decision, $partialResults)
25
	{
26
        $this->decision = $decision;
27
        $this->partialResults = $partialResults;
28
    }
29
30
31
    /**
32
     * @return VotingDecisionEnum
33
     */
34
    public function getDecision()
35
    {
36
        return $this->decision;
37
    }
38
39
40
    /**
41
     * @return ISingleVoterResult[]
42
     */
43
    public function getPartialResults()
44
    {
45
        return $this->partialResults;
46
    }
47
}
48