Joli\SlackSecretSanta\Controller\SantaController::getSecretSantaOrThrow404 PHP Method

getSecretSantaOrThrow404() private method

private getSecretSantaOrThrow404 ( Request $request, string $hash ) : SecretSanta
$request Symfony\Component\HttpFoundation\Request
$hash string
return Joli\SlackSecretSanta\SecretSanta
    private function getSecretSantaOrThrow404(Request $request, $hash)
    {
        $secretSanta = $request->getSession()->get($this->getSecretSantaSessionKey($hash));
        if (!$secretSanta) {
            throw new NotFoundHttpException();
        }
        return $secretSanta;
    }