| Total Complexity | 10 |
| Total Lines | 78 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | abstract class Vote |
||
| 8 | { |
||
| 9 | /** @var Poll **/ |
||
| 10 | protected $poll; |
||
| 11 | /** @var UserInterface **/ |
||
| 12 | protected $user; |
||
| 13 | /** @var string **/ |
||
| 14 | protected $option; |
||
| 15 | /** @var bool **/ |
||
| 16 | protected $isPositive; |
||
| 17 | /** @var \DateTime **/ |
||
| 18 | protected $createdAt; |
||
| 19 | |||
| 20 | const OPTION_POSITIVE_TECH = 'positive.tech'; |
||
| 21 | const OPTION_POSITIVE_PURPOSE = 'positive.purpose'; |
||
| 22 | |||
| 23 | const OPTION_NEGATIVE_TECH = 'negative.tech'; |
||
| 24 | const OPTION_NEGATIVE_PURPOSE = 'negative.purpose'; |
||
| 25 | const OPTION_NEGATIVE_INFOS = 'negative.infos'; |
||
| 26 | |||
| 27 | public function setPoll(Poll $poll): Vote |
||
| 28 | { |
||
| 29 | $this->poll = $poll; |
||
| 30 | |||
| 31 | return $this; |
||
| 32 | } |
||
| 33 | |||
| 34 | public function getPoll(): Poll |
||
| 35 | { |
||
| 36 | return $this->poll; |
||
| 37 | } |
||
| 38 | |||
| 39 | public function setUser(UserInterface $user): Vote |
||
| 40 | { |
||
| 41 | $this->user = $user; |
||
| 42 | |||
| 43 | return $this; |
||
| 44 | } |
||
| 45 | |||
| 46 | public function getUser(): UserInterface |
||
| 47 | { |
||
| 48 | return $this->user; |
||
| 49 | } |
||
| 50 | |||
| 51 | public function setOption(string $option): Vote |
||
| 52 | { |
||
| 53 | $this->option = $option; |
||
| 54 | |||
| 55 | return $this; |
||
| 56 | } |
||
| 57 | |||
| 58 | public function getOption(): string |
||
| 59 | { |
||
| 60 | return $this->option; |
||
| 61 | } |
||
| 62 | |||
| 63 | public function setIsPositive(bool $isPositive): Vote |
||
| 64 | { |
||
| 65 | $this->isPositive = $isPositive; |
||
| 66 | |||
| 67 | return $this; |
||
| 68 | } |
||
| 69 | |||
| 70 | public function getIsPositive(): bool |
||
| 71 | { |
||
| 72 | return $this->isPositive; |
||
| 73 | } |
||
| 74 | |||
| 75 | public function setCreatedAt(\DateTime $createdAt): Vote |
||
| 76 | { |
||
| 77 | $this->createdAt = $createdAt; |
||
| 78 | |||
| 79 | return $this; |
||
| 80 | } |
||
| 81 | |||
| 82 | public function getCreatedAt(): \DateTime |
||
| 85 | } |
||
| 86 | } |