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');