| Total Complexity | 7 |
| Total Lines | 93 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | class PollAnswer extends BaseType |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * {@inheritdoc} |
||
| 21 | * |
||
| 22 | * @var array |
||
| 23 | */ |
||
| 24 | protected static $requiredParams = ['poll_id', 'option_ids', 'user']; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * {@inheritdoc} |
||
| 28 | * |
||
| 29 | * @var array |
||
| 30 | */ |
||
| 31 | protected static $map = [ |
||
| 32 | 'option_ids' => true, |
||
| 33 | 'user' => User::class, |
||
| 34 | 'poll_id' => true, |
||
| 35 | ]; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @var \TelegramBot\Api\Types\User |
||
| 39 | */ |
||
| 40 | protected $user; |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @var string |
||
| 44 | */ |
||
| 45 | protected $pollId; |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @var int[] |
||
| 49 | */ |
||
| 50 | protected $optionIds; |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @return string |
||
| 54 | */ |
||
| 55 | 1 | public function getPollId() |
|
| 56 | { |
||
| 57 | 1 | return $this->pollId; |
|
| 58 | } |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @param string $id |
||
| 62 | */ |
||
| 63 | 1 | public function setPollId($id) |
|
| 66 | 1 | } |
|
| 67 | |||
| 68 | /** |
||
| 69 | * @return User |
||
| 70 | */ |
||
| 71 | 2 | public function getUser() |
|
| 74 | } |
||
| 75 | |||
| 76 | /** |
||
| 77 | * @param User $from |
||
| 78 | */ |
||
| 79 | 2 | public function setUser(User $from) |
|
| 82 | 2 | } |
|
| 83 | |||
| 84 | /** |
||
| 85 | * @deprecated |
||
| 86 | * |
||
| 87 | 1 | * @return User |
|
| 88 | */ |
||
| 89 | 1 | public function getFrom() |
|
| 90 | { |
||
| 91 | @trigger_error(sprintf('Access user with %s is deprecated, use "%s::getUser" method', __METHOD__, __CLASS__), \E_USER_DEPRECATED); |
||
| 92 | |||
| 93 | return $this->getUser(); |
||
| 94 | } |
||
| 95 | 1 | ||
| 96 | /** |
||
| 97 | 1 | * @return int[] |
|
| 98 | */ |
||
| 99 | public function getOptionIds() |
||
| 102 | } |
||
| 103 | 1 | ||
| 104 | /** |
||
| 105 | 1 | * @param int[] $optionIds |
|
| 106 | */ |
||
| 107 | public function setOptionIds($optionIds) |
||
| 110 | } |
||
| 111 | } |
||
| 112 |