[TYPO3-50-general]  CGL: Intending Tabs - Your opinion
    Malte Jansen 
    mail at maltejansen.de
       
    Thu Feb  5 18:36:13 CET 2009
    
    
  
Hi @all!
This is no discussion about spaces or tabs. We use tabs ;)
There two ways for intending functions or properties in a class.
1. In most cases you intend everything 1 tab.
class SomClass extends MyExtendedClass {
	protected $var;
	public function myMethod() {}
}
2. If you have more than one interface, you have to break the line for 
readability. Than you have to intend it more than one tab and the 
important code within a function might be outside of your monitor.
class SomClass extends MyExtendedClass
	implements
		MyVeryLongInterface1,
		MyVeryLongInterface2,
		MyVeryLongInterface3 {
		
			protected $var;
			public function myMethod() {}
}
IMO we should *always* intend properties and functions just *one tab*.
So variant 2 would look like this:
class SomClass extends MyExtendedClass
	implements
		MyVeryLongInterface1,
		MyVeryLongInterface2,
		MyVeryLongInterface3 {
		
	protected $var;
	public function myMethod() {}
}
What is your opinion or suggestion?
Cheers,
Malte
    
    
More information about the TYPO3-project-5_0-general
mailing list