r90865 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90864‎ | r90865 | r90866 >
Date:23:40, 26 June 2011
Author:happy-melon
Status:ok
Tags:
Comment:
Follow-up r86234, and more parameter documentation.
Modified paths:
  • /trunk/phase3/includes/Skin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Skin.php
@@ -282,6 +282,8 @@
283283 * as their "relevant" title, this allows the skin system to display things
284284 * such as content tabs which belong to to that page instead of displaying
285285 * a basic special page tab which has almost no meaning.
 286+ *
 287+ * @return Title
286288 */
287289 public function getRelevantTitle() {
288290 if ( isset($this->mRelevantTitle) ) {
@@ -329,7 +331,7 @@
330332
331333 /**
332334 * Outputs the HTML generated by other functions.
333 - * @param $out Object: instance of OutputPage
 335+ * @param $out OutputPage
334336 */
335337 abstract function outputPage( OutputPage $out );
336338
@@ -398,6 +400,8 @@
399401
400402 /**
401403 * @private
 404+ * @todo document
 405+ * @param $out OutputPage
402406 */
403407 function setupUserCss( OutputPage $out ) {
404408 global $wgUseSiteCss, $wgAllowUserCss, $wgAllowUserCssPrefs;
@@ -495,6 +499,8 @@
496500 * This will be called by OutputPage::headElement when it is creating the
497501 * <body> tag, skins can override it if they have a need to add in any
498502 * body attributes or classes of their own.
 503+ * @param $out OutputPage
 504+ * @param $bodyAttrs Array
499505 */
500506 function addToBodyAttributes( $out, &$bodyAttrs ) {
501507 // does nothing by default
@@ -502,6 +508,7 @@
503509
504510 /**
505511 * URL to the logo
 512+ * @return String
506513 */
507514 function getLogo() {
508515 global $wgLogo;
@@ -564,7 +571,7 @@
565572 $parenttree = $this->getTitle()->getParentCategoryTree();
566573 # Skin object passed by reference cause it can not be
567574 # accessed under the method subfunction drawCategoryBrowser
568 - $tempout = explode( "\n", $this->drawCategoryBrowser( $parenttree, $this ) );
 575+ $tempout = explode( "\n", $this->drawCategoryBrowser( $parenttree ) );
569576 # Clean out bogus first entry and sort them
570577 unset( $tempout[0] );
571578 asort( $tempout );
@@ -631,7 +638,7 @@
632639 * The output of this function gets processed in SkinTemplate::outputPage() for
633640 * the SkinTemplate based skins, all other skins should directly echo it.
634641 *
635 - * Returns an empty string by default, if not changed by any hook function.
 642+ * @return String, empty by default, if not changed by any hook function.
636643 */
637644 protected function afterContentHook() {
638645 $data = '';
@@ -826,6 +833,7 @@
827834
828835 /**
829836 * Returns true if the IP should be shown in the header
 837+ * @return Bool
830838 */
831839 function showIPinHeader() {
832840 global $wgShowIPinHeader;
@@ -975,7 +983,8 @@
976984 /**
977985 * Renders a $wgFooterIcons icon acording to the method's arguments
978986 * @param $icon Array: The icon to build the html for, see $wgFooterIcons for the format of this array
979 - * @param $withImage Boolean: Whether to use the icon's image or output a text-only footericon
 987+ * @param $withImage Bool|String: Whether to use the icon's image or output a text-only footericon
 988+ * @return String HTML
980989 */
981990 function makeFooterIcon( $icon, $withImage = 'withImage' ) {
982991 if ( is_string( $icon ) ) {
@@ -1031,6 +1040,7 @@
10321041
10331042 /**
10341043 * Gets the link to the wiki's privacy policy page.
 1044+ * @return String HTML
10351045 */
10361046 function privacyLink() {
10371047 return $this->footerLink( 'privacy', 'privacypage' );
@@ -1038,6 +1048,7 @@
10391049
10401050 /**
10411051 * Gets the link to the wiki's about page.
 1052+ * @return String HTML
10421053 */
10431054 function aboutLink() {
10441055 return $this->footerLink( 'aboutsite', 'aboutpage' );
@@ -1045,6 +1056,7 @@
10461057
10471058 /**
10481059 * Gets the link to the wiki's general disclaimers page.
 1060+ * @return String HTML
10491061 */
10501062 function disclaimerLink() {
10511063 return $this->footerLink( 'disclaimers', 'disclaimerpage' );
@@ -1131,6 +1143,8 @@
11321144 /**
11331145 * If url string starts with http, consider as external URL, else
11341146 * internal
 1147+ * @param $name String
 1148+ * @return String URL
11351149 */
11361150 static function makeInternalOrExternalUrl( $name ) {
11371151 if ( preg_match( '/^(?:' . wfUrlProtocols() . ')/', $name ) ) {
@@ -1161,6 +1175,9 @@
11621176
11631177 /**
11641178 * Make URL details where the article exists (or at least it's convenient to think so)
 1179+ * @param $name String Article name
 1180+ * @param $urlaction String
 1181+ * @return Array
11651182 */
11661183 static function makeKnownUrlDetails( $name, $urlaction = '' ) {
11671184 $title = Title::newFromText( $name );
@@ -1230,6 +1247,7 @@
12311248 * @since 1.17
12321249 * @param &$bar array
12331250 * @param $text string
 1251+ * @return Array
12341252 */
12351253 function addToSidebarPlain( &$bar, $text ) {
12361254 $lines = explode( "\n", $text );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r86234Update Skin.php to not call the now-separate Linker methods via $this->foo().happy-melon20:01, 16 April 2011

Status & tagging log