[TYPO3-core] Change CGL for string concatenation
Jigal van Hemert
jigal.van.hemert at typo3.org
Sun Dec 7 00:34:24 CET 2014
Hi,
On 05/12/2014 20:41, Steffen Müller wrote:
> Am 05.12.2014 um 00:03 schrieb Frank Nägler:
>> In the core we have a mix of both implementations. The dot at the beginning is clearer and can immediately recognized as a concatenation.
>
> It's so obvious:
>
>
> $foo = array(
> $bar,
> $baz .
> $buz
> );
No, this one would be:
$foo = array(
$bar,
$baz . $buz
);
But even if we had looooong strings it would be:
$foo = array(
$bar,
'The really long text in a string that is longer than the usual ' .
'margin set in editors and IDEs.'
);
(which looks different from your first example)
>
> vs.
>
> $foo = array(
> $bar,
> $baz
> . $buz
> );
Still, it's too trivial to discuss. Both are easy to read, and there are
issues that really need time and effort.
If you really need to change this, the position of all operators in
expressions that span multiple lines have to be changed. In most IDEs
you can only set the behaviour for all operators and not per operator.
--
Jigal van Hemert
TYPO3 CMS Active Contributor
TYPO3 .... inspiring people to share!
Get involved: typo3.org
More information about the TYPO3-team-core
mailing list