security->isGranted('ROLE_USER')) { throw new AccessDeniedException('Access denied: ROLE_USER required.'); } $statuses = $this->taskStatusRepository->findBy([], ['position' => 'ASC']); return json_encode(array_map(fn ($s) => [ 'id' => $s->getId(), 'label' => $s->getLabel(), 'color' => $s->getColor(), 'position' => $s->getPosition(), 'isFinal' => $s->getIsFinal(), ], $statuses)); } }