Skip to content

Commit

Permalink
fix(broadcasting): fix wrong implementation of BroadcastEvent handler
Browse files Browse the repository at this point in the history
  • Loading branch information
bl4ckbon3 committed Oct 25, 2023
1 parent a32b903 commit d34959f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Bundle/BroadcastingBundle/Listener/BroadcastEvent.php
Expand Up @@ -16,10 +16,10 @@ public function __construct(private BroadcastFactory $factory)
{
}

public function handle($event): void
public function handle($eventName, $data): void
{
if ($this->shouldBroadcast($event)) {
$this->factory->queue($event);
if (count($data) && $this->shouldBroadcast($data[0])) {
$this->factory->queue($data[0]);
}
}

Expand Down

0 comments on commit d34959f

Please sign in to comment.