[TYPO3-core] RFC Feature #16189: Optimize stdWrap usage for TypoScript content element CLEARGIF

Susanne Moog typo3 at susannemoog.de
Wed Nov 3 19:18:56 CET 2010


On 01.11.2010 08:02, JoH asenau wrote:
>> i suggest this layout for better readability:
>>
>> $var .... ==== TRUE
>>    ? the longer truee part
>>    : the longer else part;
>>
>>  From performance this operator isn't faster than if/else, it's only a
>> shortcut and is processed the same.
>>
>> So for longer expressions if/else indeed are better readable.
> 
> And for expressions that keep the value for on of the cases as well.
> 
> So attached is v3 of the patch, that takes care of these.
> If this is OK, I will reformat the other patches as well and try to improve readability and to get rid of superfluous stuff.

I don't like

+		if(!$width)
+			$width = 1;
+

without brackets, so attached one with brackets.

Other than that: +1 by reading and testing,

Susanne


-- 
What's worth the price is always worth the fight
Every second counts 'cause there's no second try

TYPO3 Core Team Member
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tslib_content_CLEARGIF_v4.patch
Type: text/x-patch
Size: 2028 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20101103/896b7241/attachment.bin>


More information about the TYPO3-team-core mailing list