X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Fbenchmarks%2Fbench_if_switch.php;h=5f661f2db5d4e0b9b24cb80b83122952ba78ee8b;hb=b6a1f3bc774d043c69e9ed2875210049cdda9d68;hp=46c9d39bc7238f2d454126f102544cb44ba7bfcf;hpb=d42754e47722436ef52218f21a8e544a05ee9ad7;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/benchmarks/bench_if_switch.php b/maintenance/benchmarks/bench_if_switch.php index 46c9d39bc7..5f661f2db5 100644 --- a/maintenance/benchmarks/bench_if_switch.php +++ b/maintenance/benchmarks/bench_if_switch.php @@ -42,11 +42,10 @@ class BenchIfSwitch extends Benchmarker { [ 'function' => [ $this, 'doElseIf' ] ], [ 'function' => [ $this, 'doSwitch' ] ], ] ); - print $this->getFormattedResults(); } // 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': @@ -107,5 +106,5 @@ class BenchIfSwitch extends Benchmarker { } } -$maintClass = 'BenchIfSwitch'; +$maintClass = BenchIfSwitch::class; require_once RUN_MAINTENANCE_IF_MAIN;