Browse Source

Use spaceship operator (#59)

Andy Postnikov 4 years ago
parent
commit
a4e37c66ae
1 changed files with 1 additions and 1 deletions
  1. 1 1
      index.php

+ 1 - 1
index.php

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