Jump to content

Recommended Posts

I started working at a job a couple months ago and the boss really stresses "proper" spacing. I do it because I have to and its not really that different from how I normally code but it is strange to get used to. I was wondering how everyone else spaces their code.

 

How I normally space my code:

if(condition){
    //code
}

 

How I space my code at work:

if (condition) {
    //code
}

 

 

As I said, its not that different but getting used to those extra spaces is actually harder than I thought it would be.

 

I'd be interested in seeing what other people use.

Link to comment
https://forums.phpfreaks.com/topic/244853-spacing-style/
Share on other sites

I started working at a job a couple months ago and the boss really stresses "proper" spacing.

They were probably saying that because both the PHP manual and the Zend Framework use the same exact style for IF blocks, but are different when it comes to class constructors and methods.

Link to comment
https://forums.phpfreaks.com/topic/244853-spacing-style/#findComment-1257829
Share on other sites

I really shut setup my environment to format the way I'm asked. It would make things a lot easier. I've had it autoformat a file once but it wasn't setup the same way so I stopped using it. I used to use it before every save when I worked with Java in Eclipse/RAD. There were no formatting guidelines to follow there though.

Link to comment
https://forums.phpfreaks.com/topic/244853-spacing-style/#findComment-1258715
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.