Skip to content

Commit f226b2b

Browse files
committed
Simplify logic
1 parent 759a379 commit f226b2b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Server/NotificationPublisher.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,8 @@ public function enqueue(Notification $notification): void
3333
*/
3434
public function flush(): iterable
3535
{
36-
$out = $this->queue;
37-
$this->queue = [];
36+
yield from $this->queue;
3837

39-
yield from $out;
38+
$this->queue = [];
4039
}
4140
}

0 commit comments

Comments
 (0)