UrlToQueryItem.php
private function setMatchedQuery( $matches = [ ], $query = '' ) {
        if ( ! is_null( $this->matched_rule ) ) {
            $mathed = \WP_MatchesMapRegex::apply( preg_replace( "!^.+\?!", '', $query ), $matches );
            $this->matched_query = addslashes( $mathed );
            parse_str( $this->matched_query, $this->perma_q_vars );
            if ( '404' === $this->error ) $this->error = NULL;
        }
    }
private function setMatchedQuery( $matches = [ ], $query = '' ) {
        if ( ! is_null( $this->matched_rule ) ) {
            $mathed = \WP_MatchesMapRegex::apply( preg_replace( "!^.+\?!", '', $query ), $matches );
            $this->matched_query = addslashes( $mathed );
            parse_str( $this->matched_query, $this->perma_q_vars );
            if ( '404' === $this->error ) $this->error = NULL;
        }
    }
private function setMatchedQuery ( $ matches = [ ] , $ query = '' ) { if ( ! is_null ( $ this -> matched_rule ) ) { $ mathed = \ WP_MatchesMapRegex :: apply ( preg_replace ( "!^.+\?!" , '' , $ query ) , $ matches ) ; $ this -> matched_query = addslashes ( $ mathed ) ; parse_str ( $ this -> matched_query , $ this -> perma_q_vars ) ; if ( '404' === $ this -> error ) $ this -> error = NULL ; } }
When a rute matches, save matched query string and matched query array.

@param array $matches    Matches coming from regex compare matched rule to url
@param string $query     Query part of the matched rule
When a rute matches save matched query string and matched query array .