Classes/Service/RedirectService.php
protected function addQueryParams(array $queryParams, Uri $url): Uri
    {
        // New query parameters overrule the ones that should be kept
        $newQueryParamString = $url->getQuery();
        if (!empty($newQueryParamString)) {
            $newQueryParams = [];
            parse_str($newQueryParamString, $newQueryParams);
            $queryParams = array_replace_recursive($queryParams, $newQueryParams);
        }
        $query = http_build_query($queryParams, '', '&', PHP_QUERY_RFC3986);
        if ($query) {
            $url = $url->withQuery($query);
        }
        return $url;
    }
protected function addQueryParams(array $queryParams, Uri $url): Uri
    {
        // New query parameters overrule the ones that should be kept
        $newQueryParamString = $url->getQuery();
        if (!empty($newQueryParamString)) {
            $newQueryParams = [];
            parse_str($newQueryParamString, $newQueryParams);
            $queryParams = array_replace_recursive($queryParams, $newQueryParams);
        }
        $query = http_build_query($queryParams, '', '&', PHP_QUERY_RFC3986);
        if ($query) {
            $url = $url->withQuery($query);
        }
        return $url;
    }
protected function addQueryParams ( array $ queryParams , Uri $ url ) : Uri { // New query parameters overrule the ones that should be kept $ newQueryParamString = $ url -> getQuery ( ) ; if ( ! empty ( $ newQueryParamString ) ) { $ newQueryParams = [ ] ; parse_str ( $ newQueryParamString , $ newQueryParams ) ; $ queryParams = array_replace_recursive ( $ queryParams , $ newQueryParams ) ; } $ query = http_build_query ( $ queryParams , '' , '&' , PHP_QUERY_RFC3986 ) ; if ( $ query ) { $ url = $ url -> withQuery ( $ query ) ; } return $ url ; }
Adds query parameters to a Uri object

@param array $queryParams
@param Uri $url
@return Uri
Adds query parameters to a Uri object