Make WordPress Core


Ignore:
Timestamp:
05/16/2020 06:40:52 PM (5 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-includes/class-wp-meta-query.php

    r47550 r47808  
    139139        }
    140140
    141         if ( isset( $meta_query['relation'] ) && strtoupper( $meta_query['relation'] ) == 'OR' ) {
     141        if ( isset( $meta_query['relation'] ) && 'OR' === strtoupper( $meta_query['relation'] ) ) {
    142142            $this->relation = 'OR';
    143143        } else {
     
    296296        }
    297297
    298         if ( 'NUMERIC' == $meta_type ) {
     298        if ( 'NUMERIC' === $meta_type ) {
    299299            $meta_type = 'SIGNED';
    300300        }
Note: See TracChangeset for help on using the changeset viewer.