public static function buildQueryString(array $data = null, $urlEncode = true)
    {
        if ($data === null) {
            $data = static::$get;
        }

        $query = [];

        foreach ($data as $name => $value) {
            $query[] = "{$name}=" . ($urlEncode ? urlencode($value) : $value);
        }

        if (count($query)) {
            return '?' . implode('&', $query);
        }
    }