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

VotingSubject::getVotingSubjectName()   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 0
crap 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