Skip to content

Commit

Permalink
Ruleset::explain(): use natural sorting
Browse files Browse the repository at this point in the history
... for the list of included sniffs.

The `SORT_NATURAL` and the `SORT_FLAG_CASE` flag are available since PHP 5.4, so can be used without issue.
  • Loading branch information
jrfnl committed Nov 11, 2023
1 parent b0d171b commit d1f49be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Ruleset.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));

ob_start();

Expand Down

0 comments on commit d1f49be

Please sign in to comment.