Index: trunk/tools/code-utils/check-vars.php |
— | — | @@ -184,8 +184,9 @@ |
185 | 185 | |
186 | 186 | $this->mStatus = self::WAITING_FUNCTION; |
187 | 187 | $this->mFunctionQualifiers = array(); |
| 188 | + $this->mClass = null; |
| 189 | + $this->mParent = null; |
188 | 190 | |
189 | | - |
190 | 191 | // Predefine constant that might not be defined by this file source code |
191 | 192 | $this->mConstants = array( 'PARSEKIT_SIMPLE', 'UNORM_NFC', # Extensions |
192 | 193 | /* Defined in Title.php and GlobalFunctions.php */ |
— | — | @@ -286,6 +287,12 @@ |
287 | 288 | $this->mClass = $token[1]; |
288 | 289 | $this->mParent = null; |
289 | 290 | } |
| 291 | + |
| 292 | + if ( $token[0] == '}' ) { |
| 293 | + $this->mClass = null; |
| 294 | + $this->mParent = null; |
| 295 | + } |
| 296 | + |
290 | 297 | if ( ( $lastMeaningfulToken[0] == T_EXTENDS ) && ( $token[0] == T_STRING ) ) { |
291 | 298 | $this->checkClassName( $token ); |
292 | 299 | $this->mParent = $token[1]; |
— | — | @@ -312,7 +319,7 @@ |
313 | 320 | $this->mInSwitch = 0; |
314 | 321 | $this->mFunctionGlobals = array(); |
315 | 322 | $currentToken[0] = self::FUNCTION_DEFINITION; |
316 | | - $this->mKnownFunctions[] = $this->mFunction; |
| 323 | + $this->mKnownFunctions[] = $this->mClass ? $this->mClass . "::" . $this->mFunction : $this->mFunction; |
317 | 324 | |
318 | 325 | if ( $this->generateDeprecatedList && in_array( self::FUNCTION_DEPRECATED, $this->mFunctionQualifiers ) ) { |
319 | 326 | if ( ( substr( $this->mFunction, 0, 2 ) != "__" ) ) { |
— | — | @@ -674,7 +681,8 @@ |
675 | 682 | '$wgMessageCache' => 'MessageCache', |
676 | 683 | '$wgLang' => 'Language', '$wgContLang' => 'Language', |
677 | 684 | '$dbw' => 'Database', '$dbr' => 'Database', |
678 | | - '$sk' => 'Skin' |
| 685 | + '$sk' => 'Skin', |
| 686 | + '$wgMemc' => 'MWMemcached', |
679 | 687 | ); |
680 | 688 | |
681 | 689 | if ( $token[0] == T_VARIABLE ) { |