/**
* Returns the gender for given username.
- * @param string|User $username Username
+ * @param string|User $username
* @param string $caller The calling method
* @return string
*/
/* Undefined if there is a valid username which for some reason doesn't
* exist in the database.
*/
- return isset( $this->cache[$username] ) ? $this->cache[$username] : $this->getDefault();
+ return $this->cache[$username] ?? $this->getDefault();
}
/**
return;
}
- $dbr = wfGetDB( DB_SLAVE );
+ $dbr = wfGetDB( DB_REPLICA );
$table = [ 'user', 'user_properties' ];
$fields = [ 'user_name', 'up_value' ];
$conds = [ 'user_name' => $usersToCheck ];