Checks if given value is of type "float"

@param $value

@return bool
556642
public static function isFloat($value)
    {
        if (is_float($value)) {
            return true;
        } elseif (!is_string($value)) {
            return false;
        }

        return preg_match('/^[0-9]+\.[0-9]+$/', $value) > 0;
    }
706179
public function isValueValid($value) {
		return $value instanceof DataType\DateTimeType || $value instanceof DataType\TextType || $value instanceof DataType\URLType;
	}
562443
private function getValue($value)
    {
        if ($this->isBoolean($value)) {
            return (strtolower($value) === 'true');
        } elseif ($this->isInteger($value)) {
            return (int)$value;
        } elseif ($this->isNumber($value)) {
            return (float)$value;
        }
        return $value;
    }
1312272
protected function isValueTooHigh($value)
    {
        // check if the value is not to high.
        if ($this->max !== null) {
            if (((function_exists('bcsub') && floatval(bcsub(
                $this->max,
                $value,
                4
            )) < 0) || $value > $this->max) && ((string)$this->max) != ((string)$value)
            ) {
                return true;
            }
        }
        return false;
    }
716156
public function isValid($value)
    {
        if ((float) $value < 0) {
            $this->error(self::NEGATIVE);
            return false;
        }
        
        if (!preg_match('/^[0-9]+(.[0-9]{1,2})?$/', $value)) {
            $this->error(self::INVALID);
            return false;
        }

        return true;
    }
440016
public function isValid($value)
    {
        if ($value !== null && !is_string($value) && !is_int($value) && 
            !is_float($value) && !is_bool($value) && !is_array($value) &&
            !is_object($value)
        ) {
            $this->error(self::INVALID);
            return false;
        }
        
        $type = $this->getType();
        $this->setValue($value);
        $object  = false;

        // OBJECT_COUNT (countable object)
        if ($type & self::OBJECT_COUNT) {
            $object = true;

            if (is_object($value) && ($value instanceof \Countable) &&
                (count($value) === 0)) {
                return true;
            }
        }

        // OBJECT_STRING (object's toString)
        if ($type & self::OBJECT_STRING) {
            $object = true;

            if ((is_object($value) && (!method_exists($value, '__toString'))) ||
                (is_object($value) && (method_exists($value, '__toString')) &&
                (((string) $value) === ""))) {
                return true;
            }
        }

        // OBJECT (object)
        if ($type & self::OBJECT) {
            // Fall through. Objects are always considered not empty.
        } elseif ($object === false) {
            // If object not allowed but object given then return false.
            if (is_object($value)) {
                $this->error(self::INVALID);
                return false;
            }
        }

        // SPACE ('   ')
        if ($type & self::SPACE) {
            if (is_string($value) && (preg_match('/^\s+$/s', $value))) {
                return true;
            }
        }

        // NULL (null)
        if ($type & self::NULL) {
            if ($value === null) {
                return true;
            }
        }

        // EMPTY_ARRAY (array())
        if ($type & self::EMPTY_ARRAY) {
            if (is_array($value) && ($value == array())) {
                return true;
            }
        }

        // ZERO ('0')
        if ($type & self::ZERO) {
            if (is_string($value) && ($value == '0')) {
                return true;
            }
        }

        // STRING ('')
        if ($type & self::STRING) {
            if (is_string($value) && ($value == '')) {
                return true;
            }
        }

        // FLOAT (0.0)
        if ($type & self::FLOAT) {
            if (is_float($value) && ($value == 0.0)) {
                return true;
            }
        }

        // INTEGER (0)
        if ($type & self::INTEGER) {
            if (is_int($value) && ($value == 0)) {
                return true;
            }
        }

        // BOOLEAN (false)
        if ($type & self::BOOLEAN) {
            if (is_bool($value) && ($value == false)) {
                return true;
            }
        }

        $this->error(self::IS_NOT_EMPTY);
        return false;
    }
899793
public function isValid($value)
    {
        if ($value !== null && !is_string($value) && !is_int($value) && !is_float($value) &&
            !is_bool($value) && !is_array($value) && !is_object($value)) {
            $this->_error(self::INVALID);
            return false;
        }

        $type    = $this->getType();
        $this->_setValue($value);
        $object  = false;

        // OBJECT_COUNT (countable object)
        if ($type >= self::OBJECT_COUNT) {
            $type -= self::OBJECT_COUNT;
            $object = true;

            if (is_object($value) && ($value instanceof Countable) && (count($value) == 0)) {
                $this->_error(self::IS_EMPTY);
                return false;
            }
        }

        // OBJECT_STRING (object's toString)
        if ($type >= self::OBJECT_STRING) {
            $type -= self::OBJECT_STRING;
            $object = true;

            if ((is_object($value) && (!method_exists($value, '__toString'))) ||
                (is_object($value) && (method_exists($value, '__toString')) && (((string) $value) == ""))) {
                $this->_error(self::IS_EMPTY);
                return false;
            }
        }

        // OBJECT (object)
        if ($type >= self::OBJECT) {
            $type -= self::OBJECT;
            // fall trough, objects are always not empty
        } else if ($object === false) {
            // object not allowed but object given -> return false
            if (is_object($value)) {
                $this->_error(self::IS_EMPTY);
                return false;
            }
        }

        // SPACE ('   ')
        if ($type >= self::SPACE) {
            $type -= self::SPACE;
            if (is_string($value) && (preg_match('/^\s+$/s', $value))) {
                $this->_error(self::IS_EMPTY);
                return false;
            }
        }

        // NULL (null)
        if ($type >= self::NULL) {
            $type -= self::NULL;
            if ($value === null) {
                $this->_error(self::IS_EMPTY);
                return false;
            }
        }

        // EMPTY_ARRAY (array())
        if ($type >= self::EMPTY_ARRAY) {
            $type -= self::EMPTY_ARRAY;
            if (is_array($value) && ($value == array())) {
                $this->_error(self::IS_EMPTY);
                return false;
            }
        }

        // ZERO ('0')
        if ($type >= self::ZERO) {
            $type -= self::ZERO;
            if (is_string($value) && ($value == '0')) {
                $this->_error(self::IS_EMPTY);
                return false;
            }
        }

        // STRING ('')
        if ($type >= self::STRING) {
            $type -= self::STRING;
            if (is_string($value) && ($value == '')) {
                $this->_error(self::IS_EMPTY);
                return false;
            }
        }

        // FLOAT (0.0)
        if ($type >= self::FLOAT) {
            $type -= self::FLOAT;
            if (is_float($value) && ($value == 0.0)) {
                $this->_error(self::IS_EMPTY);
                return false;
            }
        }

        // INTEGER (0)
        if ($type >= self::INTEGER) {
            $type -= self::INTEGER;
            if (is_int($value) && ($value == 0)) {
                $this->_error(self::IS_EMPTY);
                return false;
            }
        }

        // BOOLEAN (false)
        if ($type >= self::BOOLEAN) {
            $type -= self::BOOLEAN;
            if (is_bool($value) && ($value == false)) {
                $this->_error(self::IS_EMPTY);
                return false;
            }
        }

        return true;
    }
465368
public function isValueValid($value) {
		return $value instanceof Type\EnumerationType || $value instanceof Type\PropertyValueType || $value instanceof Type\QualitativeValueType || $value instanceof Type\QuantitativeValueType || $value instanceof Type\StructuredValueType;
	}
1116456
protected final function _isValidFloat($key,$value){

        if(!is_numeric($value)){
            return $this->setError($key,"`{$key}` must be numeric");
        }//if

        if(!$this->_isBetweenMinAndMax($key,$value)){
            return false;
        }//if

        return true;

    }
849786
public static function isValueType($value)
    {
        if (is_scalar($value) || $value === null) {
            return true;
        } elseif (is_array($value)) {
            $isScalar = true;
            array_walk_recursive($value,
                    function ($value) use (&$isScalar) {
                        if ($isScalar && !(is_scalar($value) || $value === null)) {
                            $isScalar = false;
                        }
                    });

            return $isScalar;
        } else {
            return false;
        }
    }
610735
private function isInt(string $value): bool
    {
        return \is_numeric($value) && (float)\round($value, 0) === (float)$value;
    }
788224
public function isValueValid($value) {
		return $value instanceof Type\ListItem || $value instanceof DataType\TextType || $value instanceof Type\Thing;
	}
932766
function Check($value)
    {
        if (!ctype_digit(Str::TrimLeft($value, '-')))
            $this->error = self::HasNonDigits;
        else
        {
            $floatValue = (float)$value;
            if ($floatValue < $this->min)
            {
                 $this->error = self::ExceedsMin;
            }
            else if ($floatValue > $this->max)
                $this->error = self::ExceedsMax;
        }
        return $this->error == '';
    }
37492
protected function convertType(string $value)
    {
        $val = \mb_strtolower($value);
        if ($val === 'true') {
            return true;
        } elseif ($val === 'false') {
            return false;
        } elseif ($val === 'null') {
            return null;
        } elseif (\mb_strpos($val, '.') !== false && \is_numeric($val)) {
            return (float) $val;
        } elseif (\is_numeric($val)) {
            return (int) $val;
        }

        return $this->replaceVariables($value);
    }
90756
public static function isFloat(&$var = null): bool
    {
        $parse = filter_var($var, FILTER_VALIDATE_FLOAT);
        if ($parse !== false) {
            $var = $parse;
            return true;
        }
        return false;
    }
894822
private function convertType($value)
    {
        $type = gettype($value);

        if ($this->type === $type || !is_scalar($value)) {
            return $value;
        }

        switch ($this->type) {
            case self::TYPE_BOOL:
                return $this->convertBool($value);
            case self::TYPE_INT:
                return $this->convertInt($value);
            case self::TYPE_FLOAT:
                return $this->convertFloat($value);
            default:
                return $this->convertString($value);
        }
    }
1228280
protected function isValid($value)
    {
        if (is_float($value)) {
            return;
        }
        if (!is_string($value) || strpos($value, '.') === false || preg_match('/^[0-9.e+-]+$/', $value) !== 1) {
            $this->addError('A valid float number is expected.', 1221560288);
        }
    }