瀏覽代碼

Use spaceship operator (#59)

Andy Postnikov 4 年之前
父節點
當前提交
a4e37c66ae
共有 1 個文件被更改,包括 1 次插入1 次删除
  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']);