src/Health/Controller/HealthController.php
public function cget(): JsonResponse
    {
        $statuses = $this->healthService->check();
        $data = $statuses->toObject();
        $data->timestamp = $data->timestamp->format(static::TIMESTAMP_FORMAT);
        $data->statuses = new stdClass;

        foreach ($data->collection as $status) {
            $status->timestamp = $status->timestamp->format(static::TIMESTAMP_FORMAT);
            $alias = $status->alias;
            unset($status->alias);
            $data->statuses->{$alias} = $status;
        }

        unset($data->collection);

        return new JsonResponse($data, Response::HTTP_OK, [
            'Content-Type' => 'application/json; charset=utf-8'
        ]);
    }
public function cget(): JsonResponse
    {
        $statuses = $this->healthService->check();
        $data = $statuses->toObject();
        $data->timestamp = $data->timestamp->format(static::TIMESTAMP_FORMAT);
        $data->statuses = new stdClass;

        foreach ($data->collection as $status) {
            $status->timestamp = $status->timestamp->format(static::TIMESTAMP_FORMAT);
            $alias = $status->alias;
            unset($status->alias);
            $data->statuses->{$alias} = $status;
        }

        unset($data->collection);

        return new JsonResponse($data, Response::HTTP_OK, [
            'Content-Type' => 'application/json; charset=utf-8'
        ]);
    }
public function cget ( ) : JsonResponse { $ statuses = $ this -> healthService -> check ( ) ; $ data = $ statuses -> toObject ( ) ; $ data -> timestamp = $ data -> timestamp -> format ( static :: TIMESTAMP_FORMAT ) ; $ data -> statuses = new stdClass ; foreach ( $ data -> collection as $ status ) { $ status -> timestamp = $ status -> timestamp -> format ( static :: TIMESTAMP_FORMAT ) ; $ alias = $ status -> alias ; unset ( $ status -> alias ) ; $ data -> statuses -> { $ alias } = $ status ; } unset ( $ data -> collection ) ; return new JsonResponse ( $ data , Response :: HTTP_OK , [ 'Content-Type' => 'application/json; charset=utf-8' ] ) ; }
Action

@Route(path="/health", methods={"GET"})
@return \Symfony\Component\HttpFoundation\JsonResponse
Action