From 61908581edcc370f760c786278747f4c0d8662ca Mon Sep 17 00:00:00 2001 From: Tim van Dijen <tvdijen@gmail.com> Date: Wed, 31 Aug 2022 17:33:00 +0200 Subject: [PATCH] Shorten StreamedResponse call A callback doesn't necessarily have to be an anonymous function --- modules/admin/src/Controller/Config.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/admin/src/Controller/Config.php b/modules/admin/src/Controller/Config.php index c9c789e40..65a158060 100644 --- a/modules/admin/src/Controller/Config.php +++ b/modules/admin/src/Controller/Config.php @@ -172,9 +172,7 @@ class Config { $this->authUtils->requireAdmin(); - return new StreamedResponse(function () { - phpinfo(); - }); + return new StreamedResponse('phpinfo'); } /** -- GitLab