GenericVotingManager   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 15
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A vote() 0 4 1
1
<?php
2
namespace SpareParts\Overseer;
3
4
use SpareParts\Overseer\Context\IVotingContext;
5
6
/**
7
 * Default implementation.
8
 *
9
 * You should provide specific implementation, with exact typehints and function names.
10
 * Use AbstractVotingManager's innerVote method as a starting point.
11
 *
12
 * This one works as well though. It's just a little too... generic :)
13
 */
14
final class GenericVotingManager extends AbstractVotingManager
15
{
16
17
    /**
18
     * @param string $action
19
     * @param mixed $votingSubject
20
     * @param \SpareParts\Overseer\Context\IVotingContext $votingContext
21
     * @return \SpareParts\Overseer\IVotingResult
22
     * @throws \SpareParts\Overseer\InvalidVotingResultException
23
     */
24 7
    public function vote($action, $votingSubject, IVotingContext $votingContext)
25
    {
26 7
        return $this->innerVote($action, $votingSubject, $votingContext);
27
    }
28
}
29