Minor corrections

This commit is contained in:
netkas 2024-10-04 12:14:32 -04:00
parent 7d9caf38b3
commit 6c2219f1ae
4 changed files with 23 additions and 4 deletions

View file

@ -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;

View file

@ -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'];

View file

@ -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;

View file

@ -21,6 +21,11 @@
*/
public static function fromArray(?array $data): ?CallbackGame
{
if($data === null)
{
return null;
}
return new self();
}
}