| Total Complexity | 8 |
| Total Lines | 97 |
| 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 | 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 | * @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) |
|
| 80 | { |
||
| 81 | 2 | $this->user = $from; |
|
| 82 | 2 | } |
|
| 83 | |||
| 84 | /** |
||
| 85 | * @return User |
||
| 86 | */ |
||
| 87 | 1 | public function getFrom() |
|
| 88 | { |
||
| 89 | 1 | return $this->getUser(); |
|
| 90 | } |
||
| 91 | |||
| 92 | /** |
||
| 93 | * @param User $from |
||
| 94 | */ |
||
| 95 | 1 | public function setFrom(User $from) |
|
| 96 | { |
||
| 97 | 1 | return $this->setUser($from); |
|
|
|
|||
| 98 | } |
||
| 99 | |||
| 100 | /** |
||
| 101 | * @return int[] |
||
| 102 | */ |
||
| 103 | 1 | public function getOptionIds() |
|
| 106 | } |
||
| 107 | |||
| 108 | /** |
||
| 109 | * @param int[] $optionIds |
||
| 110 | */ |
||
| 111 | 1 | public function setOptionIds($optionIds) |
|
| 114 | 1 | } |
|
| 115 | } |
||
| 116 |
This check looks for function or method calls that always return null and whose return value is used.
The method
getObject()can return nothing but null, so it makes no sense to use the return value.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.