r79700 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79699‎ | r79700 | r79701 >
Date:01:43, 6 January 2011
Author:reedy
Status:ok (Comments)
Tags:
Comment:
Documentation
Modified paths:
  • /trunk/extensions/CodeReview/ui/CodeRepoListView.php (modified) (history)
  • /trunk/extensions/InlineScripts/InlineScripts.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/ui/CodeRepoListView.php
@@ -18,6 +18,11 @@
1919 $wgOut->addWikiText( $text );
2020 }
2121
 22+ /**
 23+ * @static
 24+ * @param $repo CodeRepository
 25+ * @return string
 26+ */
2227 public static function getNavItem( $repo ) {
2328 global $wgLang, $wgUser;
2429 $name = $repo->getName();
Index: trunk/extensions/InlineScripts/InlineScripts.php
@@ -67,6 +67,7 @@
6868
6969 /**
7070 * Register parser hook
 71+ * @param $parser Parser
7172 */
7273 public static function setupParserHook( &$parser ) {
7374 $parser->setFunctionTagHook( 'wikiscript', 'InlineScriptsHooks::scriptHook', SFH_OBJECT_ARGS );
@@ -74,6 +75,11 @@
7576 return true;
7677 }
7778
 79+ /**
 80+ * @static
 81+ * @param $parser Parser
 82+ * @return bool
 83+ */
7884 public static function clearState( &$parser ) {
7985 $parser->is_evalsCount = 0;
8086 $parser->is_tokensCount = 0;
@@ -81,6 +87,13 @@
8288 return true;
8389 }
8490
 91+ /**
 92+ * @static
 93+ * @param $parser Parser
 94+ * @param $frame
 95+ * @param $args
 96+ * @return string
 97+ */
8598 public static function inlineHook( &$parser, $frame, $args ) {
8699 wfProfileIn( __METHOD__ );
87100 $scriptParser = self::getInterpreter();
@@ -96,6 +109,14 @@
97110 return trim( $result );
98111 }
99112
 113+ /**
 114+ * @static
 115+ * @param $parser Parser
 116+ * @param $frame
 117+ * @param $code
 118+ * @param $attribs
 119+ * @return string
 120+ */
100121 public static function scriptHook( &$parser, $frame, $code, $attribs ) {
101122 wfProfileIn( __METHOD__ );
102123 $scriptParser = self::getInterpreter();
@@ -113,6 +134,12 @@
114135 return trim( $result );
115136 }
116137
 138+ /**
 139+ * @static
 140+ * @param $parser Parser
 141+ * @param $report
 142+ * @return bool
 143+ */
117144 public static function reportLimits( &$parser, &$report ) {
118145 global $wgInlineScriptsLimits;
119146 $i = self::getInterpreter();
@@ -123,9 +150,14 @@
124151 return true;
125152 }
126153
 154+ /**
 155+ * @static
 156+ * @return InlineScriptInterpreter
 157+ */
127158 public static function getInterpreter() {
128 - if( !self::$scriptParser )
 159+ if( !self::$scriptParser ) {
129160 self::$scriptParser = new InlineScriptInterpreter();
 161+ }
130162 return self::$scriptParser;
131163 }
132164 }

Comments

#Comment by 😂 (talk | contribs)   18:16, 20 January 2011

Why do people add @static? Doesn't the 'static' keyword give it away?

#Comment by Reedy (talk | contribs)   18:55, 20 January 2011

Lol. It was automagically added.

Though, I would agree

Status & tagging log