[TYPO3-core] CGL, to dot or not to dot, this is the question
Alexander Opitz
opitz at pluspol.info
Fri Oct 18 09:13:29 CEST 2013
Hi,
again a CGL issue, this time about string splitting over lines. [1] [2]
The CGL defines this at the end on the first line. In an review [3]
Markus Klein wrote:
"point at the start is best practice CGL for some time now. we use it
everywhere. If this is still in the CGL, +1 for changing it."
As I prefer this myself and it would align with multiline for conditions
[4], but didn't see this yet elsewhere in TYPO3 and in last discussion
[5] it was omitted, TYPO3 FLOW follows TYPO3 CMS [6], my question is now:
If we split a string, should we put the dot on the end of first line or
on start of next line?
Beside of a discussion here I also started a doodle this time:
http://www.doodle.com/cep4gyvvt8grwyum
Drupal doesn't define it.
Zend uses start at next line [7]
Greetings Alex//
[1]
http://wiki.typo3.org/TYPO3_Coding_Guidelines_-_Notes#Multi_line_strings:
[2]
http://docs.typo3.org/typo3cms/CodingGuidelinesReference/PhpFileFormatting/PhpSyntaxFormatting/Index.html#strings
[3]
https://review.typo3.org/#/c/23671/19/typo3/sysext/core/Classes/Resource/ProcessedFileRepository.php
[4]
http://docs.typo3.org/typo3cms/CodingGuidelinesReference/PhpFileFormatting/PhpSyntaxFormatting/Index.html#conditions
[5]
http://typo3.3.n7.nabble.com/RFC-CGL-changes-closing-php-tag-multiline-string-concate-td243791.html
[6]
http://docs.typo3.org/flow/TYPO3FlowDocumentation/stable/TheDefinitiveGuide/PartV/CodingGuideLines/PHP.html#strings
[7]
http://framework.zend.com/manual/1.12/en/coding-standard.coding-style.html
--
Alexander Opitz
PLUSPOL interactive GbR
Floßplatz 4
04107 Leipzig
Telefon: (0341) 350 585 -19
Telefax: (0341) 350 585 -40
E-Mail: opitz at pluspol.info
Internet: http://www.pluspol.info
Geschäftsführer:
Dipl. Medienwirt (FH) Jörg Brückner
Dipl.- Ing. (FH) Stefan Dittmar
Dipl.- Ing. (FH) Thomas Lange
USt-ID-Nr.: DE221591186
Sitz der Gesellschaft und Gerichtsstand ist Leipzig
More information about the TYPO3-team-core
mailing list