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

VotingResult::getPartialResults()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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