Merge "Revert "Parser functions now format numbers according to page language""
[lhc/web/wiklou.git] / maintenance / benchmarks / Benchmarker.php
index f3e2db0..5fab082 100644 (file)
@@ -48,7 +48,7 @@ abstract class Benchmarker extends Maintenance {
                foreach ( $benchs as $bench ) {
                        // handle empty args
                        if ( !array_key_exists( 'args', $bench ) ) {
-                               $bench['args'] = array();
+                               $bench['args'] = [];
                        }
 
                        $bench_number++;
@@ -64,13 +64,13 @@ abstract class Benchmarker extends Maintenance {
                                $bench['function'] = $ret;
                        }
 
-                       $this->results[$bench_number] = array(
+                       $this->results[$bench_number] = [
                                'function' => $bench['function'],
                                'arguments' => $bench['args'],
                                'count' => $count,
                                'delta' => $delta,
                                'average' => $delta / $count,
-                       );
+                       ];
                }
        }
 
@@ -87,7 +87,7 @@ abstract class Benchmarker extends Maintenance {
                        $ret .= sprintf( "%s times: function %s(%s) :\n",
                                $res['count'],
                                $res['function'],
-                               join( ', ', $res['arguments'] )
+                               implode( ', ', $res['arguments'] )
                        );
                        $ret .= sprintf( "   %6.2fms (%6.2fms each)\n",
                                $res['delta'] * 1000,