repository = $repository; } /** * {@inheritdoc} * * @return ApiApplication */ public function convert($id) { if (null === $application = $this->repository->find((int) $id)) { throw new NotFoundHttpException(sprintf('Application %s not found.', $id)); } return $application; } }