mirror of
https://github.com/BushlanovDev/max-bot-api-client-php.git
synced 2026-08-25 07:26:53 +00:00
Tests
This commit is contained in:
@@ -20,4 +20,18 @@ final readonly class UpdateList extends AbstractModel
|
||||
public ?int $marker,
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Overridden to prevent incorrect usage.
|
||||
* UpdateList contains polymorphic objects and must be created via ModelFactory.
|
||||
*
|
||||
* @param array<string, mixed> $data
|
||||
* @throws \LogicException Always.
|
||||
*/
|
||||
public static function fromArray(array $data): static
|
||||
{
|
||||
throw new \LogicException(
|
||||
'Cannot create UpdateList directly from an array. Use ModelFactory::createUpdateList() instead.'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user