X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=maintenance%2Fbenchmarks%2Fbench_wfIsWindows.php;h=ac0caf60962e42c2dd7b0c6e0e51e3891c48a993;hb=4b73a8b6fbb6da651af850a7d667e6e8d59e6fce;hp=76cea2cdad780f43f726a9052ef8378b90ddf05e;hpb=adbadb9ee62284d70d9e7763379ab3b4eb6bde6f;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/benchmarks/bench_wfIsWindows.php b/maintenance/benchmarks/bench_wfIsWindows.php index 76cea2cdad..ac0caf6096 100644 --- a/maintenance/benchmarks/bench_wfIsWindows.php +++ b/maintenance/benchmarks/bench_wfIsWindows.php @@ -31,18 +31,17 @@ require_once __DIR__ . '/Benchmarker.php'; * * @ingroup Benchmark */ -class bench_wfIsWindows extends Benchmarker { - +class BenchWfIsWindows extends Benchmarker { public function __construct() { parent::__construct(); - $this->mDescription = "Benchmark for wfIsWindows."; + $this->addDescription( 'Benchmark for wfIsWindows.' ); } public function execute() { - $this->bench( array( - array( 'function' => array( $this, 'wfIsWindows' ) ), - array( 'function' => array( $this, 'wfIsWindowsCached' ) ), - )); + $this->bench( [ + [ 'function' => [ $this, 'wfIsWindows' ] ], + [ 'function' => [ $this, 'wfIsWindowsCached' ] ], + ] ); print $this->getFormattedResults(); } @@ -58,12 +57,13 @@ class bench_wfIsWindows extends Benchmarker { // bench function 2 function wfIsWindowsCached() { static $isWindows = null; - if( $isWindows == null ) { + if ( $isWindows == null ) { $isWindows = self::is_win(); } + return $isWindows; } } -$maintClass = 'bench_wfIsWindows'; +$maintClass = 'BenchWfIsWindows'; require_once RUN_MAINTENANCE_IF_MAIN;