Skip to content

Alphabetical use sniff doesn't differentiate between functions/constants/etc #143

Description

@rmccue

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:

use A;
use const A;
use D;
use function A;
use G;

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.)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions