Index: trunk/phase3/includes/db/LBFactory_Single.php |
— | — | @@ -7,7 +7,7 @@ |
8 | 8 | protected $lb; |
9 | 9 | |
10 | 10 | /** |
11 | | - * @param $conf An associative array with one member: |
| 11 | + * @param $conf array An associative array with one member: |
12 | 12 | * - connection: The DatabaseBase connection object |
13 | 13 | */ |
14 | 14 | function __construct( $conf ) { |
Index: trunk/phase3/includes/installer/WebInstaller.php |
— | — | @@ -296,6 +296,8 @@ |
297 | 297 | |
298 | 298 | /** |
299 | 299 | * Start the PHP session. This may be called before execute() to start the PHP session. |
| 300 | + * |
| 301 | + * @return bool |
300 | 302 | */ |
301 | 303 | public function startSession() { |
302 | 304 | if( wfIniGetBool( 'session.auto_start' ) || session_id() ) { |
— | — | @@ -321,6 +323,8 @@ |
322 | 324 | * |
323 | 325 | * This is used by mw-config/index.php to prevent multiple installations of MW |
324 | 326 | * on the same cookie domain from interfering with each other. |
| 327 | + * |
| 328 | + * @return string |
325 | 329 | */ |
326 | 330 | public function getFingerprint() { |
327 | 331 | // Get the base URL of the installation |
— | — | @@ -386,7 +390,7 @@ |
387 | 391 | /** |
388 | 392 | * Get a URL for submission back to the same script. |
389 | 393 | * |
390 | | - * @param $query: Array |
| 394 | + * @param $query array |
391 | 395 | * @return string |
392 | 396 | */ |
393 | 397 | public function getUrl( $query = array() ) { |
— | — | @@ -580,6 +584,8 @@ |
581 | 585 | * Get HTML for an error box with an icon. |
582 | 586 | * |
583 | 587 | * @param $text String: wikitext, get this with wfMsgNoTrans() |
| 588 | + * |
| 589 | + * @return string |
584 | 590 | */ |
585 | 591 | public function getErrorBox( $text ) { |
586 | 592 | return $this->getInfoBox( $text, 'critical-32.png', 'config-error-box' ); |
— | — | @@ -589,6 +595,8 @@ |
590 | 596 | * Get HTML for a warning box with an icon. |
591 | 597 | * |
592 | 598 | * @param $text String: wikitext, get this with wfMsgNoTrans() |
| 599 | + * |
| 600 | + * @return string |
593 | 601 | */ |
594 | 602 | public function getWarningBox( $text ) { |
595 | 603 | return $this->getInfoBox( $text, 'warning-32.png', 'config-warning-box' ); |
— | — | @@ -600,6 +608,8 @@ |
601 | 609 | * @param $text String: wikitext, get this with wfMsgNoTrans() |
602 | 610 | * @param $icon String: icon name, file in skins/common/images |
603 | 611 | * @param $class String: additional class name to add to the wrapper div |
| 612 | + * |
| 613 | + * @return string |
604 | 614 | */ |
605 | 615 | public function getInfoBox( $text, $icon = 'info-32.png', $class = false ) { |
606 | 616 | $s = |
— | — | @@ -623,6 +633,8 @@ |
624 | 634 | /** |
625 | 635 | * Get small text indented help for a preceding form field. |
626 | 636 | * Parameters like wfMsg(). |
| 637 | + * |
| 638 | + * @return string |
627 | 639 | */ |
628 | 640 | public function getHelpBox( $msg /*, ... */ ) { |
629 | 641 | $args = func_get_args(); |
— | — | @@ -678,6 +690,8 @@ |
679 | 691 | /** |
680 | 692 | * Label a control by wrapping a config-input div around it and putting a |
681 | 693 | * label before it. |
| 694 | + * |
| 695 | + * @return string |
682 | 696 | */ |
683 | 697 | public function label( $msg, $forId, $contents, $helpData = "" ) { |
684 | 698 | if ( strval( $msg ) == '' ) { |
— | — | @@ -717,6 +731,8 @@ |
718 | 732 | * controlName: The name for the input element (optional) |
719 | 733 | * value: The current value of the variable (optional) |
720 | 734 | * help: The html for the help text (optional) |
| 735 | + * |
| 736 | + * @return string |
721 | 737 | */ |
722 | 738 | public function getTextBox( $params ) { |
723 | 739 | if ( !isset( $params['controlName'] ) ) { |
— | — | @@ -762,6 +778,8 @@ |
763 | 779 | * controlName: The name for the input element (optional) |
764 | 780 | * value: The current value of the variable (optional) |
765 | 781 | * help: The html for the help text (optional) |
| 782 | + * |
| 783 | + * @return string |
766 | 784 | */ |
767 | 785 | public function getTextArea( $params ) { |
768 | 786 | if ( !isset( $params['controlName'] ) ) { |
— | — | @@ -809,6 +827,8 @@ |
810 | 828 | * controlName: The name for the input element (optional) |
811 | 829 | * value: The current value of the variable (optional) |
812 | 830 | * help: The html for the help text (optional) |
| 831 | + * |
| 832 | + * @return string |
813 | 833 | */ |
814 | 834 | public function getPasswordBox( $params ) { |
815 | 835 | if ( !isset( $params['value'] ) ) { |
— | — | @@ -836,6 +856,8 @@ |
837 | 857 | * controlName: The name for the input element (optional) |
838 | 858 | * value: The current value of the variable (optional) |
839 | 859 | * help: The html for the help text (optional) |
| 860 | + * |
| 861 | + * @return string |
840 | 862 | */ |
841 | 863 | public function getCheckBox( $params ) { |
842 | 864 | if ( !isset( $params['controlName'] ) ) { |
— | — | @@ -889,6 +911,8 @@ |
890 | 912 | * controlName: The name for the input element (optional) |
891 | 913 | * value: The current value of the variable (optional) |
892 | 914 | * help: The html for the help text (optional) |
| 915 | + * |
| 916 | + * @return string |
893 | 917 | */ |
894 | 918 | public function getRadioSet( $params ) { |
895 | 919 | if ( !isset( $params['controlName'] ) ) { |
— | — | @@ -963,6 +987,8 @@ |
964 | 988 | * |
965 | 989 | * @param $varNames Array |
966 | 990 | * @param $prefix String: the prefix added to variables to obtain form names |
| 991 | + * |
| 992 | + * @return array |
967 | 993 | */ |
968 | 994 | public function setVarsFromRequest( $varNames, $prefix = 'config_' ) { |
969 | 995 | $newValues = array(); |
— | — | @@ -988,6 +1014,8 @@ |
989 | 1015 | |
990 | 1016 | /** |
991 | 1017 | * Helper for Installer::docLink() |
| 1018 | + * |
| 1019 | + * @return string |
992 | 1020 | */ |
993 | 1021 | protected function getDocUrl( $page ) { |
994 | 1022 | $url = "{$_SERVER['PHP_SELF']}?page=" . urlencode( $page ); |
— | — | @@ -1001,6 +1029,8 @@ |
1002 | 1030 | |
1003 | 1031 | /** |
1004 | 1032 | * Extension tag hook for a documentation link. |
| 1033 | + * |
| 1034 | + * @return string |
1005 | 1035 | */ |
1006 | 1036 | public function docLink( $linkText, $attribs, $parser ) { |
1007 | 1037 | $url = $this->getDocUrl( $attribs['href'] ); |
— | — | @@ -1011,6 +1041,7 @@ |
1012 | 1042 | |
1013 | 1043 | /** |
1014 | 1044 | * Helper for "Download LocalSettings" link on WebInstall_Complete |
| 1045 | + * |
1015 | 1046 | * @return String Html for download link |
1016 | 1047 | */ |
1017 | 1048 | public function downloadLinkHook( $text, $attribs, $parser ) { |
Index: trunk/phase3/includes/installer/Installer.php |
— | — | @@ -354,6 +354,8 @@ |
355 | 355 | |
356 | 356 | /** |
357 | 357 | * Get a list of known DB types. |
| 358 | + * |
| 359 | + * @return array |
358 | 360 | */ |
359 | 361 | public static function getDBTypes() { |
360 | 362 | return self::$dbTypes; |
— | — | @@ -557,6 +559,9 @@ |
558 | 560 | return $html; |
559 | 561 | } |
560 | 562 | |
| 563 | + /** |
| 564 | + * @return ParserOptions |
| 565 | + */ |
561 | 566 | public function getParserOptions() { |
562 | 567 | return $this->parserOptions; |
563 | 568 | } |
— | — | @@ -573,6 +578,10 @@ |
574 | 579 | /** |
575 | 580 | * Install step which adds a row to the site_stats table with appropriate |
576 | 581 | * initial values. |
| 582 | + * |
| 583 | + * @param $installer DatabaseInstaller |
| 584 | + * |
| 585 | + * @return Status |
577 | 586 | */ |
578 | 587 | public function populateSiteStats( DatabaseInstaller $installer ) { |
579 | 588 | $status = $installer->getConnection(); |
Index: trunk/phase3/includes/installer/WebInstallerOutput.php |
— | — | @@ -139,22 +139,33 @@ |
140 | 140 | } |
141 | 141 | } |
142 | 142 | |
| 143 | + /** |
| 144 | + * @return string |
| 145 | + */ |
143 | 146 | public function getDir() { |
144 | 147 | global $wgLang; |
145 | | - if( !is_object( $wgLang ) || !$wgLang->isRtl() ) |
| 148 | + if( !is_object( $wgLang ) || !$wgLang->isRtl() ) { |
146 | 149 | return 'ltr'; |
147 | | - else |
| 150 | + } else { |
148 | 151 | return 'rtl'; |
| 152 | + } |
149 | 153 | } |
150 | 154 | |
| 155 | + /** |
| 156 | + * @return string |
| 157 | + */ |
151 | 158 | public function getLanguageCode() { |
152 | 159 | global $wgLang; |
153 | | - if( !is_object( $wgLang ) ) |
| 160 | + if( !is_object( $wgLang ) ) { |
154 | 161 | return 'en'; |
155 | | - else |
| 162 | + } else { |
156 | 163 | return $wgLang->getCode(); |
| 164 | + } |
157 | 165 | } |
158 | 166 | |
| 167 | + /** |
| 168 | + * @return array |
| 169 | + */ |
159 | 170 | public function getHeadAttribs() { |
160 | 171 | return array( |
161 | 172 | 'dir' => $this->getDir(), |
Index: trunk/phase3/includes/installer/DatabaseInstaller.php |
— | — | @@ -365,6 +365,8 @@ |
366 | 366 | |
367 | 367 | /** |
368 | 368 | * Get a labelled text box to configure a local variable. |
| 369 | + * |
| 370 | + * @return string |
369 | 371 | */ |
370 | 372 | public function getTextBox( $var, $label, $attribs = array(), $helpData = "" ) { |
371 | 373 | $name = $this->getName() . '_' . $var; |
— | — | @@ -385,6 +387,8 @@ |
386 | 388 | /** |
387 | 389 | * Get a labelled password box to configure a local variable. |
388 | 390 | * Implements password hiding. |
| 391 | + * |
| 392 | + * @return string |
389 | 393 | */ |
390 | 394 | public function getPasswordBox( $var, $label, $attribs = array(), $helpData = "" ) { |
391 | 395 | $name = $this->getName() . '_' . $var; |
— | — | @@ -404,6 +408,8 @@ |
405 | 409 | |
406 | 410 | /** |
407 | 411 | * Get a labelled checkbox to configure a local boolean variable. |
| 412 | + * |
| 413 | + * @return string |
408 | 414 | */ |
409 | 415 | public function getCheckBox( $var, $label, $attribs = array(), $helpData = "" ) { |
410 | 416 | $name = $this->getName() . '_' . $var; |
Index: trunk/phase3/includes/installer/CliInstaller.php |
— | — | @@ -131,6 +131,8 @@ |
132 | 132 | } |
133 | 133 | |
134 | 134 | /** |
| 135 | + * @param $params array |
| 136 | + * |
135 | 137 | * @return string |
136 | 138 | */ |
137 | 139 | protected function getMessageText( $params ) { |
Index: trunk/phase3/includes/installer/WebInstallerPage.php |
— | — | @@ -103,6 +103,8 @@ |
104 | 104 | * Get the starting tags of a fieldset. |
105 | 105 | * |
106 | 106 | * @param $legend String: message name |
| 107 | + * |
| 108 | + * @return string |
107 | 109 | */ |
108 | 110 | protected function getFieldsetStart( $legend ) { |
109 | 111 | return "\n<fieldset><legend>" . wfMsgHtml( $legend ) . "</legend>\n"; |
— | — | @@ -110,6 +112,8 @@ |
111 | 113 | |
112 | 114 | /** |
113 | 115 | * Get the end tag of a fieldset. |
| 116 | + * |
| 117 | + * @returns string |
114 | 118 | */ |
115 | 119 | protected function getFieldsetEnd() { |
116 | 120 | return "</fieldset>\n"; |
— | — | @@ -198,6 +202,8 @@ |
199 | 203 | |
200 | 204 | /** |
201 | 205 | * Get a <select> for selecting languages. |
| 206 | + * |
| 207 | + * @return string |
202 | 208 | */ |
203 | 209 | public function getLanguageSelector( $name, $label, $selectedCode ) { |
204 | 210 | global $wgDummyLanguageCodes; |