public static function decodeQueryString($source, $rfc = self::RFC_3986)
    {
        $ret = [];
        if ($source !== '') {
            $decode = self::getQueryStringDecoder($rfc);
            $queryPairs = explode('&', $source);
            foreach ($queryPairs as $pair) {
                $parts = explode('=', $pair, 2);
                $key = $decode($parts[0]);
                $value = (count($parts) === 1) ? true : $decode($parts[1]);
                Arr::addValue($ret, $key, $value);
            }
        }

        return $ret;
    }