[TYPO3-core] RFC: #9416: Code Cleanup for lang.php

Benjamin Mack benni at typo3.org
Fri Sep 26 17:12:19 CEST 2008


Hey Stefano,

a couple of things to your patch (which also goes to the other patches 
of you about the Code Cleanup):

* According to the new CGL which was decided upon (draft is still being 
reviewed in the Core Team, sorry about that), the comments should have 
the same indention as the code itself. As far as it goes for the 
comments in the class attributes, I think we should stick to the rule 
and keep the description in the same line after the actual variable. 
Don't know about this, but I do know that I don't like the mix+match 
(some after the variable in the same line, some in the line above). This 
only goes for class attributes, not for the regular comments, where 
everything should be one line above the code.

* While you're at it: With the recent change in initializing $LANG in 
the init.php, we need to modify the comment
  * Initializes the backend language.
  * This is for example done in typo3/template.php with lines like these:
  *
  * require (PATH_typo3.'sysext/lang/lang.php');
  * $LANG = t3lib_div::makeInstance('language');
  * $LANG->init($BE_USER->uc['lang']);
and tell everybody that we're doing a

* One important one: Tabs should only be used in the beginning of lines. 
Something like this
   if (...)	{
always needs to go. You can actually do a nice search & replace on 
")\t{" => ") {", to cover most of this.

* If there are any if statements without {}, please rewrite them to
if () {
   ...
}

Could you take these issues into account? The rest looks good so far. 
Thanks for your very valuable work!

-- 
All the best,
benni.
-SDG-


More information about the TYPO3-team-core mailing list