X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fprofiler%2FSectionProfiler.php;h=c27ab4f3f450509d3d0a433498748859285067b5;hb=6341ee8fa626b75372a70ff0203399a29d219e5f;hp=57bd01f8deb716ba3f1467396bcc3428edec883d;hpb=6c9a2923fe1ee3a65cb027be5e781772f2b12fbd;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/profiler/SectionProfiler.php b/includes/profiler/SectionProfiler.php index 57bd01f8de..c27ab4f3f4 100644 --- a/includes/profiler/SectionProfiler.php +++ b/includes/profiler/SectionProfiler.php @@ -440,7 +440,7 @@ class SectionProfiler { $level = $stack[$start][1]; $count = 0; for ( $i = $start - 1; $i >= 0 && $stack[$i][1] > $level; $i-- ) { - $count ++; + $count++; } return $count; } @@ -496,29 +496,3 @@ class SectionProfiler { } } } - -/** - * Subclass ScopedCallback to avoid call_user_func_array(), which is slow - * - * This class should not be used outside of SectionProfiler - */ -class SectionProfileCallback extends ScopedCallback { - /** @var SectionProfiler */ - protected $profiler; - /** @var string */ - protected $section; - - /** - * @param SectionProfiler $profiler - * @param string $section - */ - public function __construct( SectionProfiler $profiler, $section ) { - parent::__construct( null ); - $this->profiler = $profiler; - $this->section = $section; - } - - function __destruct() { - $this->profiler->profileOutInternal( $this->section ); - } -}