[wp-trac] [WordPress Trac] #43627: Method call uses 2 parameters, but method signature uses 1 parameters

WordPress Trac noreply at wordpress.org
Sat Mar 24 09:59:28 UTC 2018


#43627: Method call uses 2 parameters, but method signature uses 1 parameters
--------------------------+-----------------------------
 Reporter:  kaggdesign    |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  4.9.4
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 wp-includes/class.wp-dependencies.php, line 106

 Method do_item() called with 2 parameters:


 {{{
                                 if ( $this->do_item( $handle, $group ) ) {
                                         $this->done[] = $handle;
                                 }
 }}}

 Method signature has 1 parameter (same file, line 125)


 {{{
         public function do_item( $handle ) {
                 return isset( $this->registered[ $handle ] );
         }
 }}}

 Even taking into consideration further inheritance, second parameter
 $group should be added to method signature, to avoid code
 misunderstanding, and Code Smell warning in PhpStorm.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/43627>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list