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;