Make WordPress Core


Ignore:
Timestamp:
05/16/2020 06:40:52 PM (6 years 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-wp-filesystem-ftpsockets.php

    r47219 r47808  
    384384                        return false;
    385385                }
    386                 if ( 'f' == $type || $this->is_file( $file ) ) {
     386                if ( 'f' === $type || $this->is_file( $file ) ) {
    387387                        return $this->ftp->delete( $file );
    388388                }
     
    616616                foreach ( $list as $struc ) {
    617617
    618                         if ( '.' == $struc['name'] || '..' == $struc['name'] ) {
     618                        if ( '.' === $struc['name'] || '..' === $struc['name'] ) {
    619619                                continue;
    620620                        }
    621621
    622                         if ( ! $include_hidden && '.' == $struc['name'][0] ) {
     622                        if ( ! $include_hidden && '.' === $struc['name'][0] ) {
    623623                                continue;
    624624                        }
     
    628628                        }
    629629
    630                         if ( 'd' == $struc['type'] ) {
     630                        if ( 'd' === $struc['type'] ) {
    631631                                if ( $recursive ) {
    632632                                        $struc['files'] = $this->dirlist( $path . '/' . $struc['name'], $include_hidden, $recursive );
Note: See TracChangeset for help on using the changeset viewer.