Minor corrections
This commit is contained in:
parent
7d9caf38b3
commit
6c2219f1ae
4 changed files with 23 additions and 4 deletions
|
@ -45,8 +45,13 @@
|
|||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public static function fromArray(?array $data): BotCommand
|
||||
public static function fromArray(?array $data): ?BotCommand
|
||||
{
|
||||
if($data === null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
$object = new self();
|
||||
$object->command = $data['command'] ?? null;
|
||||
$object->description = $data['description'] ?? null;
|
||||
|
|
|
@ -33,8 +33,13 @@
|
|||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public static function fromArray(?array $data): BotDescription
|
||||
public static function fromArray(?array $data): ?BotDescription
|
||||
{
|
||||
if($data === null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
$object = new self();
|
||||
$object->description = $data['description'];
|
||||
|
||||
|
|
|
@ -33,10 +33,14 @@
|
|||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public static function fromArray(?array $data): BotShortDescription
|
||||
public static function fromArray(?array $data): ?BotShortDescription
|
||||
{
|
||||
$object = new self();
|
||||
if($data === null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
$object = new self();
|
||||
$object->short_description = $data['short_description'];
|
||||
|
||||
return $object;
|
||||
|
|
|
@ -21,6 +21,11 @@
|
|||
*/
|
||||
public static function fromArray(?array $data): ?CallbackGame
|
||||
{
|
||||
if($data === null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return new self();
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue