Skip to content
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

Mixed tabs and spaces #10

Closed
laurentvd opened this issue Feb 25, 2013 · 13 comments
Closed

Mixed tabs and spaces #10

laurentvd opened this issue Feb 25, 2013 · 13 comments

Comments

@laurentvd
Copy link

When I create a new migration using

php artisan generate:migration create_bookings_table

A class is nicely generated, but it mixes tabs and spaces. I use tabs as a default and therefore I noticed it.

Selection_001

Of course it's really minor, but it still bugs me because Laravel is such a consistently clean-coded framework.

@JeffreyWay
Copy link
Owner

Ahh you're right. I'll push a fix that only uses tabs soon.

@ghost
Copy link

ghost commented Feb 26, 2013

Jeffrey, Would you consider using 4 spaces instead per PSR standards? https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md

@laurentvd
Copy link
Author

j20, although you're right about the PSR standards, I'm really voting for tabs as this leaves the user to set their indentation width. There's been a lot of debate on this in the PSR group as well. Anyway, Jeffrey get's to do wathever the hell he wants ;-)

@JeffreyWay
Copy link
Owner

I think I may stick with a tab, and then, in your editor, you can always have this map to four spaces.

@JeffreyWay
Copy link
Owner

b79e9da

@ghost
Copy link

ghost commented Feb 26, 2013

Cool. Either is fine with me. Hopefully the debate in the community will get settled some day. I see benefits to both sides. Just as long as it's not two spaces ;)

@dustingraham
Copy link

@laurentvd "Leaves the user to set their indentation" while that's true, it doesn't mean the code will remain aligned in all cases. There's a good analysis of this http://paul-m-jones.com/archives/2312 one place this breaks down is if you change the tab width from 4 to 8, things that should be vertically aligned, are no longer. Clearly Laravel's decided to use tabs, but I wanted to point this out.

@laurentvd
Copy link
Author

@dustingraham Yeah, agreed. I understand why spaces are the better option. But since Laravel is using tabs (and personally, I prefer tabs) it would make more sense for this package to use tabs. Anyway, it's always 'fun' to troll on the spaces vs. tabs topic ;-)

@yadakhov
Copy link
Contributor

I really wished Laravel Version 4 had switched to spaces. They pretty much switched to PSR recommendations except decide to keep tabs.

No wonder this is the holy war.

@mettjus
Copy link

mettjus commented May 30, 2013

Sorry but I'd rather not... ;)

@18601673727
Copy link

+1 for spaces.

@GrahamCampbell
Copy link
Contributor

@18601673727 Not again...

@mikebronner
Copy link

If you like spaces, or any variation of tabs, why not set up and modify the templates directly? (Others shouldn't be expected to adhere to my programming quirks, right?)

php artisan generate:publish-templates (Just in case someone wants to do this.) :)

I have found it tremendously helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants