@SuppressWarnings(PHPMD.BooleanArgumentFlag)

@param string $zoneID
@param string $since
@param string $until
@param bool $continuous
@return \stdClass
770338
public function getAnalyticsDashboard(string $zoneID, string $since = '-10080', string $until = '0', bool $continuous = true): \stdClass
    {
        $response = $this->adapter->get('zones/' . $zoneID . '/analytics/dashboard', ['since' => $since, 'until' => $until, 'continuous' => var_export($continuous, true)]);

        $this->body = $response->getBody();

        return json_decode($this->body)->result;
    }
338079
public function addRecord(
        string $zoneID,
        string $type,
        string $name,
        string $content,
        int $ttl = 0,
        bool $proxied = true,
        string $priority = '',
        array $data = []
    ): bool {
        $options = [
            'type' => $type,
            'name' => $name,
            'content' => $content,
            'proxied' => $proxied
        ];

        if ($ttl > 0) {
            $options['ttl'] = $ttl;
        }

        if (!empty($priority)) {
            $options['priority'] = (int)$priority;
        }
        
        if (!empty($data)) {
            $options['data'] = $data;
        }

        $user = $this->adapter->post('zones/' . $zoneID . '/dns_records', $options);

        $this->body = json_decode($user->getBody());

        if (isset($this->body->result->id)) {
            return true;
        }

        return false;
    }
222416
public function betweenStrict($from, $to)
    {
        if (!is_int($from) && !is_float($from)) {
            throw new InvalidIntOrFloatException('from', $from);
        } elseif (!is_int($to) && !is_float($to)) {
            throw new InvalidIntOrFloatException('to', $to);
        } elseif ($from > $to) {
            throw new NumberNotLessStrictlyException('from', $from, $to);
        }

        if (!is_int($this->value) && !is_float($this->value)) {
            throw new InvalidIntOrFloatException($this->name, $this->value);
        } elseif ($this->value <= $from || $this->value >= $to) {
            throw new NumberNotBetweenStrictlyException($this->name, $this->value, $from, $to);
        }

        return $this;
    }
699939
public function get($sinceId, $pageSize)
    {
        $this->validateSinceId($sinceId);

        $this
            ->initCollection()
            ->removeOldEvents($sinceId)
            ->initCollection()
            ->getEvents($sinceId)
            ->setOrder()
            ->setPageSize($pageSize);

        return $this->eventsApiResponseFactory->create()
            ->setCurrentPage($this->eventCollection->getCurPage())
            ->setLastPage($this->eventCollection->getLastPageNumber())
            ->setPageSize($this->eventCollection->getPageSize())
            ->setTotalCount($this->eventCollection->getSize())
            ->setEvents($this->handleEvents());
    }
906249
protected function to($what, &$out, $until = false, $allowNewline = false) {
if (is_string($allowNewline)) {
$validChars = $allowNewline;
} else {
$validChars = $allowNewline ? "." : "[^\n]";
}
if (!$this->match('('.$validChars.'*?)'.\ATPCore\Lessc::preg_quote($what), $m, !$until)) return false;
if ($until) $this->count -= strlen($what); // give back $what
$out = $m[1];
return true;
}
12371
public function between($field, $from, $to)
    {
        $this->enqueue(new BetweenExpr($field, $from, $to));

        return $this;
    }
537494
protected function getCachedCountBetween(Carbon $from, Carbon $until, $locale, $cacheKey)
    {
        $key = $this->makeBetweenCacheKey($from, $until, $locale, $cacheKey);

        return $this->cache->get($key);
    }
974
private function linkZone(Zone $zone, array $zoneData): void
    {
        $linkedZoneLayout = $this->layoutService->loadLayout($zoneData['layout_id']);
        $linkedZone = $linkedZoneLayout->getZone($zoneData['identifier']);
        $this->layoutService->linkZone($zone, $linkedZone);
    }
971606
public function createPageRule(
        string $zoneID,
        PageRulesTargets $target,
        PageRulesActions $actions,
        bool $active = true,
        int $priority = null
    ): bool {
        $options = [
            'targets' => $target->getArray(),
            'actions' => $actions->getArray()
        ];

        if ($active !== null) {
            $options['status'] = $active == true ? 'active' : 'disabled';
        }

        if ($priority !== null) {
            $options['priority'] = $priority;
        }


        $query = $this->adapter->post('zones/' . $zoneID . '/pagerules', $options);

        $this->body = json_decode($query->getBody());

        if (isset($this->body->result->id)) {
            return true;
        }

        return false;
    }
622360
public void writeTo(String zoneID, OutputStream out) throws IOException {
        if (out instanceof DataOutput) {
            writeTo(zoneID, (DataOutput)out);
        } else {
            DataOutputStream dout = new DataOutputStream(out);
            writeTo(zoneID, (DataOutput)dout);
            dout.flush();
        }
    }
1044440
public function memberCardSummaryById(string $from, string $to, string $cardId)
    {
        $ext = [
            'card_id' => $cardId,
        ];

        return $this->query('datacube/getcardmembercarddetail', $from, $to, $ext);
    }
836686
public function deleteAction($zoneId, $componentId, Request $request)
    {
        if (!$zone = $this->container->get('synapse.zone.loader')->retrieve($zoneId)) {
            throw new NotFoundHttpException(sprintf('No zone found under id "%s"', $zoneId));
        }
        if (!$component = $this->container->get('synapse.component.loader')->retrieve($componentId)) {
            throw new NotFoundHttpException(sprintf('No component found under id "%s"', $componentId));
        }

        $this->container->get('synapse.zone.domain')->removeComponent(
            $zone,
            $component
        );

        return new RedirectResponse(
            $request->server->get('HTTP_REFERER')
        );
    }
1117036
public function between($item, $low, $up, $cond = null, $not = false)
    {
        $bClause = '';

        if (null == $this->oosql_where && null == $this->oosql_between && null == $this->oosql_in) {
            $bClause .= ' WHERE ';
        } else {
            $cnd = ' AND ';

            if (null != $cond) {

                if (strtolower($cond) == 'or') {
                    $cnd = ' OR ';
                }

            }
            $bClause .= $cnd;
        }

        if ($not) {
            $item = $item . ' NOT ';
        }
        $bClause .= $item . ' BETWEEN ' . $low . ' AND ' . $up;

        $this->oosql_between = $bClause;

        return $this;
    }
1300051
long until(AbstractDate end, TemporalUnit unit) {
        if (unit instanceof ChronoUnit) {
            switch ((ChronoUnit) unit) {
                case DAYS:
                    return daysUntil(end);
                case WEEKS:
                    return weeksUntil(end);
                case MONTHS:
                    return monthsUntil(end);
                case YEARS:
                    return monthsUntil(end) / lengthOfYearInMonths();
                case DECADES:
                    return monthsUntil(end) / (lengthOfYearInMonths() * 10);
                case CENTURIES:
                    return monthsUntil(end) / (lengthOfYearInMonths() * 100);
                case MILLENNIA:
                    return monthsUntil(end) / (lengthOfYearInMonths() * 1000);
                case ERAS:
                    return end.getLong(ERA) - getLong(ERA);
                default:
                    break;
            }
            throw new UnsupportedTemporalTypeException("Unsupported unit: " + unit);
        }
        return unit.between(this, end);
    }
1081591
public function between($from, $to)
    {
        if (!is_int($from) && !is_float($from)) {
            throw new InvalidIntOrFloatException('from', $from);
        } elseif (!is_int($to) && !is_float($to)) {
            throw new InvalidIntOrFloatException('to', $to);
        } elseif ($from > $to) {
            throw new NumberNotLessStrictlyException('from', $from, $to);
        }

        if (!is_int($this->value) && !is_float($this->value)) {
            throw new InvalidIntOrFloatException($this->name, $this->value);
        } elseif ($this->value < $from || $this->value > $to) {
            throw new NumberNotBetweenException($this->name, $this->value, $from, $to);
        }

        return $this;
    }
291796
public function scopeOlderThanOrBetween(Builder $query, $until = null, $from = null)
    {
        if (is_null($until))
        {
            $until = Carbon::now();
        }

        $query->where('created_at', '<', $until);

        if ( ! is_null($from))
        {
            $query->where('created_at', '>=', $from);
        }

        return $query;
    }
165811
private static void writeZonePropsByTime(Writer writer, boolean isDst, String tzname,
            int fromOffset, int toOffset, long time, boolean withRDATE) throws IOException {
        beginZoneProps(writer, isDst, tzname, fromOffset, toOffset, time);
        if (withRDATE) {
            writer.write(ICAL_RDATE);
            writer.write(COLON);
            writer.write(getDateTimeString(time + fromOffset));
            writer.write(NEWLINE);
        }
        endZoneProps(writer, isDst);
    }