Make WordPress Core


Ignore:
Timestamp:
02/09/2020 04:52:28 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use Yoda conditions where appropriate.

See #49222.

File:
1 edited

Legend:

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

    r47122 r47219  
    5656        $connect_host = $arrURL['host'];
    5757
    58         $secure_transport = ( $arrURL['scheme'] == 'ssl' || $arrURL['scheme'] == 'https' );
     58        $secure_transport = ( 'ssl' === $arrURL['scheme'] || 'https' === $arrURL['scheme'] );
    5959        if ( ! isset( $arrURL['port'] ) ) {
    60             if ( $arrURL['scheme'] == 'ssl' || $arrURL['scheme'] == 'https' ) {
     60            if ( 'ssl' === $arrURL['scheme'] || 'https' === $arrURL['scheme'] ) {
    6161                $arrURL['port']   = 443;
    6262                $secure_transport = true;
     
    391391            foreach ( $match_against as $match ) {
    392392                list( $match_type, $match_host ) = explode( ':', $match );
    393                 if ( $host_type == strtolower( trim( $match_type ) ) ) { // IP: or DNS:
     393                if ( strtolower( trim( $match_type ) ) === $host_type ) { // IP: or DNS:
    394394                    $certificate_hostnames[] = strtolower( trim( $match_host ) );
    395395                }
Note: See TracChangeset for help on using the changeset viewer.