User tests: Successful: Unsuccessful:
Reduce if- else on function countMenuChildren()
Reduce if-else on function render()
tracker:
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=33928
I agree with the first change.
The second one I just don't care much. Imho it's not really better to initialise a variable with a value and overwrite it in the next step. An if-else would be appropriate here. I'm fine with both variants.
Can you add an empty line before the first return and the second if? That would make our code style checks happy.
| Title |
|
||||||
I missed that enter :)
I think that defining a var and then change the value is not a bad strategy, in this case is less lines, if that’s a good metric...
I think that defining a var and then change the value is not a bad strategy, in this case is less lines, if that’s a good metric...
I'd say it is neither worse nor better ![]()
Tested. Works fine!
| Status | New | ⇒ | Closed |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-07-09 18:48:45 |
Travis is failing in 5.3 with msg: