Total Complexity | 10 |
Total Lines | 93 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
17 | abstract class AbstractVote |
||
18 | { |
||
19 | /** |
||
20 | * @var integer |
||
21 | */ |
||
22 | protected $id; |
||
23 | |||
24 | /** |
||
25 | * @var UserInterface|null|string |
||
26 | */ |
||
27 | protected $user = null; |
||
28 | |||
29 | /** |
||
30 | * @var integer |
||
31 | */ |
||
32 | protected $reference; |
||
33 | |||
34 | /** |
||
35 | * @var string |
||
36 | */ |
||
37 | protected $userIP; |
||
38 | |||
39 | /** |
||
40 | * @return int |
||
41 | */ |
||
42 | 2 | public function getId(): int |
|
43 | { |
||
44 | 2 | return $this->id; |
|
45 | } |
||
46 | |||
47 | /** |
||
48 | * @param int $id |
||
49 | */ |
||
50 | 2 | public function setId(int $id) |
|
53 | 2 | } |
|
54 | |||
55 | /** |
||
56 | * @return string|UserInterface |
||
57 | */ |
||
58 | 2 | public function getUser() |
|
59 | { |
||
60 | 2 | return $this->user; |
|
61 | } |
||
62 | |||
63 | /** |
||
64 | * @param string|UserInterface $user |
||
65 | */ |
||
66 | 9 | public function setUser($user) |
|
69 | 9 | } |
|
70 | |||
71 | /** |
||
72 | * @return int |
||
73 | */ |
||
74 | 2 | public function getReference(): int |
|
75 | { |
||
76 | 2 | return $this->reference; |
|
77 | } |
||
78 | |||
79 | /** |
||
80 | * @param int $reference |
||
81 | */ |
||
82 | 9 | public function setReference(int $reference) |
|
83 | { |
||
84 | 9 | $this->reference = $reference; |
|
85 | 9 | } |
|
86 | |||
87 | /** |
||
88 | * @return string|null |
||
89 | */ |
||
90 | 2 | public function getUserIP(): string |
|
91 | { |
||
92 | 2 | return $this->userIP; |
|
93 | } |
||
94 | |||
95 | /** |
||
96 | * @param string|null $userIP |
||
97 | */ |
||
98 | 9 | public function setUserIP(string $userIP = null) |
|
99 | { |
||
100 | 9 | $this->userIP = $userIP; |
|
101 | 9 | } |
|
102 | |||
103 | 2 | public function isPositive() |
|
110 | } |
||
111 | } |