I suspect we have many places in code with associative arrays where the best sorting order is alphabetic order. It would be useful to enforce that with a simple annotation so that if the order is not maintained, the tests would fail.
For example:
// Sniffer: Sorted array protected static $validators = [ 'BraceBalance' => BraceBalanceValidator::class, 'EscapeCharacter' => EscapeCharacterValidator::class,::class, 'UnicodePlural' => UnicodePluralValidator::class, 'WikiLink' => WikiLinkValidator::class, 'WikiParameter' => WikiParameterValidator::class ];
Would something like this be possible?