Index: trunk/extensions/CodeReview/ui/CodeRepoListView.php |
— | — | @@ -18,6 +18,11 @@ |
19 | 19 | $wgOut->addWikiText( $text ); |
20 | 20 | } |
21 | 21 | |
| 22 | + /** |
| 23 | + * @static |
| 24 | + * @param $repo CodeRepository |
| 25 | + * @return string |
| 26 | + */ |
22 | 27 | public static function getNavItem( $repo ) { |
23 | 28 | global $wgLang, $wgUser; |
24 | 29 | $name = $repo->getName(); |
Index: trunk/extensions/InlineScripts/InlineScripts.php |
— | — | @@ -67,6 +67,7 @@ |
68 | 68 | |
69 | 69 | /** |
70 | 70 | * Register parser hook |
| 71 | + * @param $parser Parser |
71 | 72 | */ |
72 | 73 | public static function setupParserHook( &$parser ) { |
73 | 74 | $parser->setFunctionTagHook( 'wikiscript', 'InlineScriptsHooks::scriptHook', SFH_OBJECT_ARGS ); |
— | — | @@ -74,6 +75,11 @@ |
75 | 76 | return true; |
76 | 77 | } |
77 | 78 | |
| 79 | + /** |
| 80 | + * @static |
| 81 | + * @param $parser Parser |
| 82 | + * @return bool |
| 83 | + */ |
78 | 84 | public static function clearState( &$parser ) { |
79 | 85 | $parser->is_evalsCount = 0; |
80 | 86 | $parser->is_tokensCount = 0; |
— | — | @@ -81,6 +87,13 @@ |
82 | 88 | return true; |
83 | 89 | } |
84 | 90 | |
| 91 | + /** |
| 92 | + * @static |
| 93 | + * @param $parser Parser |
| 94 | + * @param $frame |
| 95 | + * @param $args |
| 96 | + * @return string |
| 97 | + */ |
85 | 98 | public static function inlineHook( &$parser, $frame, $args ) { |
86 | 99 | wfProfileIn( __METHOD__ ); |
87 | 100 | $scriptParser = self::getInterpreter(); |
— | — | @@ -96,6 +109,14 @@ |
97 | 110 | return trim( $result ); |
98 | 111 | } |
99 | 112 | |
| 113 | + /** |
| 114 | + * @static |
| 115 | + * @param $parser Parser |
| 116 | + * @param $frame |
| 117 | + * @param $code |
| 118 | + * @param $attribs |
| 119 | + * @return string |
| 120 | + */ |
100 | 121 | public static function scriptHook( &$parser, $frame, $code, $attribs ) { |
101 | 122 | wfProfileIn( __METHOD__ ); |
102 | 123 | $scriptParser = self::getInterpreter(); |
— | — | @@ -113,6 +134,12 @@ |
114 | 135 | return trim( $result ); |
115 | 136 | } |
116 | 137 | |
| 138 | + /** |
| 139 | + * @static |
| 140 | + * @param $parser Parser |
| 141 | + * @param $report |
| 142 | + * @return bool |
| 143 | + */ |
117 | 144 | public static function reportLimits( &$parser, &$report ) { |
118 | 145 | global $wgInlineScriptsLimits; |
119 | 146 | $i = self::getInterpreter(); |
— | — | @@ -123,9 +150,14 @@ |
124 | 151 | return true; |
125 | 152 | } |
126 | 153 | |
| 154 | + /** |
| 155 | + * @static |
| 156 | + * @return InlineScriptInterpreter |
| 157 | + */ |
127 | 158 | public static function getInterpreter() { |
128 | | - if( !self::$scriptParser ) |
| 159 | + if( !self::$scriptParser ) { |
129 | 160 | self::$scriptParser = new InlineScriptInterpreter(); |
| 161 | + } |
130 | 162 | return self::$scriptParser; |
131 | 163 | } |
132 | 164 | } |