change fn to function -- style

This commit is contained in:
Yisroel Baum 2026-04-17 09:53:50 +03:00
parent 68da48aedd
commit 4fe10214d5
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9

View file

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