Skip to content

Commit 372bf28

Browse files
chore: cleanup streaming
1 parent 707cff0 commit 372bf28

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/Core/Util.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
use Psr\Http\Message\StreamInterface;
1111
use Psr\Http\Message\UriInterface;
1212

13+
/**
14+
* @phpstan-type SSEvent = array{
15+
* event?: string|null, data?: string|null, id?: string|null, retry?: int|null
16+
* }
17+
*/
1318
final class Util
1419
{
1520
public const BUF_SIZE = 8192;
@@ -239,11 +244,7 @@ public static function decodeLines(\Iterator $stream): \Iterator
239244
/**
240245
* @param \Iterator<string> $lines
241246
*
242-
* @return \Generator<
243-
* array{
244-
* event?: string|null, data?: string|null, id?: string|null, retry?: int|null
245-
* },
246-
* >
247+
* @return \Generator<SSEvent>
247248
*/
248249
public static function decodeSSE(\Iterator $lines): \Generator
249250
{

0 commit comments

Comments
 (0)