Fix condition if...else in getDB() & PHPDoc comment for getUserDB()
authorDerick Alangi <alangiderick@gmail.com>
Mon, 4 Feb 2019 12:45:39 +0000 (13:45 +0100)
committerD3r1ck01 <alangiderick@gmail.com>
Wed, 6 Feb 2019 09:50:59 +0000 (09:50 +0000)
commit027fb1c8cd366bba1fe8c3dbdd2a1331d70b7761
tree4654b3feb570c5d641613500896666374ff28a35
parent95aabc36ad0019f82c3ff8ce6359cd9a4fc0d45c
Fix condition if...else in getDB() &  PHPDoc comment for getUserDB()

So the conditional check should by default return $this->mDb if it's not
null, so, the else seems not to be needed(?). If we have a database handle
to process the current batch, $this->getDB() will return IMaintainableDatabase
but if it's not available (null), a call to $this->getDB() will return an
instance of \Wikimedia\Rdbms\Database is returned instead.

In accordance with the documentation (phpdoc), update the method getUserDB()
to be compliant with callers return type.

Change-Id: I95f3407dd2ffe8e4a1ad7a70be86b6cf3b65ff50
maintenance/Maintenance.php
maintenance/includes/DeleteLocalPasswords.php