From f0276758788d21af609b65c21d6351fec38809ab Mon Sep 17 00:00:00 2001 From: Kevin Stich Date: Mon, 13 Aug 2018 15:12:29 -0700 Subject: [PATCH] Update sorting for Service APIs to be sorted by namespace, like the sidebar. (#1597) --- build/docs/classes/DocsBuilder.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build/docs/classes/DocsBuilder.php b/build/docs/classes/DocsBuilder.php index c621b75c82..a6b66dd69d 100644 --- a/build/docs/classes/DocsBuilder.php +++ b/build/docs/classes/DocsBuilder.php @@ -119,7 +119,11 @@ public function build() } } - ksort($services, SORT_NATURAL | SORT_FLAG_CASE); + uasort($services, function($a, $b) { + $serviceA = current($a); + $serviceB = current($b); + return strcasecmp($serviceA->namespace, $serviceB->namespace); + }); $this->updateHomepage($services); $this->updateClients($services); $this->updateAliases($services, $aliases);