nanch / phpfmt_stable

This is a stable snapshot (version 6125cf9) of the phpfmt plugin for Sublime Text
143 stars 34 forks source link

Trait use alignment #43

Closed mikerockett closed 3 years ago

mikerockett commented 6 years ago

I'm not sure on what PSR standards dictate on this, but I often find myself in a position where there are two or more traits being used in a class, and the indentation is stripped to the use level, whether or not I multi-line my traits.

For example:

  use
    SomeTrait,
    AndAnother;

Becomes:

  use
  SomeTrait,
  AndAnother;

Likewise:

  use SomeTrait, AndAnother,
    AndYetAnother, LastOnePromise;

Becomes:

  use SomeTrait, AndAnother,
  AndYetAnother, LastOnePromise;

Which, well, just looks weird. Like I say, not sure on the PSR standards here, but it would seem "weird" if this were by force...

Is there any way this can be changed? I can imagine that detection of this kind of thing wouldn't be the easiest of tasks - but, then again, I'm not familiar with how this package [concept] works, and so it could be easy to achieve.

(As as side-note, it would be great if we could override how group use statements are flattened, even when using the PSR standard which makes no provision for them... I've found these to be much more readable in many cases.)