From 227e285606a2d7edfd5f5573623810ea1b568ba7 Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Sun, 3 Sep 2023 18:00:48 -0500 Subject: [PATCH] Move WebsocketFrameType into Parser namespace --- src/Internal/Rfc6455FrameHandler.php | 2 +- src/Parser/Rfc6455FrameCompiler.php | 1 - src/Parser/Rfc6455Parser.php | 1 - src/Parser/WebsocketFrameCompiler.php | 2 -- src/Parser/WebsocketFrameHandler.php | 2 -- src/{ => Parser}/WebsocketFrameType.php | 2 +- src/Rfc6455Client.php | 1 + test/ParserTest.php | 2 +- test/WebsocketClientTest.php | 2 +- test/functions.php | 2 +- 10 files changed, 6 insertions(+), 11 deletions(-) rename src/{ => Parser}/WebsocketFrameType.php (92%) diff --git a/src/Internal/Rfc6455FrameHandler.php b/src/Internal/Rfc6455FrameHandler.php index 1ff9d8b..55b59e0 100644 --- a/src/Internal/Rfc6455FrameHandler.php +++ b/src/Internal/Rfc6455FrameHandler.php @@ -14,12 +14,12 @@ use Amp\TimeoutCancellation; use Amp\Websocket\Parser\WebsocketFrameCompiler; use Amp\Websocket\Parser\WebsocketFrameHandler; +use Amp\Websocket\Parser\WebsocketFrameType; use Amp\Websocket\Parser\WebsocketParser; use Amp\Websocket\Parser\WebsocketParserException; use Amp\Websocket\WebsocketCloseCode; use Amp\Websocket\WebsocketClosedException; use Amp\Websocket\WebsocketCloseInfo; -use Amp\Websocket\WebsocketFrameType; use Amp\Websocket\WebsocketHeartbeatQueue; use Amp\Websocket\WebsocketMessage; use Amp\Websocket\WebsocketRateLimit; diff --git a/src/Parser/Rfc6455FrameCompiler.php b/src/Parser/Rfc6455FrameCompiler.php index d8d2de4..067c840 100644 --- a/src/Parser/Rfc6455FrameCompiler.php +++ b/src/Parser/Rfc6455FrameCompiler.php @@ -5,7 +5,6 @@ use Amp\ForbidCloning; use Amp\ForbidSerialization; use Amp\Websocket\Compression\WebsocketCompressionContext; -use Amp\Websocket\WebsocketFrameType; final class Rfc6455FrameCompiler implements WebsocketFrameCompiler { diff --git a/src/Parser/Rfc6455Parser.php b/src/Parser/Rfc6455Parser.php index 9dc7a93..900b2bc 100644 --- a/src/Parser/Rfc6455Parser.php +++ b/src/Parser/Rfc6455Parser.php @@ -7,7 +7,6 @@ use Amp\Parser\Parser; use Amp\Websocket\Compression\WebsocketCompressionContext; use Amp\Websocket\WebsocketCloseCode; -use Amp\Websocket\WebsocketFrameType; final class Rfc6455Parser implements WebsocketParser { diff --git a/src/Parser/WebsocketFrameCompiler.php b/src/Parser/WebsocketFrameCompiler.php index f9f1554..b63244c 100644 --- a/src/Parser/WebsocketFrameCompiler.php +++ b/src/Parser/WebsocketFrameCompiler.php @@ -2,8 +2,6 @@ namespace Amp\Websocket\Parser; -use Amp\Websocket\WebsocketFrameType; - interface WebsocketFrameCompiler { /** diff --git a/src/Parser/WebsocketFrameHandler.php b/src/Parser/WebsocketFrameHandler.php index 2f8d639..66d9b2a 100644 --- a/src/Parser/WebsocketFrameHandler.php +++ b/src/Parser/WebsocketFrameHandler.php @@ -2,8 +2,6 @@ namespace Amp\Websocket\Parser; -use Amp\Websocket\WebsocketFrameType; - interface WebsocketFrameHandler { /** diff --git a/src/WebsocketFrameType.php b/src/Parser/WebsocketFrameType.php similarity index 92% rename from src/WebsocketFrameType.php rename to src/Parser/WebsocketFrameType.php index 66768a0..d863869 100644 --- a/src/WebsocketFrameType.php +++ b/src/Parser/WebsocketFrameType.php @@ -1,6 +1,6 @@