X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=maintenance%2Fbenchmarks%2FbenchmarkPurge.php;h=e006cf53e64830fd618c66b252cc01765369642a;hb=ed9a5fcb243218ea24908dddb9c28cb334788d10;hp=9eca73c68274ac2bb6c1d168caa0c3613c1f165b;hpb=2a197150f6da26486a6f5bd28d0328786bc23c22;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/benchmarks/benchmarkPurge.php b/maintenance/benchmarks/benchmarkPurge.php index 9eca73c682..e006cf53e6 100644 --- a/maintenance/benchmarks/benchmarkPurge.php +++ b/maintenance/benchmarks/benchmarkPurge.php @@ -31,7 +31,7 @@ require_once __DIR__ . '/Benchmarker.php'; class BenchmarkPurge extends Benchmarker { public function __construct() { parent::__construct(); - $this->mDescription = "Benchmark the Squid purge functions."; + $this->addDescription( 'Benchmark the Squid purge functions.' ); } public function execute() { @@ -41,9 +41,9 @@ class BenchmarkPurge extends Benchmarker { } else { $this->output( "There are " . count( $wgSquidServers ) . " defined squid servers:\n" ); if ( $this->hasOption( 'count' ) ) { - $lengths = array( intval( $this->getOption( 'count' ) ) ); + $lengths = [ intval( $this->getOption( 'count' ) ) ]; } else { - $lengths = array( 1, 10, 100 ); + $lengths = [ 1, 10, 100 ]; } foreach ( $lengths as $length ) { $urls = $this->randomUrlList( $length ); @@ -79,7 +79,7 @@ class BenchmarkPurge extends Benchmarker { * @return array */ private function randomUrlList( $length ) { - $list = array(); + $list = []; for ( $i = 0; $i < $length; $i++ ) { $list[] = $this->randomUrl(); }