protected function decrementForPeriod($key, $value, \DatePeriod $period)
    {
        $ranges = $this->getRanges($period);

        if (count($ranges) > 0) {
            foreach ($ranges as $range) {
                $range instanceof DateRange
                    ? $this->repository->decrementForRange($key, $range->getStartDate(), $range->getEndDate(), $value)
                    : $this->repository->decrementFor($key, $range, $value);
            }
        }
    }