From a91a2a036b4a7b8b4adb204b999c4675e0bcccde Mon Sep 17 00:00:00 2001 From: joedixon Date: Mon, 27 Nov 2023 13:30:37 +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 15a95fe7..572341e6 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("0.0.0.0:8080", [], $loop); +$socket = new SocketServer('0.0.0.0: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 +}