profileinfo: Remove unused constructor call parameter
authorThiemo Kreuz <thiemo.kreuz@wikimedia.de>
Wed, 27 Mar 2019 09:34:34 +0000 (10:34 +0100)
committerThiemo Kreuz <thiemo.kreuz@wikimedia.de>
Wed, 27 Mar 2019 09:34:34 +0000 (10:34 +0100)
Also add a type hint that makes my IDE stop complaining about method
calls on an variable of unknown type.

Change-Id: I43e6a7de3313d84e81b94865eaa81ad47edd6d6f

profileinfo.php

index d000972..dccdd38 100644 (file)
@@ -412,6 +412,7 @@ $filter = $_REQUEST['filter'] ?? '';
        $queries = [];
        $sqltotal = 0.0;
 
+       /** @var profile_point|false $last */
        $last = false;
        foreach ( $res as $o ) {
                $next = new profile_point( $o->pf_name, $o->pf_count, $o->pf_time, $o->pf_memory );
@@ -435,7 +436,7 @@ $filter = $_REQUEST['filter'] ?? '';
                }
        }
 
-       $s = new profile_point( 'SQL Queries', 0, $sqltotal, 0, 0 );
+       $s = new profile_point( 'SQL Queries', 0, $sqltotal, 0 );
        foreach ( $queries as $q ) {
                $s->add_child( $q );
        }