Ticket #3294: trac-3294-phpcs-fix-class-instantiation.patch
File trac-3294-phpcs-fix-class-instantiation.patch, 3.2 KB (added by , 5 years ago) |
---|
-
src/bbpress.php
113 113 114 114 // Only run these methods if they haven't been ran previously 115 115 if ( null === $instance ) { 116 $instance = new bbPress ;116 $instance = new bbPress(); 117 117 $instance->setup_environment(); 118 118 $instance->includes(); 119 119 $instance->setup_variables(); … … 812 812 $class_name = "BBP_User_Engagements_{$strategy}"; 813 813 814 814 // Setup the engagements interface 815 $this->engagements = new $class_name ;815 $this->engagements = new $class_name(); 816 816 } 817 817 818 818 /** -
src/includes/admin/tools/converter.php
91 91 92 92 // Try to instantiate the converter object 93 93 if ( class_exists( $platform ) ) { 94 $converter = new $platform ;94 $converter = new $platform(); 95 95 } 96 96 } 97 97 -
src/includes/extend/buddypress/loader.php
146 146 public function setup_components() { 147 147 148 148 // Always load the members component 149 bbpress()->extend->buddypress->members = new BBP_BuddyPress_Members ;149 bbpress()->extend->buddypress->members = new BBP_BuddyPress_Members(); 150 150 151 151 // Create new activity class 152 152 if ( bp_is_active( 'activity' ) ) { 153 bbpress()->extend->buddypress->activity = new BBP_BuddyPress_Activity ;153 bbpress()->extend->buddypress->activity = new BBP_BuddyPress_Activity(); 154 154 } 155 155 156 156 // Register the group extension only if groups are active -
src/includes/replies/template.php
235 235 236 236 // Figure out total pages 237 237 if ( true === $r['hierarchical'] ) { 238 $walker = new BBP_Walker_Reply ;238 $walker = new BBP_Walker_Reply(); 239 239 $total_pages = ceil( $walker->get_number_of_root_elements( $bbp->reply_query->posts ) / $bbp->reply_query->posts_per_page ); 240 240 } else { 241 241 … … 2373 2373 2374 2374 // We are threading replies 2375 2375 if ( bbp_thread_replies() ) { 2376 $walker = new BBP_Walker_Reply ;2376 $walker = new BBP_Walker_Reply(); 2377 2377 $threads = absint( $walker->get_number_of_root_elements( $bbp->reply_query->posts ) - 1 ); 2378 2378 $retstr = sprintf( _n( 'Viewing %1$s reply thread', 'Viewing %1$s reply threads', $threads, 'bbpress' ), bbp_number_format( $threads ) ); 2379 2379 -
src/includes/replies/functions.php
2387 2387 2388 2388 // Parse arguments 2389 2389 $r = bbp_parse_args( $args, array( 2390 'walker' => new BBP_Walker_Reply ,2390 'walker' => new BBP_Walker_Reply(), 2391 2391 'max_depth' => bbp_thread_replies_depth(), 2392 2392 'style' => 'ul', 2393 2393 'callback' => null,