for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This phpFile is auto-generated.
*/
declare(strict_types=1);
namespace AurimasNiekis\TdLibSchema;
* Removes current user from chat members. Private and secret chats can't be left using this method.
class LeaveChat extends TdFunction
{
public const TYPE_NAME = 'leaveChat';
* Chat identifier.
*
* @var int
protected int $chatId;
public function __construct(int $chatId)
$this->chatId = $chatId;
}
public static function fromArray(array $array): LeaveChat
return new static(
$array['chat_id'],
);
public function typeSerialize(): array
return [
'@type' => static::TYPE_NAME,
'chat_id' => $this->chatId,
];
public function getChatId(): int
return $this->chatId;