Skip to content

Commit

Permalink
fix: cosmetics & docblocks
Browse files Browse the repository at this point in the history
  • Loading branch information
chipslays committed Feb 16, 2023
1 parent 3a90d9e commit 8525af1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/Connection/Channels.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
class Channels
{
/**
* Array of connection channels.
*
* @var string[]
*/
protected array $channels = [];
Expand Down
6 changes: 4 additions & 2 deletions src/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

namespace Porter;

use Porter\Connections;
use Porter\Events\Event;
use Porter\Events\AbstractEvent;
use Porter\Traits\Rawable;
use Porter\Traits\Payloadable;
use Porter\Exceptions\PorterException;
use Porter\Connections;
use Sauce\Traits\Singleton;
use Sauce\Traits\Mappable;
use Workerman\Worker;
Expand Down Expand Up @@ -410,8 +410,10 @@ public function to(TcpConnection|Connection|Connections|array $connection, strin
$connection = [$connection];
}

$payload = $this->makePayload($event, $data);

foreach ($connection as $target) {
$target->send($this->makePayload($event, $data));
$target->send($payload);
}

return $this;
Expand Down

0 comments on commit 8525af1

Please sign in to comment.