Make WordPress Core


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

    r47122 r47219  
    313313        function hash_equals( $a, $b ) {
    314314                $a_length = strlen( $a );
    315                 if ( $a_length !== strlen( $b ) ) {
     315                if ( strlen( $b ) !== $a_length ) {
    316316                        return false;
    317317                }
     
    323323                }
    324324
    325                 return $result === 0;
     325                return 0 === $result;
    326326        }
    327327endif;
Note: See TracChangeset for help on using the changeset viewer.