Add a few bits of method documentation

De-indent a line

Tidy up method returns

Change-Id: I7aa93072c80a16eb27b7f7ac3d2f030ea63ebf60
This commit is contained in:
Reedy 2012-06-21 14:31:09 +01:00
parent 43b97c571d
commit 3da992692c
4 changed files with 10 additions and 8 deletions

View file

@ -370,7 +370,7 @@ class AbuseFilter {
* Returns an associative array of filters which were tripped
*
* @param $vars array
* @param $group The filter group to check against.
* @param $group string The filter group to check against.
*
* @return array
*/
@ -1740,7 +1740,7 @@ class AbuseFilter {
/**
* @param $title Title
* @param $article Array
* @param $article Array|Article
* @return AbuseFilterVariableHolder
*/
public static function getEditVars( $title, $article = null ) {

View file

@ -13,7 +13,7 @@ class AbuseFilterHooks {
* @param $editor EditPage instance (object)
* @param $text string Content of the edit box
* @param &$error string Error message to return
* @param $summary Edit summary for page
* @param $summary string Edit summary for page
* @return bool
*/
public static function onEditFilterMerged( $editor, $text, &$error, $summary ) {
@ -269,6 +269,7 @@ class AbuseFilterHooks {
/**
* Updater callback to create the AbuseFilter user after the user tables have been updated.
* @param $updater DatabaseUpdater
*/
public static function createAbuseFilterUser( $updater ) {
$user = User::newFromName( wfMsgForContent( 'abusefilter-blocker' ) );

View file

@ -40,9 +40,8 @@ class AbuseFilterVariableHolder {
} elseif ( $this->mVars[$variable] instanceof AFPData ) {
return $this->mVars[$variable];
}
} else {
return new AFPData();
}
return new AFPData();
}
/**
@ -117,8 +116,8 @@ class AbuseFilterVariableHolder {
foreach ( $this->mVars as $name => $value ) {
if ( $value instanceof AFComputedVariable &&
in_array( $value->mMethod, $dbTypes ) ) {
$value = $value->compute( $this );
$this->setVar( $name, $value );
$value = $value->compute( $this );
$this->setVar( $name, $value );
}
}
}

View file

@ -5,11 +5,13 @@
*/
class AbuseLogHitFormatter extends LogFormatter {
/**
* @return array
*/
protected function getMessageParameters() {
$entry = $this->entry->getParameters();
$params = parent::getMessageParameters();
$filter_title = SpecialPage::getTitleFor( 'AbuseFilter', $entry['filter'] );
$filter_caption = $this->msg( 'abusefilter-log-detailedentry-local' )->params( $entry['filter'] );
$log_title = SpecialPage::getTitleFor( 'AbuseLog', $entry['log'] );