Explorar o código

Use spaceship operator (#59)

Andy Postnikov %!s(int64=4) %!d(string=hai) anos
pai
achega
a4e37c66ae
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      index.php

+ 1 - 1
index.php

@@ -263,7 +263,7 @@ class Service
         $files = [];
         if (!empty($status['scripts']) && $this->getOption('allow_filelist')) {
             uasort($status['scripts'], function ($a, $b) {
-                return $a['hits'] < $b['hits'];
+                return $a['hits'] <=> $b['hits'];
             });
             foreach ($status['scripts'] as &$file) {
                 $file['full_path'] = str_replace('\\', '/', $file['full_path']);