Skip to:
Content

bbPress.org

Changeset 7047


Ignore:
Timestamp:
12/15/2019 10:44:10 AM (5 years ago)
Author:
netweb
Message:

PHPCS: Use Parenthesis when instantiating a new object.

Props jrf.
See #3294.
For branches/2.6.

Location:
branches/2.6/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/2.6/src/bbpress.php

    r7027 r7047  
    114114        // Only run these methods if they haven't been ran previously
    115115        if ( null === $instance ) {
    116             $instance = new bbPress;
     116            $instance = new bbPress();
    117117            $instance->setup_environment();
    118118            $instance->includes();
     
    823823
    824824        // Setup the engagements interface
    825         $this->engagements = new $class_name;
     825        $this->engagements = new $class_name();
    826826    }
    827827
  • branches/2.6/src/includes/admin/tools/converter.php

    r6788 r7047  
    9292        // Try to instantiate the converter object
    9393        if ( class_exists( $platform ) ) {
    94             $converter = new $platform;
     94            $converter = new $platform();
    9595        }
    9696    }
  • branches/2.6/src/includes/extend/buddypress/loader.php

    r6807 r7047  
    147147
    148148        // Always load the members component
    149         bbpress()->extend->buddypress->members = new BBP_BuddyPress_Members;
     149        bbpress()->extend->buddypress->members = new BBP_BuddyPress_Members();
    150150
    151151        // Create new activity class
    152152        if ( bp_is_active( 'activity' ) ) {
    153             bbpress()->extend->buddypress->activity = new BBP_BuddyPress_Activity;
     153            bbpress()->extend->buddypress->activity = new BBP_BuddyPress_Activity();
    154154        }
    155155
  • branches/2.6/src/includes/replies/functions.php

    r7036 r7047  
    23872387    // Parse arguments
    23882388    $r = bbp_parse_args( $args, array(
    2389         'walker'       => new BBP_Walker_Reply,
     2389        'walker'       => new BBP_Walker_Reply(),
    23902390        'max_depth'    => bbp_thread_replies_depth(),
    23912391        'style'        => 'ul',
  • branches/2.6/src/includes/replies/template.php

    r6966 r7047  
    236236        // Figure out total pages
    237237        if ( true === $r['hierarchical'] ) {
    238             $walker      = new BBP_Walker_Reply;
     238            $walker      = new BBP_Walker_Reply();
    239239            $total_pages = ceil( $walker->get_number_of_root_elements( $bbp->reply_query->posts ) / $bbp->reply_query->posts_per_page );
    240240        } else {
     
    23742374        // We are threading replies
    23752375        if ( bbp_thread_replies() ) {
    2376             $walker  = new BBP_Walker_Reply;
     2376            $walker  = new BBP_Walker_Reply();
    23772377            $threads = absint( $walker->get_number_of_root_elements( $bbp->reply_query->posts ) - 1 );
    23782378            $retstr  = sprintf( _n( 'Viewing %1$s reply thread', 'Viewing %1$s reply threads', $threads, 'bbpress' ), bbp_number_format( $threads ) );
Note: See TracChangeset for help on using the changeset viewer.