Skip to content

Commit

Permalink
Fix code styling
Browse files Browse the repository at this point in the history
  • Loading branch information
joedixon authored and github-actions[bot] committed Nov 15, 2023
1 parent 9eec38d commit cc4e0cb
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/Conn.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ public function __call($method, $parameters)

return $this->connection->{$method}(...$parameters);
}
}
}
6 changes: 2 additions & 4 deletions src/HttpServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
namespace Laravel\Reverb;

use GuzzleHttp\Psr7\Message;
use GuzzleHttp\Psr7\Response;
use Laravel\Reverb\Contracts\ApplicationProvider;
use Laravel\Reverb\Contracts\ConnectionManager;
use Laravel\Reverb\Servers\Reverb\Connection;
use Laravel\Reverb\WebSockets\Request as WebSocketRequest;
use Laravel\Reverb\WebSockets\WsConnection;
use Psr\Http\Message\RequestInterface;
use Ratchet\RFC6455\Handshake\RequestVerifier;
Expand Down Expand Up @@ -51,11 +49,11 @@ public function start()

protected function handleRequest(string $data, Conn $connection)
{
if(! $connection->isInitialized()) {
if (! $connection->isInitialized()) {
$request = Request::from($data);
$connection->initialize();

if($request->getUri()->getPath() === '/app/yysmuc8zbg4vo2hxgk9w') {
if ($request->getUri()->getPath() === '/app/yysmuc8zbg4vo2hxgk9w') {
$negotiator = new ServerNegotiator(new RequestVerifier);
$response = $negotiator->handshake($request);

Expand Down
2 changes: 1 addition & 1 deletion src/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ public static function from(string $message): RequestInterface
{
return Message::parseRequest($message);
}
}
}
2 changes: 0 additions & 2 deletions src/Servers/Reverb/Console/Commands/StartServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@

use Illuminate\Console\Command;
use Laravel\Reverb\Concerns\InteractsWithAsyncRedis;
use Laravel\Reverb\Contracts\Logger;
use Laravel\Reverb\Jobs\PingInactiveConnections;
use Laravel\Reverb\Jobs\PruneStaleConnections;
use Laravel\Reverb\Loggers\CliLogger;
use Laravel\Reverb\Output;
use Laravel\Reverb\Servers\Reverb\Factory as ServerFactory;
use React\EventLoop\Loop;
Expand Down
3 changes: 1 addition & 2 deletions src/Servers/Reverb/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use React\Http\HttpServer;
use React\Http\Message\Response;
use React\Http\Middleware\LimitConcurrentRequestsMiddleware;
use React\Http\Middleware\RequestBodyBufferMiddleware;
use React\Http\Middleware\StreamingRequestMiddleware;
use React\Socket\SocketServer;
use Symfony\Component\Routing\Route;
Expand All @@ -29,7 +28,7 @@ class Factory
* Create a new WebSocket server instance.
*/
public static function make(string $host = '0.0.0.0', string $port = '8080', LoopInterface $loop = null)
{
{
$loop = $loop ?: Loop::get();

$socket = new SocketServer("{$host}:{$port}", [], $loop);
Expand Down
2 changes: 0 additions & 2 deletions src/WebSockets/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@
namespace Laravel\Reverb\WebSockets;

use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ServerRequestInterface;
use Ratchet\RFC6455\Handshake\RequestVerifier;
use Ratchet\RFC6455\Handshake\ServerNegotiator;
use React\Http\Message\Response;
use React\Stream\CompositeStream;
use React\Stream\ThroughStream;

class Request
{
Expand Down
3 changes: 1 addition & 2 deletions src/WebSockets/WebSocketMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@
namespace Laravel\Reverb\WebSockets;

use Closure;
use Illuminate\Support\Str;
use Laravel\Reverb\Application;
use Laravel\Reverb\Contracts\ApplicationProvider;
use Laravel\Reverb\Contracts\ConnectionManager;
use Laravel\Reverb\Server;
use Laravel\Reverb\Servers\Reverb\Connection;
use Laravel\Reverb\WebSockets\Request as WebSocketRequest;
use Laravel\Reverb\WebSockets\WsConnection;
use Psr\Http\Message\ServerRequestInterface;
use React\Http\Message\Response;
use Illuminate\Support\Str;

class WebSocketMiddleware
{
Expand Down

0 comments on commit cc4e0cb

Please sign in to comment.