/** * @param SessionRepository $repo * @param AccessUrl $url * @throws \Exception */ private function checkLimit($repo, AccessUrl $url) { $limit = $url->getLimitSessions(); if (!empty($limit)) { $count = $repo->getCountSessionByUrl($url); if ($count >= $limit) { api_warn_hosting_contact('hosting_limit_sessions', $limit); throw new \Exception('PortalSessionsLimitReached'); } } }