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

VotingSubject   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getVotingSubjectName() 0 4 1
1
<?php
2
namespace SpareParts\Overseer\Voter;
3
4
/**
5
 * Default VotingSubject. If you want to use your own objects as Voting Subjects, let them implement IVotingSubject directly.
6
 */
7
class VotingSubject implements IVotingSubject
8
{
9
	/**
10
	 * @var string
11
	 */
12
	private $subject;
13
14
15
	/**
16
	 * VotingSubject constructor.
17
	 * @param string $subject
18
	 */
19 1
	public function __construct($subject)
20
	{
21 1
		$this->subject = $subject;
22 1
	}
23
24
25
	/**
26
	 * @return string
27
	 */
28 1
	public function getVotingSubjectName()
29
	{
30 1
		return $this->subject;
31
	}
32
}
33