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

    r47122 r47808  
    298298         * The expected return type from this filter depends on the value passed in the request query_vars:
    299299         * When `$this->query_vars['count']` is set, the filter should return the site count as an int.
    300          * When `'ids' == $this->query_vars['fields']`, the filter should return an array of site ids.
     300         * When `'ids' === $this->query_vars['fields']`, the filter should return an array of site ids.
    301301         * Otherwise the filter should return an array of WP_Site objects.
    302302         *
     
    354354        $site_ids = array_map( 'intval', $site_ids );
    355355
    356         if ( 'ids' == $this->query_vars['fields'] ) {
     356        if ( 'ids' === $this->query_vars['fields'] ) {
    357357            $this->sites = $site_ids;
    358358
Note: See TracChangeset for help on using the changeset viewer.