Make WordPress Core


Ignore:
Timestamp:
07/09/2023 09:46:24 PM (22 months ago)
Author:
audrasjb
Message:

Docs: Replace multiple single line comments with multi-line comments.

This changeset updates various comments as per WordPress PHP Inline Documentation Standards.
See https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/#5-inline-comments.

Follow-up to [56174], [56175], [56176], [56177], [56178], [56179].

Props costdev, audrasjb.
See #58459.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wpdb.php

    r56066 r56180  
    21562156        }
    21572157
    2158         // We need to check for an IPv6 address first.
    2159         // An IPv6 address will always contain at least two colons.
     2158        /*
     2159         * We need to check for an IPv6 address first.
     2160         * An IPv6 address will always contain at least two colons.
     2161         */
    21602162        if ( substr_count( $host, ':' ) > 1 ) {
    21612163            $pattern = '#^(?:\[)?(?P<host>[0-9a-fA-F:]+)(?:\]:(?P<port>[\d]+))?#';
     
    22142216
    22152217        for ( $tries = 1; $tries <= $this->reconnect_retries; $tries++ ) {
    2216             // On the last try, re-enable warnings. We want to see a single instance
    2217             // of the "unable to connect" message on the bail() screen, if it appears.
     2218            /*
     2219             * On the last try, re-enable warnings. We want to see a single instance
     2220             * of the "unable to connect" message on the bail() screen, if it appears.
     2221             */
    22182222            if ( $this->reconnect_retries === $tries && WP_DEBUG ) {
    22192223                error_reporting( $error_reporting );
     
    22312235        }
    22322236
    2233         // If template_redirect has already happened, it's too late for wp_die()/dead_db().
    2234         // Let's just return and hope for the best.
     2237        /*
     2238         * If template_redirect has already happened, it's too late for wp_die()/dead_db().
     2239         * Let's just return and hope for the best.
     2240         */
    22352241        if ( did_action( 'template_redirect' ) ) {
    22362242            return false;
     
    22652271        $this->bail( $message, 'db_connect_fail' );
    22662272
    2267         // Call dead_db() if bail didn't die, because this database is no more.
    2268         // It has ceased to be (at least temporarily).
     2273        /*
     2274         * Call dead_db() if bail didn't die, because this database is no more.
     2275         * It has ceased to be (at least temporarily).
     2276         */
    22692277        dead_db();
    22702278    }
     
    23142322        if ( $this->check_current_query && ! $this->check_ascii( $query ) ) {
    23152323            $stripped_query = $this->strip_invalid_text_from_query( $query );
    2316             // strip_invalid_text_from_query() can perform queries, so we need
    2317             // to flush again, just to make sure everything is clear.
     2324            /*
     2325             * strip_invalid_text_from_query() can perform queries, so we need
     2326             * to flush again, just to make sure everything is clear.
     2327             */
    23182328            $this->flush();
    23192329            if ( $stripped_query !== $query ) {
     
    23432353                    $mysql_errno = mysqli_errno( $this->dbh );
    23442354                } else {
    2345                     // $dbh is defined, but isn't a real connection.
    2346                     // Something has gone horribly wrong, let's try a reconnect.
     2355                    /*
     2356                     * $dbh is defined, but isn't a real connection.
     2357                     * Something has gone horribly wrong, let's try a reconnect.
     2358                     */
    23472359                    $mysql_errno = 2006;
    23482360                }
     
    31233135            return $this->last_result;
    31243136        } elseif ( OBJECT_K === $output ) {
    3125             // Return an array of row objects with keys from column 1.
    3126             // (Duplicates are discarded.)
     3137            /*
     3138             * Return an array of row objects with keys from column 1.
     3139             * (Duplicates are discarded.)
     3140             */
    31273141            if ( $this->last_result ) {
    31283142                foreach ( $this->last_result as $row ) {
     
    35303544            } else {
    35313545                $length = false;
    3532                 // Since we have no length, we'll never truncate. Initialize the variable to false.
    3533                 // True would take us through an unnecessary (for this case) codepath below.
     3546                /*
     3547                 * Since we have no length, we'll never truncate. Initialize the variable to false.
     3548                 * True would take us through an unnecessary (for this case) codepath below.
     3549                 */
    35343550                $truncate_by_byte_length = false;
    35353551            }
Note: See TracChangeset for help on using the changeset viewer.