Make WordPress Core


Ignore:
Timestamp:
01/29/2020 12:43:23 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve inline comments per the documentation standards.

Includes minor code layout fixes for better readability.

See #48303.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/testcase-canonical.php

    r46586 r47122  
    264264        $parsed_can_url = parse_url( $can_url );
    265265
    266         // Just test the Path and Query if present
     266        // Just test the path and query if present.
    267267        if ( isset( $expected['url'] ) ) {
    268268            $this->assertEquals( $expected['url'], $parsed_can_url['path'] . ( ! empty( $parsed_can_url['query'] ) ? '?' . $parsed_can_url['query'] : '' ), $ticket_ref );
    269269        }
    270270
    271         // If the test data doesn't include expected query vars, then we're done here
     271        // If the test data doesn't include expected query vars, then we're done here.
    272272        if ( ! isset( $expected['qv'] ) ) {
    273273            return;
    274274        }
    275275
    276         // "make" that the request and check the query is correct
     276        // "make" that the request and check the query is correct.
    277277        $this->go_to( $can_url );
    278278
    279         // Are all query vars accounted for, And correct?
     279        // Are all query vars accounted for, and correct?
    280280        global $wp;
    281281
     
    284284            parse_str( $parsed_can_url['query'], $_qv );
    285285
    286             // $_qv should not contain any elements which are set in $query_vars already (ie. $_GET vars should not be present in the Rewrite)
     286            // $_qv should not contain any elements which are set in $query_vars already
     287            // (i.e. $_GET vars should not be present in the Rewrite).
    287288            $this->assertEquals( array(), array_intersect( $query_vars, $_qv ), 'Query vars are duplicated from the Rewrite into $_GET; ' . $ticket_ref );
    288289
     
    306307        $can_url = redirect_canonical( $test_url, false );
    307308        if ( ! $can_url ) {
    308             return $test_url; // No redirect will take place for this request
     309            return $test_url; // No redirect will take place for this request.
    309310        }
    310311
Note: See TracChangeset for help on using the changeset viewer.