Piwik\Notification\Manager::removeOldestNotificationsIfThereAreTooMany PHP Method

removeOldestNotificationsIfThereAreTooMany() private static method

    private static function removeOldestNotificationsIfThereAreTooMany()
    {
        if (!self::isSessionEnabled()) {
            return;
        }
        $maxNotificationsInSession = 30;
        $session = static::getSession();
        while (count($session->notifications) >= $maxNotificationsInSession) {
            array_shift($session->notifications);
        }
    }