From 9b4d240ab00788845d1dac078774d13d81e408d9 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Mon, 4 Nov 2024 23:11:34 +0100 Subject: [PATCH] Generators: always present docs in alphabetical order As things were, the order in which sniff documentation was presented was dependent on the file system the sniffs were found on. Fixed now by making the order logical and consistent. --- src/Generators/Generator.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Generators/Generator.php b/src/Generators/Generator.php index af0e0f5c40..ab81baed76 100644 --- a/src/Generators/Generator.php +++ b/src/Generators/Generator.php @@ -60,6 +60,9 @@ public function __construct(Ruleset $ruleset) } } + // Always present the docs in a consistent alphabetical order. + sort($this->docFiles, (SORT_NATURAL | SORT_FLAG_CASE)); + }//end __construct()