New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixing examples #4894
fixing examples #4894
Conversation
PSR-2 style for examples
Hello @dhensby do you want to merge this in quickly? Cheers, |
That's not actually psr-2 though :) Or did you just mean tab to space conversion? |
I'm not sure why this is going into 3.1 branch; Is there a context that I'm missing? |
Hmm. How does out docs viewer like the space changes? |
I think it works with 4xspaces the same as it does tabs. |
Happy New Year SilverStripers! I hope everyone is relaxed and refreshed, especially after the stunning holiday weather we have had here in NZ. @tractorcow, @dhensby...quick question: Is the aim to eventually have all SS code strictly following PSR-2 ? Is there a summary or discussion of which parts of PSR-2 you want SS to strictly adhere to ? |
Yes, but it'll be a gradual adoption rather than immediate. I expect some non-psr-2 names will stick around for the time being. Framework is currently not psr-2 at all, but we'll do a reformat before releasing 4.0. Nothing in 3.x will change; It's too much of a maintenance hassle, so any reformatting should be done in master only. |
OK...Master only :) Is it just me, or do other people cringe at the sight of camel case as well ? Same with putting "{" on new lines. I much prefer K&R style bracing. Oh well, these are minor and there are benefits to conforming... |
I think the benefit of adopting psr-2 is having to avoid all those conversations. :) Someone somewhere has already argued about all these boring things, and psr-2 is the result. |
I know, I know...I just had to get my two cent's worth in! :P From this point forward I'll be a religious zealot, and follow the most important commandment: Thou shalt not put any other coding styles before PSR-1,2,.... |
The only annoying part is that we'd recently re-named some methods to FOLLOW the silverstripe convention. If we'd left them, they'd be closer to psr-2 than they are now. :) |
That reminds me of Dan's recent comment about fixing a bug and then coming across implementations that require the bug! Double handling is painful not only in coding but also in moving furniture, a currently felt pain since I moved house over the holidays and am still unpacking boxes and shifting furniture around. |
Yeah, @dhensby, stop putting bugs in other people's changes. :P |
DOCS moving to spaces for some examples
PSR-2 style for examples