We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 17f7be9 commit 92453a6Copy full SHA for 92453a6
1 file changed
lib/GraphApplication.php
@@ -10,7 +10,11 @@ final class GraphApplication
10
*/
11
public function start(string $jsonGlob): int
12
{
13
- $jsonFiles = glob($jsonGlob);
+ $jsonFiles = glob($jsonGlob, GLOB_NOSORT);
14
+ usort( $jsonFiles, function( string $a, string $b ) {
15
+ return filemtime($a) - filemtime($b);
16
+ });
17
+
18
if (!$jsonFiles) {
19
throw new \RuntimeException('No files found for ' . $jsonGlob);
20
}
0 commit comments