Hello! Currently I am modifying a ton of php for someone and I have noticed habbit's that really annoy me. I just want to know what the reason behind these habbits may be.
First, i've seen this alot placing a curly brace a line down. Also, whitespace in between parenthesis?
This is how I might define a method in a class.
public function fetch(){
//some code
}
Now this is how this person would.
public function fetch( )
{
//some code
}
Okay, i've seen the line down for curly brace before i'm kind of used to it but it still REALLY annoys me for some reason, I think it's a waste of space. Another thing this individual does is put whitespace between all parentheseis. So here are some examples of this:
require_once( "../includes/config.php" );
//and
$zPage->Render( );
//and
$zPage = new ZPage( "account" );
Why?? That adds up to, if you have a large project that could even create a noticeable space difference. There is one more thing that I noticed that I have never seen before and have absolutely no idea what the purpose of this is. The first line after the opening php tag, has no code written in it, just around 45
tabs over, that's right empty line, no code but 45 presses of the tab key. I wouldn't have noticed it but with Notepad++ it makes a dotted line where tabs are so I noticed it. But really? what could possibly be the purpose of this? Just 45 tabs at the top of every document...?
What do you think of these habbits? Any of you do this stuff, or know why people do?
Interested to hear.