Updated ChatPhoto
This commit is contained in:
parent
108f64d924
commit
bc1000fa1d
1 changed files with 12 additions and 28 deletions
|
@ -7,25 +7,10 @@
|
||||||
|
|
||||||
class ChatPhoto implements ObjectTypeInterface
|
class ChatPhoto implements ObjectTypeInterface
|
||||||
{
|
{
|
||||||
/**
|
private string $small_file_id;
|
||||||
* @var string
|
private string $small_file_unique_id;
|
||||||
*/
|
private string $big_file_id;
|
||||||
private $small_file_id;
|
private string $big_file_unique_id;
|
||||||
|
|
||||||
/**
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
private $small_file_unique_id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
private $big_file_id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
private $big_file_unique_id;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* File identifier of small (160x160) chat photo. This file_id can be used only for photo download and only for
|
* File identifier of small (160x160) chat photo. This file_id can be used only for photo download and only for
|
||||||
|
@ -72,9 +57,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an array representation of this object
|
* @inheritDoc
|
||||||
*
|
|
||||||
* @return array
|
|
||||||
*/
|
*/
|
||||||
public function toArray(): array
|
public function toArray(): array
|
||||||
{
|
{
|
||||||
|
@ -87,15 +70,16 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a new ChatPhoto object from an array representation
|
* @inheritDoc
|
||||||
*
|
|
||||||
* @param array $data
|
|
||||||
* @return static
|
|
||||||
*/
|
*/
|
||||||
public static function fromArray(array $data): self
|
public static function fromArray(?array $data): ?ChatPhoto
|
||||||
{
|
{
|
||||||
$object = new ChatPhoto();
|
if($data === null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$object = new ChatPhoto();
|
||||||
$object->small_file_id = $data['small_file_id'] ?? null;
|
$object->small_file_id = $data['small_file_id'] ?? null;
|
||||||
$object->small_file_unique_id = $data['small_file_unique_id'] ?? null;
|
$object->small_file_unique_id = $data['small_file_unique_id'] ?? null;
|
||||||
$object->big_file_id = $data['big_file_id'] ?? null;
|
$object->big_file_id = $data['big_file_id'] ?? null;
|
||||||
|
|
Loading…
Add table
Reference in a new issue