Also add a type hint that makes my IDE stop complaining about method
calls on an variable of unknown type.
Change-Id: I43e6a7de3313d84e81b94865eaa81ad47edd6d6f
$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 );
}
}
- $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 );
}