From 4fe10214d5c38039ed03ad52f8e8cf3d4fcebeed Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Fri, 17 Apr 2026 09:53:50 +0300 Subject: [PATCH] change fn to function -- style --- app/Text/TextController.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/Text/TextController.php b/app/Text/TextController.php index 500986e..a024e4f 100644 --- a/app/Text/TextController.php +++ b/app/Text/TextController.php @@ -18,10 +18,12 @@ class TextController { $texts = $this->textRepository->getAll(); - $data = array_map(fn($text) => [ - 'id' => $text->getId(), - 'name' => $text->getName(), - ], $texts); + $data = array_map(function ($text) { + return [ + 'id' => $text->getId(), + 'name' => $text->getName(), + ]; + }, $texts); $response->getBody()->write(json_encode($data)); return $response->withHeader('Content-Type', 'application/json');