*
* @file
* @ingroup Benchmark
- * @author Timo Tijhof
*/
require_once __DIR__ . '/Benchmarker.php';
$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;