*
* @file
* @ingroup Profiler
- * @author Aaron Schulz
*/
+use Wikimedia\ScopedCallback;
/**
* Custom PHP profiler for parser/DB type section names that xhprof/xdebug can't handle
/**
* @param string $section
- * @return ScopedCallback
+ * @return SectionProfileCallback
*/
public function scopedProfileIn( $section ) {
$this->profileInInternal( $section );
}
/**
- * @param ScopedCallback $section
+ * @param ScopedCallback &$section
*/
public function scopedProfileOut( ScopedCallback &$section ) {
$section = null;
/* Find all items under this entry */
$level = $stack[$max][1];
$working = [];
- for ( $i = $max -1; $i >= 0; $i-- ) {
+ for ( $i = $max - 1; $i >= 0; $i-- ) {
if ( $stack[$i][1] > $level ) {
$working[] = $stack[$i];
} else {
protected function calltreeCount( $stack, $start ) {
$level = $stack[$start][1];
$count = 0;
- for ( $i = $start -1; $i >= 0 && $stack[$i][1] > $level; $i-- ) {
+ for ( $i = $start - 1; $i >= 0 && $stack[$i][1] > $level; $i-- ) {
$count ++;
}
return $count;