r81906 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81905‎ | r81906 | r81907 >
Date:17:32, 10 February 2011
Author:reedy
Status:ok (Comments)
Tags:
Comment:
Parameter and Return Type hints
Modified paths:
  • /trunk/extensions/AbuseFilter/AbuseFilter.class.php (modified) (history)
  • /trunk/extensions/AbuseFilter/AbuseFilter.hooks.php (modified) (history)
  • /trunk/extensions/AbuseFilter/AbuseFilter.parser.php (modified) (history)
  • /trunk/extensions/AbuseFilter/Views/AbuseFilterView.php (modified) (history)
  • /trunk/extensions/AbuseFilter/Views/AbuseFilterViewList.php (modified) (history)

Diff [purge]

Index: trunk/extensions/AbuseFilter/AbuseFilter.parser.php
@@ -592,7 +592,7 @@
593593 if ( !$this->mVars->varIsSet( $varname ) ) {
594594 throw new AFPUserVisibleException( 'unrecognisedvar',
595595 $this->mCur->pos,
596 - array( $var )
 596+ array( $varname )
597597 );
598598 }
599599 $list = $this->mVars->getVar( $varname );
Index: trunk/extensions/AbuseFilter/Views/AbuseFilterViewList.php
@@ -52,7 +52,8 @@
5353
5454 $pager = new AbuseFilterPager( $this, $conds );
5555
56 - extract( $optarray );
 56+ $deleted = $optarray['deleted'];
 57+ $hidedisabled = $optarray['hidedisabled'];
5758
5859 # Options form
5960 $fields = array();
Index: trunk/extensions/AbuseFilter/Views/AbuseFilterView.php
@@ -8,6 +8,10 @@
99 $this->mParams = $params;
1010 }
1111
 12+ /**
 13+ * @param string $subpage
 14+ * @return Title
 15+ */
1216 function getTitle( $subpage = '' ) {
1317 return $this->mPage->getTitle( $subpage );
1418 }
Index: trunk/extensions/AbuseFilter/AbuseFilter.class.php
@@ -167,6 +167,11 @@
168168 $out->addHTML( $linkStr );
169169 }
170170
 171+ /**
 172+ * @static
 173+ * @param $user User
 174+ * @return AbuseFilterVariableHolder
 175+ */
171176 public static function generateUserVars( $user ) {
172177 $vars = new AbuseFilterVariableHolder;
173178
@@ -279,6 +284,12 @@
280285 self::$condLimitEnabled = false;
281286 }
282287
 288+ /**
 289+ * @static
 290+ * @param $title Title
 291+ * @param $prefix
 292+ * @return AbuseFilterVariableHolder
 293+ */
283294 public static function generateTitleVars( $title, $prefix ) {
284295 $vars = new AbuseFilterVariableHolder;
285296
@@ -1215,8 +1226,6 @@
12161227
12171228 wfProfileIn( __METHOD__ );
12181229
1219 - $blocking_filters = array_keys( array_filter( $filters ) );
1220 -
12211230 // Figure out if we've triggered overflows and blocks.
12221231 $overflow_triggered = ( self::$condCount > $wgAbuseFilterConditionLimit );
12231232
Index: trunk/extensions/AbuseFilter/AbuseFilter.hooks.php
@@ -164,6 +164,11 @@
165165 return true;
166166 }
167167
 168+ /**
 169+ * @static
 170+ * @param $updater DatabaseUpdater
 171+ * @return bool
 172+ */
168173 public static function onLoadExtensionSchemaUpdates( $updater = null ) {
169174 $dir = dirname( __FILE__ );
170175

Comments

#Comment by 😂 (talk | contribs)   15:44, 18 April 2011

@static is silly. Stop doing that.

Status & tagging log