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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue