Merge "ApiSandbox: Visual separation of fields"
[lhc/web/wiklou.git] / maintenance / benchmarks / bench_wfIsWindows.php
index b5cb025..ac0caf6 100644 (file)
@@ -34,14 +34,14 @@ require_once __DIR__ . '/Benchmarker.php';
 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();
        }
 
@@ -57,9 +57,10 @@ class BenchWfIsWindows extends Benchmarker {
        // bench function 2
        function wfIsWindowsCached() {
                static $isWindows = null;
-               if( $isWindows == null ) {
+               if ( $isWindows == null ) {
                        $isWindows = self::is_win();
                }
+
                return $isWindows;
        }
 }