[buddypress-trac] [BuddyPress Trac] #6271: Separate activity WHERE conditions into new method

buddypress-trac noreply at wordpress.org
Sun Mar 1 20:37:26 UTC 2015

#6271: Separate activity WHERE conditions into new method
 Reporter:  johnjamesjacoby        |       Owner:
     Type:  enhancement            |      Status:  new
 Priority:  low                    |   Milestone:  2.3
Component:  Component - Activity   |     Version:  1.6
 Severity:  minor                  |  Resolution:
 Keywords:  2nd-opinion has-patch  |

Comment (by boonebgorges):

 Agreed that `get()` is an overly large method, but I'm not sure I see the
 benefit of separating out the logic in just this way. In the case of
 Notifications, it's abstracted in one chunk because it's used in more than
 one place in the class. Could that potentially be the case as well for
 `get_where_sql()` (I haven't looked). In terms of sheer organization, it
 seems like we'd get more benefit from abstracting each specific WHERE
 clause into its own method, though much of this is done already
 (`get_date_query_sql()`, `get_filter_sql()`, etc).

 I'm not necessarily against the proposed change, but I would like to be
 sure we're not refactoring with no benefit, especially if there's an
 alternative way to refactor that would be more beneficial in terms of
 testability and reusability.

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6271#comment:2>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac

More information about the buddypress-trac mailing list