[TYPO3-dev] Coding guidelines questions: commas in array, tabs

Dmitry Dulepov [typo3] dmitry at typo3.org
Mon May 19 20:07:29 CEST 2008


Hi!

Oliver Klee wrote:
> 1a. Should this also apply to single-element arrays?
>   $foo = array(
>     'bar',
>   );
> 
> (My vote is to *keep* the comma in this case. -> *no* exception to the 
> general rule)

Same vote :)

>   $foo = array(11, 42);
>     vs.
>   $foo = array(11, 42,);
> 
> (My vote is to *drop* the comma in this case. -> *exception* to the 
> general rule)

I agree. First case looks better.

> Does this also apply to tabs after @param, @return, @author?
> 
>   @param<tab>integer<tab><tab>number of elements to display, must be > 0
> 
> (My vote is to use *spaces* in this, not tabs. -> *no* exception to the 
> general rule)

Extdeveval will reformat it to tabs anyway. So I always use tabs.

-- 
Dmitry Dulepov
TYPO3 core team
Web: http://typo3bloke.net/
"Nothing is impossible. There are only limits to our knowledge"




More information about the TYPO3-dev mailing list