contactPointRepository->getByTypeAndPerson( ContactPointTypeEnum::PRINCIPAL()->getValue(), $access->getPerson() ); if (count($contactPoints) === 0) { return null; } if (count($contactPoints) !== 1){ throw new \RuntimeException('more_than_one_result'); } return $contactPoints[0]; } }