From 096c6bbaa5c67e2efcf5175ba6eab3dbf8934a3a Mon Sep 17 00:00:00 2001 From: N'Bayramberdiyev Date: Sun, 3 Mar 2024 18:39:32 +0300 Subject: [PATCH] Make closure `static` --- bootstrap/middleware.php | 2 +- routes/web.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap/middleware.php b/bootstrap/middleware.php index d80c9b0..c575e2b 100644 --- a/bootstrap/middleware.php +++ b/bootstrap/middleware.php @@ -6,7 +6,7 @@ use Slim\Views\Twig; use Slim\Views\TwigMiddleware; -return function (Slim\App $app): void { +return static function (Slim\App $app): void { $app->addBodyParsingMiddleware(); $app->addRoutingMiddleware(); diff --git a/routes/web.php b/routes/web.php index 1c368ba..60c55e5 100644 --- a/routes/web.php +++ b/routes/web.php @@ -6,7 +6,7 @@ use App\Controllers\ContactController; use App\Controllers\HomeController; -return function (Slim\App $app): void { +return static function (Slim\App $app): void { $app->get('/', [HomeController::class, 'index'])->setName('home.index'); $app->get('/about', [AboutController::class, 'index'])->setName('about.index'); $app->get('/contact', [ContactController::class, 'index'])->setName('contact.index');