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-wp-filesystem-ftpext.php

    r47219 r47808  
    7070
    7171        $this->options['ssl'] = false;
    72         if ( isset( $opt['connection_type'] ) && 'ftps' == $opt['connection_type'] ) {
     72        if ( isset( $opt['connection_type'] ) && 'ftps' === $opt['connection_type'] ) {
    7373            $this->options['ssl'] = true;
    7474        }
     
    374374            return false;
    375375        }
    376         if ( 'f' == $type || $this->is_file( $file ) ) {
     376        if ( 'f' === $type || $this->is_file( $file ) ) {
    377377            return ftp_delete( $this->link, $file );
    378378        }
     
    696696            }
    697697
    698             if ( '.' == $entry['name'] || '..' == $entry['name'] ) {
     698            if ( '.' === $entry['name'] || '..' === $entry['name'] ) {
    699699                continue;
    700700            }
    701701
    702             if ( ! $include_hidden && '.' == $entry['name'][0] ) {
     702            if ( ! $include_hidden && '.' === $entry['name'][0] ) {
    703703                continue;
    704704            }
     
    713713        $ret = array();
    714714        foreach ( (array) $dirlist as $struc ) {
    715             if ( 'd' == $struc['type'] ) {
     715            if ( 'd' === $struc['type'] ) {
    716716                if ( $recursive ) {
    717717                    $struc['files'] = $this->dirlist( $path . '/' . $struc['name'], $include_hidden, $recursive );
Note: See TracChangeset for help on using the changeset viewer.