Piwik\Plugins\MobileMessaging\API::increaseCount PHP Method

increaseCount() private method

private increaseCount ( $option, $phoneNumber )
    private function increaseCount($option, $phoneNumber)
    {
        $settings = $this->getCurrentUserSettings();
        $counts = array();
        if (isset($settings[$option])) {
            $counts = $settings[$option];
        }
        $countToUpdate = 0;
        if (isset($counts[$phoneNumber])) {
            $countToUpdate = $counts[$phoneNumber];
        }
        $counts[$phoneNumber] = $countToUpdate + 1;
        $settings[$option] = $counts;
        $this->setCurrentUserSettings($settings);
    }