Index: trunk/phase3/includes/ExternalUser.php |
— | — | @@ -98,7 +98,7 @@ |
99 | 99 | * This is a wrapper around newFromId(). |
100 | 100 | * |
101 | 101 | * @param $user User |
102 | | - * @return mixed ExternalUser or false |
| 102 | + * @return ExternalUser|false |
103 | 103 | */ |
104 | 104 | public static function newFromUser( $user ) { |
105 | 105 | global $wgExternalAuthType; |
Index: trunk/phase3/includes/parser/Preprocessor_Hash.php |
— | — | @@ -24,10 +24,17 @@ |
25 | 25 | $this->parser = $parser; |
26 | 26 | } |
27 | 27 | |
| 28 | + /** |
| 29 | + * @return PPFrame_Hash |
| 30 | + */ |
28 | 31 | function newFrame() { |
29 | 32 | return new PPFrame_Hash( $this ); |
30 | 33 | } |
31 | 34 | |
| 35 | + /** |
| 36 | + * @param $args |
| 37 | + * @return PPCustomFrame_Hash |
| 38 | + */ |
32 | 39 | function newCustomFrame( $args ) { |
33 | 40 | return new PPCustomFrame_Hash( $this, $args ); |
34 | 41 | } |
— | — | @@ -1231,6 +1238,13 @@ |
1232 | 1239 | var $numberedArgs, $namedArgs, $parent; |
1233 | 1240 | var $numberedExpansionCache, $namedExpansionCache; |
1234 | 1241 | |
| 1242 | + /** |
| 1243 | + * @param $preprocessor |
| 1244 | + * @param $parent |
| 1245 | + * @param $numberedArgs array |
| 1246 | + * @param $namedArgs array |
| 1247 | + * @param $title Title |
| 1248 | + */ |
1235 | 1249 | function __construct( $preprocessor, $parent = false, $numberedArgs = array(), $namedArgs = array(), $title = false ) { |
1236 | 1250 | parent::__construct( $preprocessor ); |
1237 | 1251 | |
— | — | @@ -1267,11 +1281,16 @@ |
1268 | 1282 | } |
1269 | 1283 | /** |
1270 | 1284 | * Returns true if there are no arguments in this frame |
| 1285 | + * |
| 1286 | + * @return bool |
1271 | 1287 | */ |
1272 | 1288 | function isEmpty() { |
1273 | 1289 | return !count( $this->numberedArgs ) && !count( $this->namedArgs ); |
1274 | 1290 | } |
1275 | 1291 | |
| 1292 | + /** |
| 1293 | + * @return array |
| 1294 | + */ |
1276 | 1295 | function getArguments() { |
1277 | 1296 | $arguments = array(); |
1278 | 1297 | foreach ( array_merge( |
— | — | @@ -1282,6 +1301,9 @@ |
1283 | 1302 | return $arguments; |
1284 | 1303 | } |
1285 | 1304 | |
| 1305 | + /** |
| 1306 | + * @return array |
| 1307 | + */ |
1286 | 1308 | function getNumberedArguments() { |
1287 | 1309 | $arguments = array(); |
1288 | 1310 | foreach ( array_keys($this->numberedArgs) as $key ) { |
— | — | @@ -1290,6 +1312,9 @@ |
1291 | 1313 | return $arguments; |
1292 | 1314 | } |
1293 | 1315 | |
| 1316 | + /** |
| 1317 | + * @return array |
| 1318 | + */ |
1294 | 1319 | function getNamedArguments() { |
1295 | 1320 | $arguments = array(); |
1296 | 1321 | foreach ( array_keys($this->namedArgs) as $key ) { |
Index: trunk/phase3/includes/parser/Parser.php |
— | — | @@ -109,7 +109,14 @@ |
110 | 110 | var $mImageParamsMagicArray = array(); |
111 | 111 | var $mMarkerIndex = 0; |
112 | 112 | var $mFirstCall = true; |
113 | | - var $mVariables, $mSubstWords; # Initialised by initialiseVariables() |
| 113 | + |
| 114 | + # Initialised by initialiseVariables() |
| 115 | + var $mVariables; |
| 116 | + |
| 117 | + /** |
| 118 | + * @var MagicWordArray |
| 119 | + */ |
| 120 | + var $mSubstWords; |
114 | 121 | var $mConf, $mPreprocessor, $mExtLinkBracketedRegex, $mUrlProtocols; # Initialised in constructor |
115 | 122 | |
116 | 123 | # Cleared with clearState(): |
— | — | @@ -125,7 +132,12 @@ |
126 | 133 | var $mStripState; |
127 | 134 | |
128 | 135 | var $mIncludeCount, $mArgStack, $mLastSection, $mInPre; |
129 | | - var $mLinkHolders, $mLinkID; |
| 136 | + /** |
| 137 | + * @var LinkHolderArray |
| 138 | + */ |
| 139 | + var $mLinkHolders; |
| 140 | + |
| 141 | + var $mLinkID; |
130 | 142 | var $mIncludeSizes, $mPPNodeCount, $mDefaultSort; |
131 | 143 | var $mTplExpandCache; # empty-frame expansion cache |
132 | 144 | var $mTplRedirCache, $mTplDomCache, $mHeadings, $mDoubleUnderscores; |
— | — | @@ -3518,6 +3530,9 @@ |
3519 | 3531 | /** |
3520 | 3532 | * Transclude an interwiki link. |
3521 | 3533 | * |
| 3534 | + * @param $title Title |
| 3535 | + * @param $action |
| 3536 | + * |
3522 | 3537 | * @return string |
3523 | 3538 | */ |
3524 | 3539 | function interwikiTransclude( $title, $action ) { |
— | — | @@ -5010,6 +5025,11 @@ |
5011 | 5026 | return $ret; |
5012 | 5027 | } |
5013 | 5028 | |
| 5029 | + /** |
| 5030 | + * @param $caption |
| 5031 | + * @param $holders LinkHolderArray |
| 5032 | + * @return mixed|String |
| 5033 | + */ |
5014 | 5034 | protected function stripAltText( $caption, $holders ) { |
5015 | 5035 | # Strip bad stuff out of the title (tooltip). We can't just use |
5016 | 5036 | # replaceLinkHoldersText() here, because if this function is called |
Index: trunk/phase3/includes/parser/Preprocessor_DOM.php |
— | — | @@ -1157,6 +1157,8 @@ |
1158 | 1158 | /** |
1159 | 1159 | * Makes an object that, when expand()ed, will be the same as one obtained |
1160 | 1160 | * with implode() |
| 1161 | + * |
| 1162 | + * @return array |
1161 | 1163 | */ |
1162 | 1164 | function virtualImplode( $sep /*, ... */ ) { |
1163 | 1165 | $args = array_slice( func_get_args(), 1 ); |
— | — | @@ -1424,6 +1426,9 @@ |
1425 | 1427 | $this->node = $node; |
1426 | 1428 | } |
1427 | 1429 | |
| 1430 | + /** |
| 1431 | + * @return DOMXPath |
| 1432 | + */ |
1428 | 1433 | function getXPath() { |
1429 | 1434 | if ( $this->xpath === null ) { |
1430 | 1435 | $this->xpath = new DOMXPath( $this->node->ownerDocument ); |
— | — | @@ -1443,22 +1448,39 @@ |
1444 | 1449 | return $s; |
1445 | 1450 | } |
1446 | 1451 | |
| 1452 | + /** |
| 1453 | + * @return bool|PPNode_DOM |
| 1454 | + */ |
1447 | 1455 | function getChildren() { |
1448 | 1456 | return $this->node->childNodes ? new self( $this->node->childNodes ) : false; |
1449 | 1457 | } |
1450 | 1458 | |
| 1459 | + /** |
| 1460 | + * @return bool|PPNode_DOM |
| 1461 | + */ |
1451 | 1462 | function getFirstChild() { |
1452 | 1463 | return $this->node->firstChild ? new self( $this->node->firstChild ) : false; |
1453 | 1464 | } |
1454 | 1465 | |
| 1466 | + /** |
| 1467 | + * @return bool|PPNode_DOM |
| 1468 | + */ |
1455 | 1469 | function getNextSibling() { |
1456 | 1470 | return $this->node->nextSibling ? new self( $this->node->nextSibling ) : false; |
1457 | 1471 | } |
1458 | 1472 | |
| 1473 | + /** |
| 1474 | + * @param $type |
| 1475 | + * |
| 1476 | + * @return bool|PPNode_DOM |
| 1477 | + */ |
1459 | 1478 | function getChildrenOfType( $type ) { |
1460 | 1479 | return new self( $this->getXPath()->query( $type, $this->node ) ); |
1461 | 1480 | } |
1462 | 1481 | |
| 1482 | + /** |
| 1483 | + * @return int |
| 1484 | + */ |
1463 | 1485 | function getLength() { |
1464 | 1486 | if ( $this->node instanceof DOMNodeList ) { |
1465 | 1487 | return $this->node->length; |
— | — | @@ -1467,11 +1489,18 @@ |
1468 | 1490 | } |
1469 | 1491 | } |
1470 | 1492 | |
| 1493 | + /** |
| 1494 | + * @param $i |
| 1495 | + * @return bool|PPNode_DOM |
| 1496 | + */ |
1471 | 1497 | function item( $i ) { |
1472 | 1498 | $item = $this->node->item( $i ); |
1473 | 1499 | return $item ? new self( $item ) : false; |
1474 | 1500 | } |
1475 | 1501 | |
| 1502 | + /** |
| 1503 | + * @return string |
| 1504 | + */ |
1476 | 1505 | function getName() { |
1477 | 1506 | if ( $this->node instanceof DOMNodeList ) { |
1478 | 1507 | return '#nodelist'; |
— | — | @@ -1485,6 +1514,8 @@ |
1486 | 1515 | * name PPNode name |
1487 | 1516 | * index String index |
1488 | 1517 | * value PPNode value |
| 1518 | + * |
| 1519 | + * @return array |
1489 | 1520 | */ |
1490 | 1521 | function splitArg() { |
1491 | 1522 | $xpath = $this->getXPath(); |
— | — | @@ -1504,6 +1535,8 @@ |
1505 | 1536 | /** |
1506 | 1537 | * Split an <ext> node into an associative array containing name, attr, inner and close |
1507 | 1538 | * All values in the resulting array are PPNodes. Inner and close are optional. |
| 1539 | + * |
| 1540 | + * @return array |
1508 | 1541 | */ |
1509 | 1542 | function splitExt() { |
1510 | 1543 | $xpath = $this->getXPath(); |
Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -74,7 +74,12 @@ |
75 | 75 | var $autoSumm = ''; |
76 | 76 | var $hookError = ''; |
77 | 77 | #var $mPreviewTemplates; |
| 78 | + |
| 79 | + /** |
| 80 | + * @var ParserOutput |
| 81 | + */ |
78 | 82 | var $mParserOutput; |
| 83 | + |
79 | 84 | var $mBaseRevision = false; |
80 | 85 | var $mShowSummaryField = true; |
81 | 86 | |
— | — | @@ -2046,10 +2051,15 @@ |
2047 | 2052 | return $previewhead . $previewHTML . $this->previewTextAfterContent; |
2048 | 2053 | } |
2049 | 2054 | |
| 2055 | + /** |
| 2056 | + * @return Array |
| 2057 | + */ |
2050 | 2058 | function getTemplates() { |
2051 | 2059 | if ( $this->preview || $this->section != '' ) { |
2052 | 2060 | $templates = array(); |
2053 | | - if ( !isset( $this->mParserOutput ) ) return $templates; |
| 2061 | + if ( !isset( $this->mParserOutput ) ) { |
| 2062 | + return $templates; |
| 2063 | + } |
2054 | 2064 | foreach( $this->mParserOutput->getTemplates() as $ns => $template) { |
2055 | 2065 | foreach( array_keys( $template ) as $dbk ) { |
2056 | 2066 | $templates[] = Title::makeTitle($ns, $dbk); |
— | — | @@ -2617,6 +2627,11 @@ |
2618 | 2628 | : $text; |
2619 | 2629 | } |
2620 | 2630 | |
| 2631 | + /** |
| 2632 | + * @param $request WebRequest |
| 2633 | + * @param $text string |
| 2634 | + * @return string |
| 2635 | + */ |
2621 | 2636 | function safeUnicodeText( $request, $text ) { |
2622 | 2637 | $text = rtrim( $text ); |
2623 | 2638 | return $request->getBool( 'safemode' ) |
Index: trunk/phase3/includes/MagicWord.php |
— | — | @@ -251,7 +251,7 @@ |
252 | 252 | /** |
253 | 253 | * Get a MagicWordArray of double-underscore entities |
254 | 254 | * |
255 | | - * @return array |
| 255 | + * @return MagicWordArray |
256 | 256 | */ |
257 | 257 | static function getDoubleUnderscoreArray() { |
258 | 258 | if ( is_null( self::$mDoubleUnderscoreArray ) ) { |
Index: trunk/phase3/includes/SkinTemplate.php |
— | — | @@ -1420,6 +1420,8 @@ |
1421 | 1421 | |
1422 | 1422 | /** |
1423 | 1423 | * @private |
| 1424 | + * |
| 1425 | + * @return bool |
1424 | 1426 | */ |
1425 | 1427 | function haveMsg( $str ) { |
1426 | 1428 | $msg = $this->translator->translate( $str ); |