Merge "Fix 'Tags' padding to keep it farther from the edge and document the source...
[lhc/web/wiklou.git] / includes / libs / virtualrest / VirtualRESTServiceClient.php
index 3249330..96d7929 100644 (file)
@@ -40,7 +40,6 @@
  *   - stream   : resource to stream the HTTP response body to
  * Request maps can use integer index 0 instead of 'method' and 1 instead of 'url'.
  *
- * @author Aaron Schulz
  * @since 1.23
  */
 class VirtualRESTServiceClient {
@@ -106,10 +105,7 @@ class VirtualRESTServiceClient {
                $cmpFunc = function ( $a, $b ) {
                        $al = substr_count( $a, '/' );
                        $bl = substr_count( $b, '/' );
-                       if ( $al === $bl ) {
-                               return 0; // should not actually happen
-                       }
-                       return ( $al < $bl ) ? 1 : -1; // largest prefix first
+                       return $bl <=> $al; // largest prefix first
                };
 
                $matches = []; // matching prefixes (mount points)