[TYPO3-dev] [TYPO3-core] New TYPO3 Coding Guidelines

Benjamin Mack benni at typo3.org
Sat Jul 11 15:58:43 CEST 2009


Hey,

On 10.07.2009 13:37 Uhr, Mathias Schreiber [wmdb >] wrote:
> $hello = 'This is ' . $name . ' Name' sucks to read from my point of view.
Hmm, that is interesting. I like that style... but I just wondered why. 
then I got back to coding and found this piece of code in an extension 
of mine:

$file = PATH_site . $this->uploadPath . $uploadedFile;

Well, this is way more readable than

$file = PATH_site.$this->uploadPath.$uploadedFile;

in my eyes. And, to be consistent to use white-spaces everywhere, it's 
just natural to not have

$file = PATH_site.'uploads/tx_benni/'.$uploadedFile;

but to do

$file = PATH_site . 'uploads/tx_benni/' . $uploadedFile;

So, I now understand the reason for this in the guidelines (mainly 
consistency) and thus, I'm 100% fine with this CGL.

But again, guys, it's just a guideline, not a rule. (well, maybe for the 
core code it's a rule ;-)).

Plus: I hope not to see

$hello = 'This is ' . $name . ' Name';

but everything with a $GLOBALS['LANG']->getLL in your code, right ;-).

All the best,
Benni.

BTW: Francois, thanks for the clearing words, exactly my opinion.




More information about the TYPO3-dev mailing list