Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.

Commit 7f5fb9e

Browse files
committed
fix some warnings
1 parent 2bb5297 commit 7f5fb9e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Concerns/InteractsWithWebsocket.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ trait InteractsWithWebsocket
4141
protected $payloadParser;
4242

4343
/**
44-
* @var SwooleTW\Http\Websocket\Rooms\RoomContract
44+
* @var \SwooleTW\Http\Websocket\Rooms\RoomContract
4545
*/
4646
protected $websocketRoom;
4747

@@ -160,14 +160,16 @@ public function onClose($server, $fd, $reactorId)
160160
* Indicates if a packet is websocket push action.
161161
*
162162
* @param mixed
163+
*
164+
* @return bool
163165
*/
164166
protected function isWebsocketPushPacket($packet)
165167
{
166168
if (! is_array($packet)) {
167169
return false;
168170
}
169171

170-
return $this->isWebsocket
172+
return $this->isServerWebsocket
171173
&& array_key_exists('action', $packet)
172174
&& $packet['action'] === Websocket::PUSH_ACTION;
173175
}

0 commit comments

Comments
 (0)