X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Fbenchmarks%2FbenchmarkHooks.php;h=c59ce0d983986956e7b484bc929d11f8d6292d4f;hb=7ade0a7c678ffa4233728683a91c2aeab0c8d344;hp=144687191d9053eeb65cb30bac9151ec1d0d2ade;hpb=f873b499650ef5d27570f9cb96d01d1477f9e089;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/benchmarks/benchmarkHooks.php b/maintenance/benchmarks/benchmarkHooks.php index 144687191d..c59ce0d983 100644 --- a/maintenance/benchmarks/benchmarkHooks.php +++ b/maintenance/benchmarks/benchmarkHooks.php @@ -31,28 +31,28 @@ require_once __DIR__ . '/Benchmarker.php'; class BenchmarkHooks extends Benchmarker { public function __construct() { parent::__construct(); - $this->mDescription = 'Benchmark MediaWiki Hooks.'; + $this->addDescription( 'Benchmark MediaWiki Hooks.' ); } public function execute() { global $wgHooks; - $wgHooks['Test'] = array(); + $wgHooks['Test'] = []; $time = $this->benchHooks(); $this->output( 'Empty hook: ' . $time . "\n" ); - $wgHooks['Test'][] = array( $this, 'test' ); + $wgHooks['Test'][] = [ $this, 'test' ]; $time = $this->benchHooks(); $this->output( 'Loaded (one) hook: ' . $time . "\n" ); for ( $i = 0; $i < 9; $i++ ) { - $wgHooks['Test'][] = array( $this, 'test' ); + $wgHooks['Test'][] = [ $this, 'test' ]; } $time = $this->benchHooks(); $this->output( 'Loaded (ten) hook: ' . $time . "\n" ); for ( $i = 0; $i < 90; $i++ ) { - $wgHooks['Test'][] = array( $this, 'test' ); + $wgHooks['Test'][] = [ $this, 'test' ]; } $time = $this->benchHooks(); $this->output( 'Loaded (one hundred) hook: ' . $time . "\n" );