private function fetchAuthenticationEntity($adapter) { $entity = $this->model->fetchAuthenticationAdapter($adapter); if (!$entity) { return new ApiProblemResponse(new ApiProblem(404, 'No authentication adapter found')); } return $this->createEntity($entity); }