protected function findHumanForLinkToCandidate(Request $request, Application $app) { $repo = new HumanPopItInfoRepository(); $humanRepo = new HumanRepository(); if ($request->query->has("ynmpid")) { $humanInfo = $repo->getByPopItID($request->query->get("ynmpid")); if ($humanInfo) { $human = $humanRepo->loadById($humanInfo->getHumanId()); if ($human) { return $human; } } } }