headers->get('x-auth-token'); $security->isGranted('MAESTRO_PROJECT_PROJECTS_READ', $token); $entity = $readQuery->getProduct($id); if (is_array($entity)) { $body['type'] = 'success'; $body['data'] = $entity; $respond->statusOK(); } else { $respond->statusNotFound(); } return $respond->createBody($body)->respond(); } }