Repository navigation
Formatter: Aligning colons in named parameters #2104
Replies: 1 comment
|
Not at the moment. The order of the colon and padding are hardcoded. If someone wanted to implement it, they'd need to make that ordering conditional on formatter state set here - presumably by a new configuration setting. But I feel a knob for tweaking things that specifically may not be desirable. Funny enough, it could be argued that both are a violation of PER-CS 3.0 §4.7:
The only way alignment would really be compatible with this rule would be to right-align the identifier like this: foo(
param1: $value,
parameter_2: $value,
);But on top of being annoying to implement, I that may still violate the spirit of just above that:
Think this one comes down to maintainer judgement for the time being... And maybe someone proposing an amendment to PER-CS to be more lenient. |
Uh oh!
There was an error while loading. Please reload this page.
At present, if you turn on align-named-parameters in the formatter, you end up with:
Is there any way to instead get:
All reactions