Skip to content

Commit 82a53b6

Browse files
ilnickibarryvdh
authored andcommitted
Added sorting for RedisStorage (php-debugbar#354)
1 parent e23a98f commit 82a53b6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/DebugBar/Storage/RedisStorage.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ public function find(array $filters = array(), $max = 20, $offset = 0)
5959
}
6060
}
6161
}
62+
63+
usort($results, function ($a, $b) {
64+
return $a['utime'] < $b['utime'];
65+
});
66+
6267
return array_slice($results, $offset, $max);
6368
}
6469

0 commit comments

Comments
 (0)