Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 19
UpdateFlaggedRevsStats
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 2
6
0.00% covered (danger)
0.00%
0 / 11
 __construct
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 4
 execute
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 7
<?php
/**
 * @ingroup Maintenance
 */
if ( getenv( 'MW_INSTALL_PATH' ) ) {
    $IP = getenv( 'MW_INSTALL_PATH' );
} else {
    $IP = __DIR__ . '/../../..';
}
require_once "$IP/maintenance/Maintenance.php";
class UpdateFlaggedRevsStats extends Maintenance {
    public function __construct() {
        parent::__construct();
        $this->addDescription( "Update FlaggedRevs statistics table" );
        $this->requireExtension( 'FlaggedRevs' );
    }
    /**
     * @inheritDoc
     */
    public function execute() {
        $this->output( sprintf( '%-30s ', 'ValidationStatistics' ) );
        $time1 = microtime( true );
        FlaggedRevsStats::updateCache();
        $time2 = microtime( true );
        $elapsed = ( $time2 - $time1 );
        $this->output( sprintf( "completed in %.2fs\n", $elapsed ) );
    }
}
$maintClass = UpdateFlaggedRevsStats::class;
require_once RUN_MAINTENANCE_IF_MAIN;