From 84a2f2361c0eb22b3d3fe7d36aa37fe5d5764ce7 Mon Sep 17 00:00:00 2001 From: Dave Smith-Hayes Date: Thu, 20 Jun 2024 21:55:37 -0400 Subject: [PATCH] Use arrow function for app handler callbacks. --- app/server/server.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/server/server.php b/app/server/server.php index 94e409e..5d909cf 100644 --- a/app/server/server.php +++ b/app/server/server.php @@ -9,10 +9,7 @@ use Psr\Http\Message\ServerRequestInterface as Request; $app = Bootstrap::init(); -$http = new HttpServer(function (Request $request) use ($app) { - return $app->handle($request); -}); - +$http = new HttpServer(fn (Request $request) => $app->handle($request)); $address = "127.0.0.1:8000"; $socket = new SocketServer($address); $http->listen($socket);