'sitewide' => true,
];
- if ( func_num_args() > 1 || !is_array( $options ) ) {
- $options = array_combine(
- array_slice( array_keys( $defaults ), 0, func_num_args() ),
- func_get_args()
- );
- wfDeprecated( __METHOD__ . ' with multiple arguments', '1.26' );
- }
-
$options += $defaults;
$this->setTarget( $options['address'] );
* @return int (0 for foreign users)
*/
public function getBy() {
- $blocker = $this->getBlocker();
- return ( $blocker instanceof User )
- ? $blocker->getId()
- : 0;
+ return $this->getBlocker()->getId();
}
/**
* @return string
*/
public function getByName() {
- $blocker = $this->getBlocker();
- return ( $blocker instanceof User )
- ? $blocker->getName()
- : (string)$blocker; // username
+ return $this->getBlocker()->getName();
}
/**