| 1 | <?php |
||
| 17 | class PollAnswer extends BaseType |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * {@inheritdoc} |
||
| 21 | * |
||
| 22 | * @var array |
||
| 23 | */ |
||
| 24 | static protected $requiredParams = ['poll_id', 'option_ids', 'user']; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * {@inheritdoc} |
||
| 28 | * |
||
| 29 | * @var array |
||
| 30 | */ |
||
| 31 | static protected $map = [ |
||
| 32 | 'option_ids' => true, |
||
| 33 | 'user' => User::class, |
||
| 34 | 'poll_id' => true, |
||
| 35 | ]; |
||
| 36 | |||
| 37 | |||
| 38 | |||
| 39 | /** |
||
| 40 | * Sender |
||
| 41 | * |
||
| 42 | * @var \TelegramBot\Api\Types\User |
||
| 43 | */ |
||
| 44 | protected $user; |
||
| 45 | |||
| 46 | /** |
||
| 47 | * |
||
| 48 | * @var int |
||
| 49 | */ |
||
| 50 | protected $pollId; |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @var int[] |
||
| 54 | */ |
||
| 55 | protected $optionIds; |
||
| 56 | |||
| 57 | |||
| 58 | /** |
||
| 59 | * @return string |
||
| 60 | */ |
||
| 61 | public function getPollId() |
||
| 65 | |||
| 66 | /** |
||
| 67 | * @param string $id |
||
| 68 | */ |
||
| 69 | public function setPollId($id) |
||
| 73 | |||
| 74 | |||
| 75 | /** |
||
| 76 | * @return User |
||
| 77 | */ |
||
| 78 | public function getUser() |
||
| 82 | |||
| 83 | /** |
||
| 84 | * @param User $from |
||
| 85 | */ |
||
| 86 | public function setUser(User $from) |
||
| 90 | |||
| 91 | /** |
||
| 92 | * @return User |
||
| 93 | */ |
||
| 94 | public function getFrom() |
||
| 98 | |||
| 99 | /** |
||
| 100 | * @param User $from |
||
| 101 | */ |
||
| 102 | public function setFrom(User $from) |
||
| 106 | |||
| 107 | /** |
||
| 108 | * @return int[] |
||
| 109 | */ |
||
| 110 | public function getOptionIds() |
||
| 114 | |||
| 115 | /** |
||
| 116 | * @param int[] $optionIds |
||
| 117 | */ |
||
| 118 | public function setOptionIds( $optionIds) |
||
| 122 | |||
| 123 | |||
| 124 | } |
||
| 125 |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.