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-includes/class-wp-oembed.php

    r47550 r47808  
    488488
    489489                        // Stop here if it's JSON (that's all we need).
    490                         if ( 'json' == $linktypes[ $atts['type'] ] ) {
     490                        if ( 'json' === $linktypes[ $atts['type'] ] ) {
    491491                            break;
    492492                        }
     
    538538        foreach ( array( 'json', 'xml' ) as $format ) {
    539539            $result = $this->_fetch_with_format( $provider, $format );
    540             if ( is_wp_error( $result ) && 'not-implemented' == $result->get_error_code() ) {
     540            if ( is_wp_error( $result ) && 'not-implemented' === $result->get_error_code() ) {
    541541                continue;
    542542            }
Note: See TracChangeset for help on using the changeset viewer.