diff --git a/AbuseFilter.class.php b/AbuseFilter.class.php index 829ed059b..6f6f6a382 100644 --- a/AbuseFilter.class.php +++ b/AbuseFilter.class.php @@ -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 ) { diff --git a/AbuseFilter.hooks.php b/AbuseFilter.hooks.php index e2fe2b328..181020368 100644 --- a/AbuseFilter.hooks.php +++ b/AbuseFilter.hooks.php @@ -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' ) ); diff --git a/AbuseFilterVariableHolder.php b/AbuseFilterVariableHolder.php index d796337ff..9879d604b 100644 --- a/AbuseFilterVariableHolder.php +++ b/AbuseFilterVariableHolder.php @@ -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 ); } } } diff --git a/AbuseLogHitFormatter.php b/AbuseLogHitFormatter.php index 4cc2ed158..87980b43f 100644 --- a/AbuseLogHitFormatter.php +++ b/AbuseLogHitFormatter.php @@ -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'] );