[wp-trac] Re: [WordPress Trac] #8091: "Parent" Comment Class

WordPress Trac wp-trac at lists.automattic.com
Thu Nov 20 13:08:50 GMT 2008


#8091: "Parent" Comment Class
--------------------------------------+-------------------------------------
 Reporter:  ThemeShaper               |        Owner:     
     Type:  enhancement               |       Status:  new
 Priority:  normal                    |    Milestone:  2.7
Component:  Comments                  |      Version:  2.7
 Severity:  normal                    |   Resolution:     
 Keywords:  has-patch Walker_Comment  |  
--------------------------------------+-------------------------------------
Comment (by DD32):

 {{{
 $args[0]['has_children'] = ( empty(
 $children_elements[$element->$id_field] ) ) ? false : true;
 }}}

 Eugh.. Can i just say i'm sick of if statements(let alone condensed if
 statements) with boolean return values.. I can understand for something
 complex, But seriously:

 {{{
 $args[0]['has_children'] = ! empty(
 $children_elements[$element->$id_field] );
 }}}

 reads much cleaner to me.

 Sorry for the mini rant.. Its just a small anoyance of mine :) (aside from
 extra brackets around boolean questions)

-- 
Ticket URL: <http://trac.wordpress.org/ticket/8091#comment:6>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list