X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FreassignEdits.php;h=7a0e4fc06929db0388cef6755dea995621836623;hb=64b5cf2dae1e9ba4810de0aae2916233be3b922e;hp=e68937acbe9c6800167fcf0937a94c449942f702;hpb=b24a0048185fe7c4d86f8b55872ad749c6ab52e6;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/reassignEdits.php b/maintenance/reassignEdits.php index e68937acbe..7a0e4fc069 100644 --- a/maintenance/reassignEdits.php +++ b/maintenance/reassignEdits.php @@ -34,7 +34,7 @@ require_once __DIR__ . '/Maintenance.php'; class ReassignEdits extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Reassign edits from one user to another"; + $this->addDescription( 'Reassign edits from one user to another' ); $this->addOption( "force", "Reassign even if the target user doesn't exist" ); $this->addOption( "norc", "Don't update the recent changes table" ); $this->addOption( "report", "Print out details of what would be changed, but don't update it" ); @@ -155,8 +155,8 @@ class ReassignEdits extends Maintenance { */ private function userConditions( &$user, $idfield, $utfield ) { return $user->getId() - ? array( $idfield => $user->getId() ) - : array( $utfield => $user->getName() ); + ? [ $idfield => $user->getId() ] + : [ $utfield => $user->getName() ]; } /** @@ -169,7 +169,7 @@ class ReassignEdits extends Maintenance { * @return array */ private function userSpecification( &$user, $idfield, $utfield ) { - return array( $idfield => $user->getId(), $utfield => $user->getName() ); + return [ $idfield => $user->getId(), $utfield => $user->getName() ]; } /**