r63832 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63831‎ | r63832 | r63833 >
Date:20:17, 16 March 2010
Author:ialex
Status:ok
Tags:
Comment:
Fixed some doxygen warnings
Modified paths:
  • /trunk/phase3/maintenance/parserTests.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/parserTests.inc
@@ -270,8 +270,8 @@
271271 * Prints status updates on stdout and counts up the total
272272 * number and percentage of passed tests.
273273 *
274 - * @param array of strings $filenames
275 - * @return bool True if passed all tests, false if any tests failed.
 274+ * @param $filenames Array of strings
 275+ * @return Boolean: true if passed all tests, false if any tests failed.
276276 */
277277 public function runTestsFromFiles( $filenames ) {
278278 $this->recorder->start();
@@ -323,9 +323,12 @@
324324 * and compare the output against the expected results.
325325 * Prints status and explanatory messages to stdout.
326326 *
327 - * @param string $input Wikitext to try rendering
328 - * @param string $result Result to output
329 - * @return bool
 327+ * @param $desc String: test's description
 328+ * @param $input String: wikitext to try rendering
 329+ * @param $result String: result to output
 330+ * @param $opts Array: test's options
 331+ * @param $config String: overrides for global variables, one per line
 332+ * @return Boolean
330333 */
331334 public function runTest( $desc, $input, $result, $opts, $config ) {
332335 if( $this->showProgress ) {
@@ -405,9 +408,9 @@
406409
407410 /**
408411 * Use a regex to find out the value of an option
409 - * @param $key name of option val to retrieve
 412+ * @param $key String: name of option val to retrieve
410413 * @param $opts Options array to look in
411 - * @param $defaults Default value returned if not found
 414+ * @param $default Mixed: default value returned if not found
412415 */
413416 private static function getOptionValue( $key, $opts, $default ) {
414417 $key = strtolower( $key );
@@ -791,7 +794,8 @@
792795 /**
793796 * Create a dummy uploads directory which will contain a couple
794797 * of files in order to pass existence tests.
795 - * @return string The directory
 798+ *
 799+ * @return String: the directory
796800 */
797801 private function setupUploadDir() {
798802 global $IP;
@@ -880,7 +884,7 @@
881885
882886 /**
883887 * Delete the specified files, if they exist.
884 - * @param array $files full paths to files to delete.
 888+ * @param $files Array: full paths to files to delete.
885889 */
886890 private static function deleteFiles( $files ) {
887891 foreach( $files as $file ) {
@@ -892,7 +896,7 @@
893897
894898 /**
895899 * Delete the specified directories, if they exist. Must be empty.
896 - * @param array $dirs full paths to directories to delete.
 900+ * @param $dirs Array: full paths to directories to delete.
897901 */
898902 private static function deleteDirs( $dirs ) {
899903 foreach( $dirs as $dir ) {
@@ -912,8 +916,8 @@
913917 /**
914918 * Print a happy success message.
915919 *
916 - * @param string $desc The test name
917 - * @return bool
 920+ * @param $desc String: the test name
 921+ * @return Boolean
918922 */
919923 protected function showSuccess( $desc ) {
920924 if( $this->showProgress ) {
@@ -926,10 +930,10 @@
927931 * Print a failure message and provide some explanatory output
928932 * about what went wrong if so configured.
929933 *
930 - * @param string $desc The test name
931 - * @param string $result Expected HTML output
932 - * @param string $html Actual HTML output
933 - * @return bool
 934+ * @param $desc String: the test name
 935+ * @param $result String: expected HTML output
 936+ * @param $html String: actual HTML output
 937+ * @return Boolean
934938 */
935939 protected function showFailure( $desc, $result, $html ) {
936940 if( $this->showFailure ) {
@@ -956,11 +960,11 @@
957961 * Run given strings through a diff and return the (colorized) output.
958962 * Requires writable /tmp directory and a 'diff' command in the PATH.
959963 *
960 - * @param string $input
961 - * @param string $output
962 - * @param string $inFileTail Tailing for the input file name
963 - * @param string $outFileTail Tailing for the output file name
964 - * @return string
 964+ * @param $input String
 965+ * @param $output String
 966+ * @param $inFileTail String: tailing for the input file name
 967+ * @param $outFileTail String: tailing for the output file name
 968+ * @return String
965969 */
966970 protected function quickDiff( $input, $output, $inFileTail='expected', $outFileTail='actual' ) {
967971 $prefix = wfTempDir() . "/mwParser-" . mt_rand();
@@ -981,8 +985,8 @@
982986 /**
983987 * Write the given string to a file, adding a final newline.
984988 *
985 - * @param string $data
986 - * @param string $filename
 989+ * @param $data String
 990+ * @param $filename String
987991 */
988992 private function dumpToFile( $data, $filename ) {
989993 $file = fopen( $filename, "wt" );
@@ -994,8 +998,8 @@
995999 * Colorize unified diff output if set for ANSI color output.
9961000 * Subtractions are colored blue, additions red.
9971001 *
998 - * @param string $text
999 - * @return string
 1002+ * @param $text String
 1003+ * @return String
10001004 */
10011005 protected function colorDiff( $text ) {
10021006 return preg_replace(
@@ -1008,7 +1012,7 @@
10091013 /**
10101014 * Show "Reading tests from ..."
10111015 *
1012 - * @param String $path
 1016+ * @param $path String
10131017 */
10141018 public function showRunFile( $path ){
10151019 print $this->term->color( 1 ) .
@@ -1019,9 +1023,9 @@
10201024
10211025 /**
10221026 * Insert a temporary test article
1023 - * @param string $name the title, including any prefix
1024 - * @param string $text the article text
1025 - * @param int $line the input line number, for reporting errors
 1027+ * @param $name String: the title, including any prefix
 1028+ * @param $text String: the article text
 1029+ * @param $line Integer: the input line number, for reporting errors
10261030 */
10271031 public function addArticle($name, $text, $line) {
10281032 $this->setupGlobals();
@@ -1045,7 +1049,8 @@
10461050 * Steal a callback function from the primary parser, save it for
10471051 * application to our scary parser. If the hook is not installed,
10481052 * die a painful dead to warn the others.
1049 - * @param string $name
 1053+ *
 1054+ * @param $name String
10501055 */
10511056 public function requireHook( $name ) {
10521057 global $wgParser;
@@ -1061,7 +1066,8 @@
10621067 * Steal a callback function from the primary parser, save it for
10631068 * application to our scary parser. If the hook is not installed,
10641069 * die a painful dead to warn the others.
1065 - * @param string $name
 1070+ *
 1071+ * @param $name String
10661072 */
10671073 private function requireFunctionHook( $name ) {
10681074 global $wgParser;
@@ -1077,8 +1083,8 @@
10781084 * Run the "tidy" command on text if the $wgUseTidy
10791085 * global is true
10801086 *
1081 - * @param string $text the text to tidy
1082 - * @return string
 1087+ * @param $text String: the text to tidy
 1088+ * @return String
10831089 * @static
10841090 */
10851091 private function tidy( $text ) {
@@ -1145,8 +1151,8 @@
11461152 /**
11471153 * Return ANSI terminal escape code for changing text attribs/color
11481154 *
1149 - * @param string $color Semicolon-separated list of attribute/color codes
1150 - * @return string
 1155+ * @param $color String: semicolon-separated list of attribute/color codes
 1156+ * @return String
11511157 */
11521158 public function color( $color ) {
11531159 global $wgCommandLineDarkBg;
@@ -1157,7 +1163,7 @@
11581164 /**
11591165 * Return ANSI terminal escape code for restoring default text attributes
11601166 *
1161 - * @return string
 1167+ * @return String
11621168 */
11631169 public function reset() {
11641170 return $this->color( 0 );
@@ -1451,8 +1457,9 @@
14521458
14531459 /**
14541460 * Record an individual test item's success or failure to the db
1455 - * @param string $test
1456 - * @param bool $result
 1461+ *
 1462+ * @param $test String
 1463+ * @param $result Boolean
14571464 */
14581465 function record( $test, $result ) {
14591466 parent::record( $test, $result );
@@ -1485,11 +1492,11 @@
14861493
14871494 /**
14881495 * Inform a CodeReview instance that we've started or completed a test run...
1489 - * @param $remote array: info on remote target
 1496+ *
14901497 * @param $status string: "running" - tell it we've started
14911498 * "complete" - provide test results array
14921499 * "abort" - something went horribly awry
1493 - * @param $data array of test name => true/false
 1500+ * @param $results array of test name => true/false
14941501 */
14951502 function ping( $status, $results=false ) {
14961503 global $wgParserTestRemote, $IP;

Status & tagging log