From 3370a71cfdb352e12d93504474aaaa326bf12c8b Mon Sep 17 00:00:00 2001 From: ging-dev Date: Sun, 24 May 2020 11:49:04 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/Client.php | 15 +++++++-------- tests/SocketTest.php | 4 ++-- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/Client.php b/src/Client.php index 57e99e9..3d4724d 100644 --- a/src/Client.php +++ b/src/Client.php @@ -9,15 +9,15 @@ class Client { const HEROKU_PLATFORM = 'herokuapp.com'; - + const GLITCH_PLATFORM = 'glitch.me'; - + /** @var Socket $client */ private $client; /** @var string $host */ private $host; - + /** @var string $namespace */ private $namespace; @@ -39,17 +39,16 @@ public function initialize( string $name, string $token = 'gingdev', string $platform = self::HEROKU_PLATFORM - ) - { + ) { $this->host = sprintf("https://%s.%s/api", $name, $platform); $this->client->setHeader('Authorization', 'Bearer ' . $token); $this->namespace = '/'; return $this; } - + /** * Change namespace - * + * * @param string $namespace * @return $this */ @@ -58,7 +57,7 @@ public function of(string $namespace) $this->namespace = $namespace; return $this; } - + /** * Emit data to socket server * diff --git a/tests/SocketTest.php b/tests/SocketTest.php index 02fb7c9..ce8a7d5 100644 --- a/tests/SocketTest.php +++ b/tests/SocketTest.php @@ -17,7 +17,7 @@ public function testSendMessage(): void 'message' => 'Test message' ]); $client->close(); - + $this->assertTrue($test); } public function testSendNamespace(): void @@ -29,7 +29,7 @@ public function testSendNamespace(): void 'message' => 'Test message' ]); $client->close(); - + $this->assertTrue($test); } }