for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace TelegramBot\Api\Types;
use TelegramBot\Api\BaseType;
/**
* Class PollAnswer
*
* @see https://core.telegram.org/bots/api#pollanswer
* This object represents an answer of a user in a non-anonymous poll.
* @package TelegramBot\Api\Types
*/
class PollAnswer extends BaseType
{
* {@inheritdoc}
* @var array
static protected $requiredParams = ['poll_id', 'option_ids', 'user'];
static protected $map = [
'option_ids' => true,
'user' => User::class,
'poll_id' => true,
];
* @var \TelegramBot\Api\Types\User
protected $user;
* @var string
protected $pollId;
* @var int[]
protected $optionIds;
* @return string
public function getPollId()
return $this->pollId;
}
* @param string $id
public function setPollId($id)
$this->pollId = $id;
* @return User
public function getUser()
return $this->user;
* @param User $from
public function setUser(User $from)
$this->user = $from;
public function getFrom()
return $this->getUser();
public function setFrom(User $from)
return $this->setUser($from);
$this->setUser($from)
TelegramBot\Api\Types\PollAnswer::setUser()
This check looks for function or method calls that always return null and whose return value is used.
class A { function getObject() { return null; } } $a = new A(); if ($a->getObject()) {
The method getObject() can return nothing but null, so it makes no sense to use the return value.
getObject()
The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.
* @return int[]
public function getOptionIds()
return $this->optionIds;
* @param int[] $optionIds
public function setOptionIds($optionIds)
$this->optionIds = $optionIds;
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.