checks if given value is below min border of range

@param   mixed  $value
@return  bool
@throws  \LogicException
505755
protected function belowMinBorder($value): bool
    {
        if (null === $this->minDate) {
            return false;
        }

        if (!($value instanceof Datespan)) {
            throw new \LogicException('Given value must be of instance ' . Datespan::class);
        }

        return $value->startsBefore($this->minDate->change()->timeTo('00:00:00'));
    }
907280
public function isValueValid($value)
    {
        // If this value is a string and is mostly a number...
        if (is_string($value) && is_numeric($value))
        {
            // ...but contains an exponential value.
            if (0 <= strpos($value, 'e'))
            {
                // TODO: throw exception, maybe??
                trigger_error('FHIRDecimal should NOT contain exponential value.  "'.$value.'" seen.');
                return true;
            }
            // ...and does not contain a decimal.
            else if (false === strpos($value, '.'))
            {
                return ctype_digit($value);
            }
            // ...Assume we're OK for now...
            // TODO: Additional checks
            else
            {
                return true;
            }
        }
        else if (is_int($value) || is_float($value))
        {
            return true;
        }
        else
        {
            return false;
        }
    }
1342742
public static function isBetween($value, $min, $max, $inclusive = false)
    {
        \settype($value, 'int');
        \settype($min, 'int');
        \settype($max, 'int');

        if ($min > $max) {
            throw new \InvalidArgumentException(\sprintf('%s cannot be less than %s for validation', $min, $max));
        }

        if (false === $inclusive) {
            return (($value > $min) && ($value < $max));
        }

        return (($value >= $min) && ($value <= $max));
    }
1205714
protected function shouldEval($value) {
        switch ($value[0]) {
        case "exp":
            if ($value[1] == "/") {
                return $this->shouldEval($value[2], $value[3]);
            }
        case "var":
        case "fncall":
            return true;
        }
        return false;
    }
528229
public static function isLte($value, $min)
    {
        is_array($min) && $min = $min[0];
        if (!is_numeric($value)) {
            return false;
        } else {
            return $value <= $min;
        }
    }
677398
protected function _validate($value)
    {
        $ret = parent::_validate($value);

        if ($ret) {
            if (strlen($value) < self::$MIN_LENGTH) {
                $ret = false;
            }
        }

        return $ret;
    }
1018847
private function parseValue($value)
    {
        if (substr($value, 0, 1) === '"' && substr($value, -1, 1) === '"') {
            return substr($value, 1, -1);
        }

        if ($value === 'null') {
            return null;
        }

        throw new LogicException(sprintf('Can\'t parse the value: "%s"', $value));
    }
496762
public function isLength($value, $parameter)
    {
        $min = $parameter[0];
        $max = $parameter[1];
        if ($min != 0 && strlen($value) < $min) {
            return false;
        }
        if ($max != 0 && strlen($value) > $max) {
            return false;
        }

        return true;
    }
903314
protected function isAcceptLength($value)
    {
        $value = strlen(utf8_decode($value));

        if ($value < $this->min) {
            throw new ExceptionFactory('InvalidLength', [$value, 'greater', $this->min]);
        }
        else if ($value > $this->max) {
            throw new ExceptionFactory('InvalidLength', [$value, 'less', $this->max]);
        }

        return true;
    }
828826
public function checkBetween($value, $min, $max)
    {
        return $this->checkMin($value, $min) && $this->checkMax($value, $max);
    }
1125063
public static function minCount($value, int $minCount): bool
    {
        if (!static::isCountable($value)) {
            return false;
        }

        return count($value) >= $minCount;
    }
496179
public static function isOptionalIntegerRange($value, $min, $max)
    {
        /* No additional validations when the value is null. */
        if (null === $value) {

            return true;
        }

        return self::isRequiredIntegerRange($value, $min, $max);
    }
924557
public function isValid($value)
    {
        $this->_setValue($value);
        if ($this->_max <= $value) {
            $this->_error(self::NOT_LESS);
            return false;
        }
        return true;
    }
407938
public function checkRequired($value)
    {
        if (is_null($value)) {
            return false;
        }

        if (is_string($value) && trim($value) === '') {
            return false;
        }

        if ((is_array($value) || $value instanceof Countable) && count($value) < 1) {
            return false;
        }

        return true;
    }
1289675
public function clamp($value)
	{
		return isset($value) && is_numeric($value) ? min(max($value, $this->min), $this->max) : $this->default ?: ($this->nullable ? null : min(max(0, $this->min), $this->max));
	}
895226
public static function isLength($value, $min = 0, $max = 0)
    {
        $value = trim($value);
        if (!is_string($value)) {
            return false;
        }
        $length = function_exists('mb_strlen') ? mb_strlen($value, 'UTF-8') : strlen($value);

        if (is_array($min)) {
            $max = $min[1];
            $min = $min[0];
        }
        if ($min != 0 && $length < $min) return false;
        if ($max != 0 && $length > $max) return false;
        return true;
    }
360419
final protected function valueInBounds($value)
    {
        return is_null($value) || (
            (is_null($this->getMinLength()) || strlen($value) >= $this->getMinLength())
            &&
            (is_null($this->getMaxLength()) || strlen($value) <= $this->getMaxLength())
        );
    }