'error', 'key' => 'cdf', 'method' => 'createCoverCdf', 'data' => '', ]; $security->isGranted('MAESTRO_PROJECT_PROJECTS_UPDATE', $request->headers->get('x-auth-token')); $created = $cdf->reInitCoverCdf($id); if (!$created instanceof Exception) { $body['type'] = 'success'; $body['data'] = $created; $respond->statusCreated(); } else { $body['data'] = $created->getMessage(); $respond->statusUnprocessableEntity(); } return $respond->createBody($body)->respond(); } }