@param int    $minSize
@param int    $maxSize
@param string $format
@param bool   $inclusive

@return $this
351589
public function isBetween($minSize, $maxSize, $format = 'B', $inclusive = false)
    {
        $this->addCondition(
            __METHOD__,
            [$minSize, $maxSize, $format, $inclusive],
            [
                'min'    => $minSize,
                'max'    => $maxSize,
                'format' => (\strtoupper($format[0]) == 'B') ? '' : \strtoupper($format[0])
            ]
        );

        return $this;
    }
647701
public function setFormat($format, $mimeTypes)
    {
        if (null === static::$formats) {
            static::initializeFormats();
        }

        static::$formats[$format] = \is_array($mimeTypes) ? $mimeTypes : [$mimeTypes];
    }
111800
public function Loop($minSize = 1, $maxSize = null)
    {
        list($min, $max) = $this->resolveMinMax($minSize, $maxSize, 10);
        $limit = rand($min, $max);
        $list = ArrayList::create(array());
        $i = 0;
        while ($i < $limit) {
            $list->push(new DataObject());
            $i++;
        }

        return $list;
    }
960904
public function havingBetween(string $column, int $min, int $max)
    {
        $instance = $this->havingStrategyInstance();

        $instance->havingStrategy()->havingBetween($column, $min, $max);

        return $instance;
    }
1341303
public function limitSize($max) {
		// if the maximum is not numeric
		if(is_numeric($max)) {
			// set maximum
			$this->Limits->Size = intval($max);
		}
		// return self
		return($this);
	}
83714
public static function linspace($min, $max, $num = 50, $endpoint = true)
    {
        $range = $max - $min;

        if ($max == $min) {
            throw new \InvalidArgumentException(sprintf(
                'Min and max cannot be the same number: %s', $max
            ));
        }

        $unit = $range / ($endpoint ? $num - 1 : $num);
        $space = [];

        for ($value = $min; $value <= $max; $value += $unit) {
            $space[] = $value;
        }

        if ($endpoint === false) {
            array_pop($space);
        }

        return $space;
    }
786802
public function whereBetween(string $column, int $min, int $max)
    {
        $this->wConditions()->between(...func_get_args());

        return $this;
    }
168508
public function autoSize($minRows = false, $maxRows = null)
    {

        $this->props['autosize'] = $maxRows === null ? boolval($minRows) : compact('minRows', 'maxRows');
        return $this;
    }
858279
public static function fromSizeAndStyle(int $size, string $style): self
    {
        $minimumSize = 1;

        if ($minimumSize > $size) {
            throw Exception\InvalidIndentSizeException::fromSizeAndMinimumSize(
                $size,
                $minimumSize
            );
        }

        $characters = [
            'space' => ' ',
            'tab' => "\t",
        ];

        if (!\array_key_exists($style, $characters)) {
            throw Exception\InvalidIndentStyleException::fromStyleAndAllowedStyles(
                $style,
                ...\array_keys($characters)
            );
        }

        $value = \str_repeat(
            $characters[$style],
            $size
        );

        return new self($value);
    }
141543
public function resizeToBestFit($max_width, $max_height, $allow_enlarge = false)
    {
        if ($this->getSourceWidth() <= $max_width && $this->getSourceHeight() <= $max_height && $allow_enlarge === false) {
            return $this;
        }

        $ratio  = $this->getSourceHeight() / $this->getSourceWidth();
        $width = $max_width;
        $height = $width * $ratio;

        if ($height > $max_height) {
            $height = $max_height;
            $width = $height / $ratio;
        }

        return $this->resize($width, $height, $allow_enlarge);
    }
167369
public function range($min, $max, $addFilter = true, $forceInt = false)
    {
        if ($addFilter) {
            $this->addFilter(new RangeFilter($min, $max, $forceInt));
        }

        $this->min($min, false)
            ->max($max, false);

        return $this;
    }
100916
protected function setFormat(FormatInterface $format, bool $remove = null): FormatterInterface
    {
        $name = $format->getName();
        $formats = $this->getFormats();
        if (array_key_exists($name, $formats) === false) {
            throw new FormatNotSupported($format);
        }

        $code = $formats[$name];
        $format = $this->getFormat();
        if ($remove === true) {
            $this->format = array_diff($format, [$code]);
        } else {
            $this->format = array_merge($format, [$code]);
        }

        return $this;
    }
95797
public function setMinSizeMessage($minSizeMessage)
    {
        if (!is_string($minSizeMessage)) {
            throw new \InvalidArgumentException('The attribute minSizeMessage on the class Attribute has to be string (' . gettype($minSizeMessage) . ('object' === gettype($minSizeMessage) ? ' ' . get_class($minSizeMessage) : '') . ' given).');
        }

        $this->minSizeMessage = $minSizeMessage;

        return $this;
    }
351960
public function setFontSize($min, $max = null) {

		if(false === ('-' . intval($min) == '-' . $min)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type integer, "%s" given', __METHOD__, gettype($min)), E_USER_ERROR);
		}

		if(null !== $max && false === ('-' . intval($max) == '-' . $max)) {
			return trigger_error(sprintf('Argument 2 passed to %s() must be of the type integer, "%s" given', __METHOD__, gettype($max)), E_USER_ERROR);
		}

		$this -> fontsize = ['min' => $min, 'max' => ($max !== null ? $max : $min)];

		return $this;
	}
1036927
public function orHavingBetween(string $column, int $min, int $max)
    {
        $this->hConditions()->orBetween(...func_get_args());

        return $this;
    }
131146
public function setImageWidth($minwidth, $maxwidth)
    {
        $this->setImageMin($minwidth, $this->_minheight);
        $this->setImageMax($maxwidth, $this->_maxheight);
        return $this;
    }
114394
public function setMaxFileSize(int $maxFileSize)
    {
        if ($maxFileSize > 0) {
            $properties = $this->getProperties();
            $properties['maxFileSize'] = $maxFileSize;
            $this->setProperties($properties);
            return $this;
        }
        return false;
    }