protected function forceType($value, $type) {
        $type = strtolower($type);

        if ($type === 'null') {
            return null;
        } elseif (in_array($type, ['int', 'integer', 'tinyint', 'smallint',
            'mediumint', 'bigint', 'unsigned big int', 'int2', 'int8', 'boolean'])) {
            return force_int($value);
        } elseif (in_array($type, ['real', 'double', 'double precision', 'float',
            'numeric', 'decimal(10,5)'])) {
            return floatval($value);
        } else {
            return (string)$value;
        }
    }
protected function forceType($value, $type) {
        $type = strtolower($type);

        if ($type === 'null') {
            return null;
        } elseif (in_array($type, ['int', 'integer', 'tinyint', 'smallint',
            'mediumint', 'bigint', 'unsigned big int', 'int2', 'int8', 'boolean'])) {
            return force_int($value);
        } elseif (in_array($type, ['real', 'double', 'double precision', 'float',
            'numeric', 'decimal(10,5)'])) {
            return floatval($value);
        } else {
            return (string)$value;
        }
    }
protected function forceType ( $ value , $ type ) { $ type = strtolower ( $ type ) ; if ( $ type === 'null' ) { return null ; } elseif ( in_array ( $ type , [ 'int' , 'integer' , 'tinyint' , 'smallint' , 'mediumint' , 'bigint' , 'unsigned big int' , 'int2' , 'int8' , 'boolean' ] ) ) { return force_int ( $ value ) ; } elseif ( in_array ( $ type , [ 'real' , 'double' , 'double precision' , 'float' , 'numeric' , 'decimal(10,5)' ] ) ) { return floatval ( $ value ) ; } else { return ( string ) $ value ; } }
Force a value into the appropriate php type based on its Sqlite type.

@param mixed $value The value to force.
@param string $type The sqlite type name.
@return mixed Returns $value cast to the appropriate type.
Force a value into the appropriate php type based on its Sqlite type .