Merge "Improve grammar of message on Special:GoToInterwiki"
[lhc/web/wiklou.git] / maintenance / benchmarks / bench_HTTP_HTTPS.php
index 40a877f..0e3cd73 100644 (file)
@@ -38,24 +38,23 @@ class BenchHttpHttps extends Benchmarker {
        }
 
        public function execute() {
-               $this->bench( array(
-                       array( 'function' => array( $this, 'getHTTP' ) ),
-                       array( 'function' => array( $this, 'getHTTPS' ) ),
-               ) );
-               print $this->getFormattedResults();
+               $this->bench( [
+                       [ 'function' => [ $this, 'getHTTP' ] ],
+                       [ 'function' => [ $this, 'getHTTPS' ] ],
+               ] );
        }
 
-       static function doRequest( $proto ) {
-               Http::get( "$proto://localhost/", array(), __METHOD__ );
+       private function doRequest( $proto ) {
+               Http::get( "$proto://localhost/", [], __METHOD__ );
        }
 
        // bench function 1
-       function getHTTP() {
+       protected function getHTTP() {
                $this->doRequest( 'http' );
        }
 
        // bench function 2
-       function getHTTPS() {
+       protected function getHTTPS() {
                $this->doRequest( 'https' );
        }
 }