Updated classes fromArray signatures (in-progress)

This commit is contained in:
netkas 2024-10-03 21:14:27 -04:00
parent 59f6875edf
commit dfb812237b
43 changed files with 288 additions and 75 deletions

View file

@ -41,8 +41,13 @@
/**
* @inheritDoc
*/
public static function fromArray(array $data): ObjectTypeInterface
public static function fromArray(?array $data): ?BotCommandScope
{
if($data === null)
{
return null;
}
if(!isset($data['type']))
{
throw new InvalidArgumentException('BotCommandScope expected type');