Skip to content

Commit

Permalink
Merge pull request #97 from nextcloud/fix/controller-order
Browse files Browse the repository at this point in the history
  • Loading branch information
provokateurin authored Feb 21, 2024
2 parents 7e39e24 + b25bd41 commit e15283d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions generate-spec
Original file line number Diff line number Diff line change
Expand Up @@ -240,12 +240,17 @@ $controllers = [];
$controllersDir = $sourceDir . "/Controller";
if (file_exists($controllersDir)) {
$dir = new DirectoryIterator($controllersDir);
$controllerFiles = [];
foreach ($dir as $file) {
$filePath = $file->getPathname();
if (!str_ends_with($filePath, "Controller.php")) {
continue;
}
$controllerFiles[] = $filePath;
}
sort($controllerFiles);

foreach ($controllerFiles as $filePath) {
$controllers[basename($filePath, "Controller.php")] = $astParser->parse(file_get_contents($filePath));
}
}
Expand Down

0 comments on commit e15283d

Please sign in to comment.