src/enums/DatatypeEnum.php
public static function getValidTypeFromSample($value) {
        $value = trim((string) $value);

        if (empty($value)) {
            return false;
        }

        foreach (self::$validators as $type => $validator) {
            if ($validator === null) {
                continue;
            }

            if (method_exists(__CLASS__, $validator) && self::$validator($value)) {
                return $type;
            }
        }

        return self::__DEFAULT;
    }
public static function getValidTypeFromSample($value) {
        $value = trim((string) $value);

        if (empty($value)) {
            return false;
        }

        foreach (self::$validators as $type => $validator) {
            if ($validator === null) {
                continue;
            }

            if (method_exists(__CLASS__, $validator) && self::$validator($value)) {
                return $type;
            }
        }

        return self::__DEFAULT;
    }
public static function getValidTypeFromSample ( $ value ) { $ value = trim ( ( string ) $ value ) ; if ( empty ( $ value ) ) { return false ; } foreach ( self :: $ validators as $ type => $ validator ) { if ( $ validator === null ) { continue ; } if ( method_exists ( __CLASS__ , $ validator ) && self :: $ validator ( $ value ) ) { return $ type ; } } return self :: __DEFAULT ; }
Checks data type for given string.

@param string $value

@return bool|string
Checks data type for given string .