Merge "Minor cleanup of languages/ConverterRule.php"
[lhc/web/wiklou.git] / includes / libs / virtualrest / VirtualRESTServiceClient.php
index e3b9376..96d7929 100644 (file)
@@ -105,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)