r86798 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86797‎ | r86798 | r86799 >
Date:21:27, 23 April 2011
Author:happy-melon
Status:ok
Tags:
Comment:
Some type-hinting and documentation in HTMLForm.php
Modified paths:
  • /trunk/phase3/includes/HTMLForm.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/HTMLForm.php
@@ -505,7 +505,7 @@
506506
507507 /**
508508 * Format and display an error message stack.
509 - * @param $errors Mixed String or Array of message keys
 509+ * @param $errors String|Array|Status
510510 * @return String
511511 */
512512 function getErrors( $errors ) {
@@ -627,20 +627,32 @@
628628 : $this->mTitle;
629629 }
630630
 631+ /**
 632+ * @return RequestContext
 633+ */
631634 public function getContext(){
632635 return $this->mContext instanceof RequestContext
633636 ? $this->mContext
634637 : RequestContext::getMain();
635638 }
636639
 640+ /**
 641+ * @return OutputPage
 642+ */
637643 public function getOutput(){
638644 return $this->getContext()->output;
639645 }
640646
 647+ /**
 648+ * @return WebRequest
 649+ */
641650 public function getRequest(){
642651 return $this->getContext()->request;
643652 }
644653
 654+ /**
 655+ * @return User
 656+ */
645657 public function getUser(){
646658 return $this->getContext()->user;
647659 }
@@ -778,6 +790,10 @@
779791 protected $mID;
780792 protected $mClass = '';
781793 protected $mDefault;
 794+
 795+ /**
 796+ * @var HTMLForm
 797+ */
782798 public $mParent;
783799
784800 /**
@@ -1280,6 +1296,10 @@
12811297 return ' ';
12821298 }
12831299
 1300+ /**
 1301+ * @param $request WebRequest
 1302+ * @return String
 1303+ */
12841304 function loadDataFromRequest( $request ) {
12851305 $invert = false;
12861306 if ( isset( $this->mParams['invert'] ) && $this->mParams['invert'] ) {
@@ -1407,6 +1427,10 @@
14081428 return "$select<br />\n$textbox";
14091429 }
14101430
 1431+ /**
 1432+ * @param $request WebRequest
 1433+ * @return String
 1434+ */
14111435 function loadDataFromRequest( $request ) {
14121436 if ( $request->getCheck( $this->mName ) ) {
14131437 $val = $request->getText( $this->mName );
@@ -1492,6 +1516,10 @@
14931517 return $html;
14941518 }
14951519
 1520+ /**
 1521+ * @param $request WebRequest
 1522+ * @return String
 1523+ */
14961524 function loadDataFromRequest( $request ) {
14971525 if ( $this->mParent->getMethod() == 'post' ) {
14981526 if( $request->wasPosted() ){

Status & tagging log