/** * {@inheritdoc} */ public function getCode($codeId) { if (!($code = $this->repository->find($codeId))) { throw new CodeNotFoundException($codeId); } return $code; }