Completed
Push — master ( af3ede...2a1d1e )
by Ondrej
01:47
created

GenericVotingManager::vote()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 3
crap 1
1
<?php
2
namespace SpareParts\Overseer;
3
4
use SpareParts\Overseer\Identity\IVotingContext;
5
6
/**
7
 * Default implementation.
8
 *
9
 * You should provide specific implementation, with exact typehints and function names.
10
 *
11
 * This one works as well though. It's just a little too... generic :)
12
 */
13
class GenericVotingManager extends AbstractVotingManager
14
{
15
16
	/**
17
	 * @param string $action
18
	 * @param \SpareParts\Overseer\Voter\IVotingSubject|mixed $votingSubject
19
	 * @param \SpareParts\Overseer\Identity\IVotingContext $votingContext
20
	 * @return \SpareParts\Overseer\IVotingResult
21
	 * @throws \SpareParts\Overseer\InvalidVotingResultException
22
	 */
23 3
	public function vote($action, $votingSubject, IVotingContext $votingContext)
24
	{
25 3
		return $this->innerVote($action, $votingSubject, $votingContext);
26
	}
27
28
}