WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/16/2020 06:40:52 PM (11 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use strict comparison where static strings are involved.

This reduces the number of WordPress.PHP.StrictComparisons.LooseComparison issues in half, from 1897 to 890.

Includes minor code layout fixes for better readability.

See #49542.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/maint/repair.php

    r47198 r47808  
    9797
    9898        echo '<p>';
    99         if ( 'OK' == $check->Msg_text ) {
     99        if ( 'OK' === $check->Msg_text ) {
    100100            /* translators: %s: Table name. */
    101101            printf( __( 'The %s table is okay.' ), "<code>$table</code>" );
     
    107107
    108108            echo '<br />&nbsp;&nbsp;&nbsp;&nbsp;';
    109             if ( 'OK' == $check->Msg_text ) {
     109            if ( 'OK' === $check->Msg_text ) {
    110110                /* translators: %s: Table name. */
    111111                printf( __( 'Successfully repaired the %s table.' ), "<code>$table</code>" );
     
    122122
    123123            echo '<br />&nbsp;&nbsp;&nbsp;&nbsp;';
    124             if ( 'Table is already up to date' == $check->Msg_text ) {
     124            if ( 'Table is already up to date' === $check->Msg_text ) {
    125125                /* translators: %s: Table name. */
    126126                printf( __( 'The %s table is already optimized.' ), "<code>$table</code>" );
     
    129129
    130130                echo '<br />&nbsp;&nbsp;&nbsp;&nbsp;';
    131                 if ( 'OK' == $check->Msg_text || 'Table is already up to date' == $check->Msg_text ) {
     131                if ( 'OK' === $check->Msg_text || 'Table is already up to date' === $check->Msg_text ) {
    132132                    /* translators: %s: Table name. */
    133133                    printf( __( 'Successfully optimized the %s table.' ), "<code>$table</code>" );
     
    159159    echo '<h1 class="screen-reader-text">' . __( 'WordPress database repair' ) . '</h1>';
    160160
    161     if ( isset( $_GET['referrer'] ) && 'is_blog_installed' == $_GET['referrer'] ) {
     161    if ( isset( $_GET['referrer'] ) && 'is_blog_installed' === $_GET['referrer'] ) {
    162162        echo '<p>' . __( 'One or more database tables are unavailable. To allow WordPress to attempt to repair these tables, press the &#8220;Repair Database&#8221; button. Repairing can take a while, so please be patient.' ) . '</p>';
    163163    } else {
Note: See TracChangeset for help on using the changeset viewer.