'error', 'key' => 'projectWorkflow', 'method' => 'lastStepConfigurationValid', 'data' => '', ]; $token = $request->headers->get('x-auth-token'); $security->isGranted('MAESTRO_PROJECT_PROJECTS_READ', $token); $entity = $readQuery->lastStepConfigurationValid($id); if (is_int($entity)) { $body['type'] = 'success'; $body['data'] = $entity; $respond->statusOK(); } else { $body['data'] = 'Project not found for id ' . $id . ' !'; $respond->statusNotFound(); } return $respond->createBody($body)->respond(); } }