Skip to content

Commit

Permalink
Move WebsocketFrameType into Parser namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
trowski committed Sep 3, 2023
1 parent 6cd7bbc commit 227e285
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/Internal/Rfc6455FrameHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion src/Parser/Rfc6455FrameCompiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use Amp\ForbidCloning;
use Amp\ForbidSerialization;
use Amp\Websocket\Compression\WebsocketCompressionContext;
use Amp\Websocket\WebsocketFrameType;

final class Rfc6455FrameCompiler implements WebsocketFrameCompiler
{
Expand Down
1 change: 0 additions & 1 deletion src/Parser/Rfc6455Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 0 additions & 2 deletions src/Parser/WebsocketFrameCompiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

namespace Amp\Websocket\Parser;

use Amp\Websocket\WebsocketFrameType;

interface WebsocketFrameCompiler
{
/**
Expand Down
2 changes: 0 additions & 2 deletions src/Parser/WebsocketFrameHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

namespace Amp\Websocket\Parser;

use Amp\Websocket\WebsocketFrameType;

interface WebsocketFrameHandler
{
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare(strict_types=1);

namespace Amp\Websocket;
namespace Amp\Websocket\Parser;

/**
* Frame type determined by frame opcode.
Expand Down
1 change: 1 addition & 0 deletions src/Rfc6455Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use Amp\Websocket\Parser\Rfc6455FrameCompilerFactory;
use Amp\Websocket\Parser\Rfc6455ParserFactory;
use Amp\Websocket\Parser\WebsocketFrameCompilerFactory;
use Amp\Websocket\Parser\WebsocketFrameType;
use Amp\Websocket\Parser\WebsocketParserFactory;
use Revolt\EventLoop;

Expand Down
2 changes: 1 addition & 1 deletion test/ParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
use Amp\PHPUnit\AsyncTestCase;
use Amp\Socket\Socket;
use Amp\Websocket\Parser\Rfc6455ParserFactory;
use Amp\Websocket\Parser\WebsocketFrameType;
use Amp\Websocket\Rfc6455Client;
use Amp\Websocket\WebsocketCloseCode;
use Amp\Websocket\WebsocketClosedException;
use Amp\Websocket\WebsocketFrameType;
use function Amp\delay;

class ParserTest extends AsyncTestCase
Expand Down
2 changes: 1 addition & 1 deletion test/WebsocketClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
use Amp\Socket\Socket;
use Amp\Socket\SocketException;
use Amp\Websocket\Parser\Rfc6455ParserFactory;
use Amp\Websocket\Parser\WebsocketFrameType;
use Amp\Websocket\Rfc6455Client;
use Amp\Websocket\WebsocketCloseCode;
use Amp\Websocket\WebsocketClosedException;
use Amp\Websocket\WebsocketFrameType;
use Amp\Websocket\WebsocketTimestamp;
use PHPUnit\Framework\MockObject\MockObject;
use Revolt\EventLoop;
Expand Down
2 changes: 1 addition & 1 deletion test/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Amp\Websocket\Test;

use Amp\Websocket\WebsocketFrameType;
use Amp\Websocket\Parser\WebsocketFrameType;

// 4-byte "random" mask
const MASK = "\xF4\x37\x7A\x9C";
Expand Down

0 comments on commit 227e285

Please sign in to comment.