From 8214ce39fb990d34ce59e996287eb9336ded4382 Mon Sep 17 00:00:00 2001 From: joedixon Date: Mon, 27 Nov 2023 13:04:10 +0000 Subject: [PATCH] Fix code styling --- echo.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/echo.php b/echo.php index 06b9cedf..3a495ef0 100644 --- a/echo.php +++ b/echo.php @@ -6,16 +6,15 @@ use Laravel\Reverb\WebSockets\WsConnection; use Psr\Http\Message\RequestInterface; use React\EventLoop\Loop; -use React\Http\HttpServer; use React\Socket\SocketServer; use Symfony\Component\Routing\Matcher\UrlMatcher; use Symfony\Component\Routing\RequestContext; use Symfony\Component\Routing\RouteCollection; -require __DIR__ . '/vendor/autoload.php'; +require __DIR__.'/vendor/autoload.php'; $loop = Loop::get(); -$socket = new SocketServer("127.0.0.1:8080", [], $loop); +$socket = new SocketServer('127.0.0.1:8080', [], $loop); $router = new Router(new UrlMatcher(routes(), new RequestContext)); $server = new Server($socket, $router, $loop); @@ -28,7 +27,7 @@ function routes() { $routes = new RouteCollection; $routes->add( - 'sockets', + 'sockets', Route::get('/', function (RequestInterface $request, WsConnection $connection) { $connection->onMessage(function ($message) use ($connection) { $connection->send($message); @@ -38,4 +37,4 @@ function routes() ); return $routes; -} \ No newline at end of file +}