aboutsummaryrefslogtreecommitdiffstats
path: root/maintenance/cleanupTable.inc
diff options
context:
space:
mode:
authorReedy <reedy@wikimedia.org>2013-09-02 16:49:22 +0100
committerReedy <reedy@wikimedia.org>2013-09-11 17:33:57 +0000
commit4277fc9f203d1f65d45b49dfcf914448166b0799 (patch)
tree17561460b7b2978a49fbbc2b9a42359e5b8dcc15 /maintenance/cleanupTable.inc
parenta5502893899a3a71fdfa62f4692dea752bef2eee (diff)
downloadmediawikicore-4277fc9f203d1f65d45b49dfcf914448166b0799.tar.gz
mediawikicore-4277fc9f203d1f65d45b49dfcf914448166b0799.zip
Add method parameter type documentation
Cleanup returns Change-Id: Ic559c86883e5ead549fa5827853c7ca7a42b79ca
Diffstat (limited to 'maintenance/cleanupTable.inc')
-rw-r--r--maintenance/cleanupTable.inc13
1 files changed, 13 insertions, 0 deletions
diff --git a/maintenance/cleanupTable.inc b/maintenance/cleanupTable.inc
index 410a55cb23b8..48bb53ebd155 100644
--- a/maintenance/cleanupTable.inc
+++ b/maintenance/cleanupTable.inc
@@ -41,6 +41,8 @@ class TableCleanup extends Maintenance {
public $batchSize = 100;
public $reportInterval = 100;
+ protected $processed, $updated, $count, $startTime, $table;
+
public function __construct() {
parent::__construct();
$this->addOption( 'dry-run', 'Perform a dry run' );
@@ -66,6 +68,9 @@ class TableCleanup extends Maintenance {
$this->table = $table;
}
+ /**
+ * @param int $updated
+ */
protected function progress( $updated ) {
$this->updated += $updated;
$this->processed++;
@@ -96,6 +101,10 @@ class TableCleanup extends Maintenance {
flush();
}
+ /**
+ * @param array $params
+ * @throws MWException
+ */
public function runTable( $params ) {
$dbr = wfGetDB( DB_SLAVE );
@@ -156,6 +165,10 @@ class TableCleanup extends Maintenance {
$this->output( "Finished $table... $this->updated of $this->processed rows updated\n" );
}
+ /**
+ * @param array $matches
+ * @return string
+ */
protected function hexChar( $matches ) {
return sprintf( "\\x%02x", ord( $matches[1] ) );
}