diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c46298fd6..0862f64ded 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -83,6 +83,8 @@ The file documents changes to the PHP_CodeSniffer project. - Thanks to @Daimona for the patch - Runtime performance improvement for PHPCS CLI users. The improvement should be most noticeable for users on Windows. - Thanks to Juliette Reinders Folmer (@jrfnl) for the patch +- The -e (explain) command will now list sniffs in natural order + - Thanks to Juliette Reinders Folmer (@jrfnl) for the patch ### Removed - Removed support for installing via PEAR diff --git a/src/Ruleset.php b/src/Ruleset.php index 82facade1e..bd0527dcb5 100644 --- a/src/Ruleset.php +++ b/src/Ruleset.php @@ -238,7 +238,7 @@ public function __construct(Config $config) public function explain() { $sniffs = array_keys($this->sniffCodes); - sort($sniffs); + sort($sniffs, (SORT_NATURAL | SORT_FLAG_CASE)); $sniffCount = count($sniffs);