Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
7 / 7
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
PurgeOldLogIPData
100.00% covered (success)
100.00%
7 / 7
100.00% covered (success)
100.00%
2 / 2
2
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
1 / 1
1
 execute
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3namespace MediaWiki\Extension\AbuseFilter\Maintenance;
4
5// @codeCoverageIgnoreStart
6$IP = getenv( 'MW_INSTALL_PATH' );
7if ( $IP === false ) {
8    $IP = __DIR__ . '/../../..';
9}
10require_once "$IP/maintenance/Maintenance.php";
11// @codeCoverageIgnoreEnd
12
13use MediaWiki\Maintenance\Maintenance;
14
15/**
16 * @deprecated since 1.45. Use PurgeOldLogData.php instead.
17 */
18class PurgeOldLogIPData extends Maintenance {
19    public function __construct() {
20        parent::__construct();
21        $this->addDescription( 'Deprecated alias for the PurgeOldLogData.php maintenance script.' );
22        $this->setBatchSize( 200 );
23
24        $this->requireExtension( 'Abuse Filter' );
25    }
26
27    /** @inheritDoc */
28    public function execute() {
29        $maintenanceScript = $this->createChild( PurgeOldLogData::class );
30        $maintenanceScript->setBatchSize( $this->getBatchSize() );
31        $maintenanceScript->execute();
32    }
33
34}
35
36// @codeCoverageIgnoreStart
37$maintClass = PurgeOldLogIPData::class;
38require_once RUN_MAINTENANCE_IF_MAIN;
39// @codeCoverageIgnoreEnd