X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Fbenchmarks%2Fbench_if_switch.php;h=5f661f2db5d4e0b9b24cb80b83122952ba78ee8b;hb=8bc630cead937718d6e6bcb6e32c5c539d6ad305;hp=46c9d39bc7238f2d454126f102544cb44ba7bfcf;hpb=8eac2feedb7ee093d2c48504e1eb2b8a9dbc8452;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;