| Total Complexity | 7 |
| Total Lines | 96 |
| 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() |
|
| 58 | } |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @param string $id |
||
| 62 | * @return void |
||
| 63 | 1 | */ |
|
| 64 | public function setPollId($id) |
||
| 67 | } |
||
| 68 | |||
| 69 | /** |
||
| 70 | * @return User |
||
| 71 | 2 | */ |
|
| 72 | public function getUser() |
||
| 75 | } |
||
| 76 | |||
| 77 | /** |
||
| 78 | * @param User $from |
||
| 79 | 2 | * @return void |
|
| 80 | */ |
||
| 81 | 2 | public function setUser(User $from) |
|
| 82 | 2 | { |
|
| 83 | $this->user = $from; |
||
| 84 | } |
||
| 85 | |||
| 86 | /** |
||
| 87 | 1 | * @deprecated |
|
| 88 | * |
||
| 89 | 1 | * @return User |
|
| 90 | */ |
||
| 91 | public function getFrom() |
||
| 92 | { |
||
| 93 | @trigger_error(sprintf('Access user with %s is deprecated, use "%s::getUser" method', __METHOD__, __CLASS__), \E_USER_DEPRECATED); |
||
| 94 | |||
| 95 | 1 | return $this->getUser(); |
|
| 96 | } |
||
| 97 | 1 | ||
| 98 | /** |
||
| 99 | * @return int[] |
||
| 100 | */ |
||
| 101 | public function getOptionIds() |
||
| 104 | } |
||
| 105 | 1 | ||
| 106 | /** |
||
| 107 | * @param int[] $optionIds |
||
| 108 | * @return void |
||
| 109 | */ |
||
| 110 | public function setOptionIds($optionIds) |
||
| 113 | 1 | } |
|
| 114 | } |
||
| 115 |