X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Fbenchmarks%2Fbench_if_switch.php;h=843ef7cd5984caad6a8c52d0340f41e654e641db;hb=f7e1770fb832aa77bf4e16ce8cc815f2b24dd10d;hp=8f7f61d8cf7f53a05944d4b4678ad6437e58c8a0;hpb=ca2c2c0f4fdd633779ce1d48d09645275b0e5827;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/benchmarks/bench_if_switch.php b/maintenance/benchmarks/bench_if_switch.php index 8f7f61d8cf..843ef7cd59 100644 --- a/maintenance/benchmarks/bench_if_switch.php +++ b/maintenance/benchmarks/bench_if_switch.php @@ -38,15 +38,14 @@ class BenchIfSwitch extends Benchmarker { } public function execute() { - $this->bench( array( - array( 'function' => array( $this, 'doElseIf' ) ), - array( 'function' => array( $this, 'doSwitch' ) ), - ) ); - print $this->getFormattedResults(); + $this->bench( [ + [ 'function' => [ $this, 'doElseIf' ] ], + [ 'function' => [ $this, 'doSwitch' ] ], + ] ); } // bench function 1 - function doElseIf() { + protected function doElseIf() { $a = 'z'; if ( $a == 'a' ) { } elseif ( $a == 'b' ) { @@ -69,7 +68,7 @@ class BenchIfSwitch extends Benchmarker { } // bench function 2 - function doSwitch() { + protected function doSwitch() { $a = 'z'; switch ( $a ) { case 'b':