PacketBatch::getPackets() may throw PacketDecodeException

This commit is contained in:
Dylan K. Taylor 2020-07-22 15:38:24 +01:00
parent 8402465fd2
commit 5910905e95

View File

@ -40,6 +40,7 @@ class PacketBatch{
/** /**
* @return \Generator|Packet[] * @return \Generator|Packet[]
* @phpstan-return \Generator<int, Packet, void, void> * @phpstan-return \Generator<int, Packet, void, void>
* @throws PacketDecodeException
*/ */
public function getPackets(PacketPool $packetPool, int $max) : \Generator{ public function getPackets(PacketPool $packetPool, int $max) : \Generator{
$serializer = new PacketSerializer($this->buffer); $serializer = new PacketSerializer($this->buffer);