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/includes/class-core-upgrader.php

    r47230 r47808  
    105105        if ( $parsed_args['do_rollback'] && $current->packages->rollback ) {
    106106            $to_download = 'rollback';
    107         } elseif ( $current->packages->partial && 'reinstall' != $current->response && $wp_version == $current->partial_version && $partial ) {
     107        } elseif ( $current->packages->partial && 'reinstall' !== $current->response && $wp_version == $current->partial_version && $partial ) {
    108108            $to_download = 'partial';
    109109        } elseif ( $current->packages->new_bundled && version_compare( $wp_version, $current->new_bundled, '<' )
     
    403403        foreach ( $checksums as $file => $checksum ) {
    404404            // Skip files which get updated.
    405             if ( 'wp-content' == substr( $file, 0, 10 ) ) {
     405            if ( 'wp-content' === substr( $file, 0, 10 ) ) {
    406406                continue;
    407407            }
Note: See TracChangeset for help on using the changeset viewer.