Lack of interest Deprecate and remove UppercaseForeachAsFixer

This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.

Kirby

Well-known member
Licensed customer
Probably doesn't bother anyone except me, but anyway:

XenForo PHP code usually uses all keywords (if, break, switch, etc.) in lowercase - except for AS which is uppercase.
The official code standard even includes a fixer to keep this uppercase (PER-CS2.0, the base for XenForo code standard, requires them to be lowercase inherited from PSR-12).

It feels awkward (to me) to have this single keyword uppercase while all others are lowercase so I suggest to just standardize this to lowercase as well.
 
Upvote 0
This suggestion has been closed. Votes are no longer accepted.
I think this is a fragment of the vBulletin days, which is where this exact stylistic choice originated - all keywords lowercase except for AS.

To be honest, it doesn’t bother me at all - I see dotted line I Opt-Enter and hit “Php-Cs-Fixer: Fix the entire file” 🤷‍♂️

I’ve spent a lot of time refining phpStorm’s inspectors to match what can be reasonably achieved in XF and customising its code style so I don’t have to manually fix too much when it autocompletes a function stub etc.

It also wouldn’t bother me if it got changed 🤷‍♂️
 
Back
Top Bottom