Merge "Use PHP 7 '<=>' operator in 'sort()' callbacks"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 31 May 2018 18:48:34 +0000 (18:48 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 31 May 2018 18:48:34 +0000 (18:48 +0000)
1  2 
includes/GlobalFunctions.php

@@@ -121,7 -121,7 +121,7 @@@ function wfArrayDiff2_cmp( $a, $b ) 
        if ( is_string( $a ) && is_string( $b ) ) {
                return strcmp( $a, $b );
        } elseif ( count( $a ) !== count( $b ) ) {
-               return count( $a ) < count( $b ) ? -1 : 1;
+               return count( $a ) <=> count( $b );
        } else {
                reset( $a );
                reset( $b );
@@@ -3150,6 -3150,17 +3150,6 @@@ function wfGetMessageCacheStorage() 
        return ObjectCache::getInstance( $wgMessageCacheType );
  }
  
 -/**
 - * Get the cache object used by the parser cache
 - *
 - * @deprecated since 1.30, use MediaWikiServices::getParserCache()->getCacheStorage()
 - * @return BagOStuff
 - */
 -function wfGetParserCacheStorage() {
 -      global $wgParserCacheType;
 -      return ObjectCache::getInstance( $wgParserCacheType );
 -}
 -
  /**
   * Call hook functions defined in $wgHooks
   *