X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=maintenance%2Fbenchmarks%2FbenchmarkCSSMin.php;h=8e2acb2987d1b0f7466eb6888ec0df4d9289e594;hb=dd59b8d4fcd1d03f4d73b08f3f1e5f9a9da6f74e;hp=3eaa88dcf996ded6f6012748105526f8d3fb864a;hpb=870c78b9947e516aca1c38c3bca59421fc770336;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/benchmarks/benchmarkCSSMin.php b/maintenance/benchmarks/benchmarkCSSMin.php index 3eaa88dcf9..8e2acb2987 100644 --- a/maintenance/benchmarks/benchmarkCSSMin.php +++ b/maintenance/benchmarks/benchmarkCSSMin.php @@ -52,25 +52,16 @@ class BenchmarkCSSMin extends Benchmarker { $this->bench( [ "minify ($filename)" => [ - 'function' => [ 'CSSMin', 'minify' ], + 'function' => [ CSSMin::class, 'minify' ], 'args' => [ $css ] ], "remap ($filename)" => [ - 'function' => [ 'CSSMin', 'remap' ], + 'function' => [ CSSMin::class, 'remap' ], 'args' => [ $css, dirname( $file ), 'https://example.org/test/', true ] ], ] ); } - - private function loadFile( $file ) { - $css = file_get_contents( $file ); - // Detect GZIP compression header - if ( substr( $css, 0, 2 ) === "\037\213" ) { - $css = gzdecode( $css ); - } - return $css; - } } -$maintClass = 'BenchmarkCSSMin'; +$maintClass = BenchmarkCSSMin::class; require_once RUN_MAINTENANCE_IF_MAIN;