Found in a legacy project, this line of PHP was intended to mirror DOM indentation in a Drupal theme function. I appreciate that the developer (who, I'm not picking on. I've certainly done worse) was trying to maintain a sense of layout, however, there's roughly a hundred lines of code above this mixing tons of other business logic, meta data aggregation, database queries, and so on.
Therefore, you're not going to get any sense of the DOM from looking at this function. Instead, you'll get a really funky looking append in the midst of all this chaos.
A function with these attritubes and a line like this just screams separation of concerns. Needless to say, it was quickly refactored so I could just read the thing.
Wednesday, April 6, 2016