Code fixes in \TgBotLib\Objects\Telegram\InlineQueryResult > InlineQueryResultContact
This commit is contained in:
parent
b81fa4fa4f
commit
7573fc2205
1 changed files with 6 additions and 2 deletions
|
@ -82,7 +82,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Type of the result, must be contact
|
* Type of the result must be contact
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
|
@ -111,7 +111,9 @@
|
||||||
public function setId(string $id): self
|
public function setId(string $id): self
|
||||||
{
|
{
|
||||||
if(!Validate::length($id, 1, 64))
|
if(!Validate::length($id, 1, 64))
|
||||||
|
{
|
||||||
throw new InvalidArgumentException('id should be between 1-64 characters');
|
throw new InvalidArgumentException('id should be between 1-64 characters');
|
||||||
|
}
|
||||||
|
|
||||||
$this->id = $id;
|
$this->id = $id;
|
||||||
return $this;
|
return $this;
|
||||||
|
@ -206,7 +208,9 @@
|
||||||
public function setVcard(?string $vcard): self
|
public function setVcard(?string $vcard): self
|
||||||
{
|
{
|
||||||
if(!Validate::length($vcard, 0, 2048))
|
if(!Validate::length($vcard, 0, 2048))
|
||||||
|
{
|
||||||
throw new InvalidArgumentException('vcard should be between 0-2048 characters');
|
throw new InvalidArgumentException('vcard should be between 0-2048 characters');
|
||||||
|
}
|
||||||
|
|
||||||
$this->vcard = $vcard;
|
$this->vcard = $vcard;
|
||||||
return $this;
|
return $this;
|
||||||
|
@ -350,7 +354,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs object from an array representation
|
* Constructs an object from an array representation
|
||||||
*
|
*
|
||||||
* @param array $data
|
* @param array $data
|
||||||
* @return ObjectTypeInterface
|
* @return ObjectTypeInterface
|
||||||
|
|
Loading…
Add table
Reference in a new issue