| 1 | <?php |
||
| 15 | class PollAnswer extends BaseType |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * {@inheritdoc} |
||
| 19 | * |
||
| 20 | * @var array |
||
| 21 | */ |
||
| 22 | static protected $requiredParams = ['poll_id', 'option_ids', 'user']; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * {@inheritdoc} |
||
| 26 | * |
||
| 27 | * @var array |
||
| 28 | */ |
||
| 29 | static protected $map = [ |
||
| 30 | 'option_ids' => true, |
||
| 31 | 'user' => User::class, |
||
| 32 | 'poll_id' => true, |
||
| 33 | ]; |
||
| 34 | |||
| 35 | |||
| 36 | |||
| 37 | /** |
||
| 38 | * Sender |
||
| 39 | * |
||
| 40 | * @var \TelegramBot\Api\Types\User |
||
| 41 | */ |
||
| 42 | protected $user; |
||
| 43 | |||
| 44 | /** |
||
| 45 | * |
||
| 46 | * @var int |
||
| 47 | */ |
||
| 48 | protected $pollId; |
||
| 49 | |||
| 50 | /** |
||
| 51 | * @var int[] |
||
| 52 | */ |
||
| 53 | protected $optionIds; |
||
| 54 | |||
| 55 | |||
| 56 | /** |
||
| 57 | * @return string |
||
| 58 | */ |
||
| 59 | public function getPollId() |
||
| 63 | |||
| 64 | /** |
||
| 65 | * @param string $id |
||
| 66 | */ |
||
| 67 | public function setPollId($id) |
||
| 71 | |||
| 72 | |||
| 73 | /** |
||
| 74 | * @return User |
||
| 75 | */ |
||
| 76 | public function getUser() |
||
| 80 | |||
| 81 | /** |
||
| 82 | * @param User $from |
||
| 83 | */ |
||
| 84 | public function setUser(User $from) |
||
| 88 | |||
| 89 | /** |
||
| 90 | * @return User |
||
| 91 | */ |
||
| 92 | public function getFrom() |
||
| 96 | |||
| 97 | /** |
||
| 98 | * @param User $from |
||
| 99 | */ |
||
| 100 | public function setFrom(User $from) |
||
| 104 | |||
| 105 | /** |
||
| 106 | * @return int[] |
||
| 107 | */ |
||
| 108 | public function getOptionIds() |
||
| 112 | |||
| 113 | /** |
||
| 114 | * @param int[] $optionIds |
||
| 115 | */ |
||
| 116 | public function setOptionIds( $optionIds) |
||
| 120 | |||
| 121 | |||
| 122 | } |
||
| 123 |
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.