Total Complexity | 4 |
Total Lines | 65 |
Duplicated Lines | 0 % |
Coverage | 60% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | class PollOption extends BaseType implements TypeInterface |
||
15 | { |
||
16 | /** |
||
17 | * {@inheritdoc} |
||
18 | * |
||
19 | * @var array |
||
20 | */ |
||
21 | protected static $requiredParams = ['text', 'voter_count']; |
||
22 | |||
23 | /** |
||
24 | * {@inheritdoc} |
||
25 | * |
||
26 | * @var array |
||
27 | */ |
||
28 | protected static $map = [ |
||
29 | 'text' => true, |
||
30 | 'voter_count' => true |
||
31 | ]; |
||
32 | |||
33 | /** |
||
34 | * Option text, 1-100 characters |
||
35 | * |
||
36 | * @var string |
||
37 | */ |
||
38 | protected $text; |
||
39 | |||
40 | /** |
||
41 | * Number of users that voted for this option |
||
42 | * |
||
43 | * @var integer |
||
44 | */ |
||
45 | protected $voterCount; |
||
46 | |||
47 | /** |
||
48 | * @return string |
||
49 | */ |
||
50 | public function getText() |
||
51 | { |
||
52 | return $this->text; |
||
53 | } |
||
54 | |||
55 | /** |
||
56 | * @param string $text |
||
57 | * @return void |
||
58 | */ |
||
59 | 2 | public function setText($text) |
|
60 | { |
||
61 | 2 | $this->text = $text; |
|
62 | 2 | } |
|
63 | |||
64 | /** |
||
65 | * @return int |
||
66 | */ |
||
67 | public function getVoterCount() |
||
70 | } |
||
71 | |||
72 | /** |
||
73 | * @param int $voterCount |
||
74 | * @return void |
||
75 | 2 | */ |
|
76 | public function setVoterCount($voterCount) |
||
81 |