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-tax-query.php

    r47550 r47808  
    401401        $operator = strtoupper( $clause['operator'] );
    402402
    403         if ( 'IN' == $operator ) {
     403        if ( 'IN' === $operator ) {
    404404
    405405            if ( empty( $terms ) ) {
     
    431431            $where = "$alias.term_taxonomy_id $operator ($terms)";
    432432
    433         } elseif ( 'NOT IN' == $operator ) {
     433        } elseif ( 'NOT IN' === $operator ) {
    434434
    435435            if ( empty( $terms ) ) {
     
    445445            )";
    446446
    447         } elseif ( 'AND' == $operator ) {
     447        } elseif ( 'AND' === $operator ) {
    448448
    449449            if ( empty( $terms ) ) {
     
    642642        }
    643643
    644         if ( 'AND' == $query['operator'] && count( $term_list ) < count( $query['terms'] ) ) {
     644        if ( 'AND' === $query['operator'] && count( $term_list ) < count( $query['terms'] ) ) {
    645645            $query = new WP_Error( 'inexistent_terms', __( 'Inexistent terms.' ) );
    646646            return;
Note: See TracChangeset for help on using the changeset viewer.