Skip to content

Commit

Permalink
Format code
Browse files Browse the repository at this point in the history
  • Loading branch information
limingxinleo committed Sep 26, 2023
1 parent 7241ca9 commit a8092a3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ function swoole_get_flags_from_frame(FrameInterface $frame): int
{
$flags = 0;
if ($frame->getFin()) {
$flags = $flags | SWOOLE_WEBSOCKET_FLAG_FIN;
$flags |= SWOOLE_WEBSOCKET_FLAG_FIN;
}
if ($frame->getRSV1()) {
$flags = $flags | SWOOLE_WEBSOCKET_FLAG_RSV1;
$flags |= SWOOLE_WEBSOCKET_FLAG_RSV1;
}
if ($frame->getRSV2()) {
$flags = $flags | SWOOLE_WEBSOCKET_FLAG_RSV2;
$flags |= SWOOLE_WEBSOCKET_FLAG_RSV2;
}
if ($frame->getRSV3()) {
$flags = $flags | SWOOLE_WEBSOCKET_FLAG_RSV3;
$flags |= SWOOLE_WEBSOCKET_FLAG_RSV3;
}
if ($frame->getMask()) {
$flags = $flags | SWOOLE_WEBSOCKET_FLAG_MASK;
$flags |= SWOOLE_WEBSOCKET_FLAG_MASK;
}

return $flags;
Expand Down

0 comments on commit a8092a3

Please sign in to comment.