Major Refactoring

This commit is contained in:
Netkas 2023-02-14 17:35:16 -05:00
parent 3de87df2d9
commit 54a8a59ee8
83 changed files with 892 additions and 918 deletions

View file

@ -1,5 +1,7 @@
<?php
/** @noinspection PhpMissingFieldTypeInspection */
namespace TgBotLib\Objects;
use TgBotLib\Interfaces\ObjectTypeInterface;
@ -74,9 +76,10 @@
public static function fromArray(array $data): ObjectTypeInterface
{
$object = new self();
$object->name = @$data['name'];
$object->icon_color = @$data['icon_color'];
$object->icon_custom_emoji_id = @$data['icon_custom_emoji_id'] ?? null;
$object->name = $data['name'] ?? null;
$object->icon_color = $data['icon_color'] ?? null;
$object->icon_custom_emoji_id = $data['icon_custom_emoji_id'] ?? null;
return $object;
}