From 6c83f674f13b3a7709b9534aacaca08c481273be Mon Sep 17 00:00:00 2001 From: taylorotwell Date: Thu, 24 Oct 2024 15:01:06 +0000 Subject: [PATCH] Fix code styling --- src/Protocols/Pusher/EventHandler.php | 4 ++-- tests/FakeConnection.php | 3 +-- tests/Feature/Protocols/Pusher/Reverb/ServerTest.php | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Protocols/Pusher/EventHandler.php b/src/Protocols/Pusher/EventHandler.php index a9c66857..9aa08e83 100644 --- a/src/Protocols/Pusher/EventHandler.php +++ b/src/Protocols/Pusher/EventHandler.php @@ -117,8 +117,8 @@ public function pong(Connection $connection): void */ public function ping(Connection $connection): void { - $connection->usesControlFrames() - ? $connection->control() + $connection->usesControlFrames() + ? $connection->control() : static::send($connection, 'ping'); $connection->ping(); diff --git a/tests/FakeConnection.php b/tests/FakeConnection.php index 9795095f..dbbd7e13 100644 --- a/tests/FakeConnection.php +++ b/tests/FakeConnection.php @@ -101,8 +101,7 @@ public function send(string $message): void /** * Send a control frame to the connection. */ - public function control(string $type = Frame::OP_PING): void { } - + public function control(string $type = Frame::OP_PING): void {} /** * Terminate a connection. diff --git a/tests/Feature/Protocols/Pusher/Reverb/ServerTest.php b/tests/Feature/Protocols/Pusher/Reverb/ServerTest.php index cc91684f..16b7a9f0 100644 --- a/tests/Feature/Protocols/Pusher/Reverb/ServerTest.php +++ b/tests/Feature/Protocols/Pusher/Reverb/ServerTest.php @@ -492,7 +492,7 @@ $subscribedAt = $managedConnection->lastSeenAt(); sleep(1); $connection->send(new Frame('', opcode: Frame::OP_PING)); - + $connection->assertPonged(); expect($managedConnection->lastSeenAt())->toBeGreaterThan($subscribedAt); }); @@ -505,7 +505,7 @@ $subscribedAt = $managedConnection->lastSeenAt(); sleep(1); $connection->send(new Frame('', opcode: Frame::OP_PONG)); - + $connection->assertNotPinged(); $connection->assertNotPonged(); expect($managedConnection->lastSeenAt())->toBeGreaterThan($subscribedAt);