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

@ -37,13 +37,17 @@
/**
* Constructs object from an array representation
*
* @param array $data
* @return SentWebAppMessage
* @param array|null $data
* @return SentWebAppMessage|null
*/
public static function fromArray(array $data): SentWebAppMessage
public static function fromArray(?array $data): ?SentWebAppMessage
{
$object = new self();
if($data === null)
{
return null;
}
$object = new self();
$object->inline_message_id = $data['inline_message_id'] ?? null;
return $object;