You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The sniff we're using for the alphabetical use order from psr2r-sniffer compares use statements with direct string comparison. This means that the order is expected to be:
useA;
useconstA;
useD;
usefunctionA;
useG;
This doesn't really make much sense. The slevomat standard instead sorts classes, then functions, then constants (you can flip the last two via config).
We should look at switching to this, and clarifying the order in the handbook; if we instead want (e.g.) constants, then functions, then classes, we may need to fork it.
(Side note: there are some neat other sniffs in their standard we could incorporate.)
The text was updated successfully, but these errors were encountered:
This sniff is a very constant pain to me and I'd definitely like to see it improved 👍 I think there's a basis for alphabetically ordering use statements so I'd personally argue for keeping it but trying to get it ported into the package we use.
The sniff we're using for the alphabetical use order from psr2r-sniffer compares
use
statements with direct string comparison. This means that the order is expected to be:This doesn't really make much sense. The slevomat standard instead sorts classes, then functions, then constants (you can flip the last two via config).
We should look at switching to this, and clarifying the order in the handbook; if we instead want (e.g.) constants, then functions, then classes, we may need to fork it.
(Side note: there are some neat other sniffs in their standard we could incorporate.)
The text was updated successfully, but these errors were encountered: