Make WordPress Core


Ignore:
Timestamp:
02/09/2020 04:52:28 PM (6 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/bookmark.php

    r47122 r47219  
    5353        $_bookmark = sanitize_bookmark( $_bookmark, $filter );
    5454
    55         if ( $output == OBJECT ) {
     55        if ( OBJECT == $output ) {
    5656                return $_bookmark;
    57         } elseif ( $output == ARRAY_A ) {
     57        } elseif ( ARRAY_A == $output ) {
    5858                return get_object_vars( $_bookmark );
    59         } elseif ( $output == ARRAY_N ) {
     59        } elseif ( ARRAY_N == $output ) {
    6060                return array_values( get_object_vars( $_bookmark ) );
    6161        } else {
     
    306306        $query .= " $exclusions $inclusions $search";
    307307        $query .= " ORDER BY $orderby $order";
    308         if ( $parsed_args['limit'] != -1 ) {
     308        if ( -1 != $parsed_args['limit'] ) {
    309309                $query .= ' LIMIT ' . $parsed_args['limit'];
    310310        }
Note: See TracChangeset for help on using the changeset viewer.