$mCreateAccount,
$mParentBlockId;
- /// @var User|String
+ /** @var User|String */
protected $target;
- // @var Integer Hack for foreign blocking (CentralAuth)
+ /** @var Integer Hack for foreign blocking (CentralAuth) */
protected $forcedTargetID;
- /// @var Block::TYPE_ constant. Can only be USER, IP or RANGE internally
+ /** @var Integer Block::TYPE_ constant. Can only be USER, IP or RANGE internally */
protected $type;
- /// @var User
+ /** @var User */
protected $blocker;
- /// @var Bool
+ /** @var Bool */
protected $isHardblock = true;
- /// @var Bool
+ /** @var Bool */
protected $isAutoblocking = true;
# TYPE constants
/**
* Get the component of an IP address which is certain to be the same between an IP
* address and a rangeblock containing that IP address.
- * @param $hex String Hexadecimal IP representation
+ * @param $hex String Hexadecimal IP representation
* @return String
*/
protected static function getIpFragment( $hex ) {
/**
* Create a new Block object from a database row
- * @param $row ResultWrapper row from the ipblocks table
+ * @param $row ResultWrapper row from the ipblocks table
* @return Block
*/
public static function newFromRow( $row ) {
* Update a block in the DB with new parameters.
* The ID field needs to be loaded first.
*
- * @return bool|array False on failure, array on success: ('id' => block ID, 'autoIds' => array of autoblock IDs)
+ * @return bool|array False on failure, array on success:
+ * ('id' => block ID, 'autoIds' => array of autoblock IDs)
*/
public function update() {
wfDebug( "Block::update; timestamp {$this->mTimestamp}\n" );
wfDebug( "Autoblocking {$this->getTarget()}@" . $autoblockIP . "\n" );
$autoblock->setTarget( $autoblockIP );
$autoblock->setBlocker( $this->getBlocker() );
- $autoblock->mReason = wfMessage( 'autoblocker', $this->getTarget(), $this->mReason )->inContentLanguage()->plain();
+ $autoblock->mReason = wfMessage( 'autoblocker', $this->getTarget(), $this->mReason )
+ ->inContentLanguage()->plain();
$timestamp = wfTimestampNow();
$autoblock->mTimestamp = $timestamp;
$autoblock->mAuto = 1;
/**
* Get/set whether the Block is a hardblock (affects logged-in users on a given IP/range
* @param $x Bool
- * @return Bool
+ * @return Bool
*/
public function isHardblock( $x = null ) {
wfSetVar( $this->isHardblock, $x );
# passed by some callers (bug 29116)
return null;
- } elseif ( in_array( $type, array( Block::TYPE_USER, Block::TYPE_IP, Block::TYPE_RANGE, null ) ) ) {
+ } elseif ( in_array(
+ $type,
+ array( Block::TYPE_USER, Block::TYPE_IP, Block::TYPE_RANGE, null ) )
+ ) {
$block = new Block();
$block->fromMaster( $fromMaster );