29445[CLEANUP] Use method chaining for TSFE methods
Commit message
Review
-
Code review CR 0
-
Verified V 0
Issues 1
Files 2
Review log 10
-
mostwanted uploaded patch set 2 04/13/14, 17:41
-
Mr. Jenkins commented on patch set 1 04/13/14, 17:56
Build Successful https://ci.typo3.org/job/typo3-v4-core-gerrit/15996/ : SUCCESS -
Mr. Jenkins commented on patch set 2 04/13/14, 17:56
Build Successful https://ci.typo3.org/job/typo3-v4-core-gerrit/15997/ : SUCCESS -
Markus Klein commented on patch set 2 04/13/14, 18:28
What is the benefit of method chaining here? -
mostwanted commented on patch set 2 04/13/14, 18:57
@markus: Please have a look at my comment.index_ts.php:212This seems to be a typical usecase for method chaining, isn't it? -
mostwanted commented on patch set 2 04/13/14, 19:07
@Markus: Sorry, I forgot to answer your question. I think this leads to more readable code. -
mostwanted commented on patch set 2 04/13/14, 19:23
Does this make debugging (e.g. with Xdebug) more difficult? -
Alexander Opitz commented on patch set 2 04/14/14, 06:41
Chaining slows down the execution a bit, so I wouldn't like this here. -
Dmitry Dulepov commented on patch set 2 CR -1 04/14/14, 09:10
I do not see any advantages of this. Disadvantages are: - Some methods return now $this, so they expect to be called in chain. Methods should not have knowledge about external use. - Stepping in the debugger becomes a nightmare What is the idea behind this change? What good do we achieve if this is integrated? Sorry, I do not see why this should get in. -
mostwanted abandoned the change 04/14/14, 20:09
thanks all for your reviews. I understand the problem with debugging which seems to be quite important in index_ts.php. therefore i abandon my commit. my intention was to make the usage of those methods more readble (in some situations - e.g. in index_ts.php) by providing the possibility to use method chaining. i thought this is in general seen as good practice.