r53679 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53678‎ | r53679 | r53680 >
Date:17:14, 23 July 2009
Author:ialex
Status:deferred
Tags:
Comment:
* fix doxygen warnings
* fix wfReportTime()'s identation
Modified paths:
  • /trunk/phase3/includes/GlobalFunctions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/GlobalFunctions.php
@@ -76,10 +76,10 @@
7777 if( !function_exists( 'mb_strpos' ) ) {
7878 /**
7979 * Fallback implementation of mb_strpos, hardcoded to UTF-8.
80 - * @param string $haystack
81 - * @param string $needle
82 - * @param string $offset optional start position
83 - * @param string $encoding optional encoding; ignored
 80+ * @param $haystack String
 81+ * @param $needle String
 82+ * @param $offset String: optional start position
 83+ * @param $encoding String: optional encoding; ignored
8484 * @return int
8585 */
8686 function mb_strpos( $haystack, $needle, $offset = 0, $encoding="" ) {
@@ -99,10 +99,10 @@
100100 if( !function_exists( 'mb_strrpos' ) ) {
101101 /**
102102 * Fallback implementation of mb_strrpos, hardcoded to UTF-8.
103 - * @param string $haystack
104 - * @param string $needle
105 - * @param string $offset optional start position
106 - * @param string $encoding optional encoding; ignored
 103+ * @param $haystack String
 104+ * @param $needle String
 105+ * @param $offset String: optional start position
 106+ * @param $encoding String: optional encoding; ignored
107107 * @return int
108108 */
109109 function mb_strrpos( $haystack, $needle, $offset = 0, $encoding = "" ) {
@@ -295,7 +295,7 @@
296296
297297 /**
298298 * Send a line giving PHP memory usage.
299 - * @param $exact Bool : print exact values instead of kilobytes (default: false)
 299+ * @param $exact Bool: print exact values instead of kilobytes (default: false)
300300 */
301301 function wfDebugMem( $exact = false ) {
302302 $mem = memory_get_usage();
@@ -628,11 +628,11 @@
629629
630630 /**
631631 * Fetch a message string value, but don't replace any keys yet.
632 - * @param string $key
633 - * @param bool $useDB
634 - * @param string $langcode Code of the language to get the message for, or
635 - * behaves as a content language switch if it is a
636 - * boolean.
 632+ * @param $key String
 633+ * @param $useDB Bool
 634+ * @param $langCode String: Code of the language to get the message for, or
 635+ * behaves as a content language switch if it is a boolean.
 636+ * @param $transform Boolean: whether to parse magic words, etc.
637637 * @return string
638638 * @private
639639 */
@@ -667,8 +667,8 @@
668668 /**
669669 * Replace message parameter keys on the given formatted output.
670670 *
671 - * @param string $message
672 - * @param array $args
 671+ * @param $message String
 672+ * @param $args Array
673673 * @return string
674674 * @private
675675 */
@@ -699,7 +699,7 @@
700700 * to pre-escape them if you really do want plaintext, or just wrap
701701 * the whole thing in htmlspecialchars().
702702 *
703 - * @param string $key
 703+ * @param $key String
704704 * @param string ... parameters
705705 * @return string
706706 */
@@ -716,7 +716,7 @@
717717 * to pre-escape them if you really do want plaintext, or just wrap
718718 * the whole thing in htmlspecialchars().
719719 *
720 - * @param string $key
 720+ * @param $key String
721721 * @param string ... parameters
722722 * @return string
723723 */
@@ -729,8 +729,8 @@
730730
731731 /**
732732 * Returns message in the requested format
733 - * @param string $key Key of the message
734 - * @param array $options Processing rules. Can take the following options:
 733+ * @param $key String: key of the message
 734+ * @param $options Array: processing rules. Can take the following options:
735735 * <i>parse</i>: parses wikitext to html
736736 * <i>parseinline</i>: parses wikitext to html and removes the surrounding
737737 * p's added by parser or tidy
@@ -855,7 +855,7 @@
856856 /**
857857 * Print a simple message and die, returning nonzero to the shell if any.
858858 * Plain die() fails to return nonzero to the shell if you pass a string.
859 - * @param string $msg
 859+ * @param $msg String
860860 */
861861 function wfDie( $msg='' ) {
862862 echo $msg;
@@ -866,7 +866,7 @@
867867 * Throw a debugging exception. This function previously once exited the process,
868868 * but now throws an exception instead, with similar results.
869869 *
870 - * @param string $msg Message shown when dieing.
 870+ * @param $msg String: message shown when dieing.
871871 */
872872 function wfDebugDieBacktrace( $msg = '' ) {
873873 throw new MWException( $msg );
@@ -900,21 +900,21 @@
901901 return $host;
902902 }
903903
904 - /**
905 - * Returns a HTML comment with the elapsed time since request.
906 - * This method has no side effects.
907 - * @return string
908 - */
909 - function wfReportTime() {
910 - global $wgRequestTime, $wgShowHostnames;
 904+/**
 905+ * Returns a HTML comment with the elapsed time since request.
 906+ * This method has no side effects.
 907+ * @return string
 908+ */
 909+function wfReportTime() {
 910+ global $wgRequestTime, $wgShowHostnames;
911911
912 - $now = wfTime();
913 - $elapsed = $now - $wgRequestTime;
 912+ $now = wfTime();
 913+ $elapsed = $now - $wgRequestTime;
914914
915 - return $wgShowHostnames
916 - ? sprintf( "<!-- Served by %s in %01.3f secs. -->", wfHostname(), $elapsed )
917 - : sprintf( "<!-- Served in %01.3f secs. -->", $elapsed );
918 - }
 915+ return $wgShowHostnames
 916+ ? sprintf( "<!-- Served by %s in %01.3f secs. -->", wfHostname(), $elapsed )
 917+ : sprintf( "<!-- Served in %01.3f secs. -->", $elapsed );
 918+}
919919
920920 /**
921921 * Safety wrapper for debug_backtrace().
@@ -1022,11 +1022,11 @@
10231023
10241024 /**
10251025 * Generate (prev x| next x) (20|50|100...) type links for paging
1026 - * @param $offset string
1027 - * @param $limit int
1028 - * @param $link string
1029 - * @param $query string, optional URL query parameter string
1030 - * @param $atend bool, optional param for specified if this is the last page
 1026+ * @param $offset String
 1027+ * @param $limit Integer
 1028+ * @param $link String
 1029+ * @param $query String: optional URL query parameter string
 1030+ * @param $atend Bool: optional param for specified if this is the last page
10311031 */
10321032 function wfViewPrevNext( $offset, $limit, $link, $query = '', $atend = false ) {
10331033 global $wgLang;
@@ -1083,10 +1083,10 @@
10841084
10851085 /**
10861086 * Generate links for (20|50|100...) items-per-page links
1087 - * @param $offset string
1088 - * @param $limit int
 1087+ * @param $offset String
 1088+ * @param $limit Integer
10891089 * @param $title Title
1090 - * @param $query string, optional URL query parameter string
 1090+ * @param $query String: optional URL query parameter string
10911091 */
10921092 function wfNumLink( $offset, $limit, $title, $query = '' ) {
10931093 global $wgLang;
@@ -1147,7 +1147,7 @@
11481148 * not filter out characters which have special meaning only at the
11491149 * start of a line, such as "*".
11501150 *
1151 - * @param string $text Text to be escaped
 1151+ * @param $text String: text to be escaped
11521152 */
11531153 function wfEscapeWikiText( $text ) {
11541154 $text = str_replace(
@@ -1258,7 +1258,7 @@
12591259 * arrays. Of course, keys and values are urldecode()d. Don't try passing in-
12601260 * valid query strings, or it will explode.
12611261 *
1262 - * @param $query string Query string
 1262+ * @param $query String: query string
12631263 * @return array Array version of input
12641264 */
12651265 function wfCgiToArray( $query ) {
@@ -1283,8 +1283,8 @@
12841284 * Append a query string to an existing URL, which may or may not already
12851285 * have query string parameters already. If so, they will be combined.
12861286 *
1287 - * @param string $url
1288 - * @param mixed $query String or associative array
 1287+ * @param $url String
 1288+ * @param $query Mixed: string or associative array
12891289 * @return string
12901290 */
12911291 function wfAppendQuery( $url, $query ) {
@@ -1305,7 +1305,7 @@
13061306 /**
13071307 * Expand a potentially local URL to a fully-qualified URL.
13081308 * Assumes $wgServer is correct. :)
1309 - * @param string $url, either fully-qualified or a local path + query
 1309+ * @param $url String: either fully-qualified or a local path + query
13101310 * @return string Fully-qualified URL
13111311 */
13121312 function wfExpandUrl( $url ) {
@@ -1440,10 +1440,10 @@
14411441 /**
14421442 * Returns unified plain-text diff of two texts.
14431443 * Useful for machine processing of diffs.
1444 - * @param $before string The text before the changes.
1445 - * @param $after string The text after the changes.
1446 - * @param $params string Command-line options for the diff command.
1447 - * @return string Unified diff of $before and $after
 1444+ * @param $before String: the text before the changes.
 1445+ * @param $after String: the text after the changes.
 1446+ * @param $params String: command-line options for the diff command.
 1447+ * @return String: unified diff of $before and $after
14481448 */
14491449 function wfDiff( $before, $after, $params = '-u' ) {
14501450 if ($before == $after) {
@@ -1555,7 +1555,7 @@
15561556 * Note that some PHP configuration options may add output buffer
15571557 * layers which cannot be removed; these are left in place.
15581558 *
1559 - * @param bool $resetGzipEncoding
 1559+ * @param $resetGzipEncoding Bool
15601560 */
15611561 function wfResetOutputBuffers( $resetGzipEncoding=true ) {
15621562 if( $resetGzipEncoding ) {
@@ -1640,8 +1640,8 @@
16411641 * Returns the matching MIME type (or wildcard) if a match, otherwise
16421642 * NULL if no match.
16431643 *
1644 - * @param string $type
1645 - * @param array $avail
 1644+ * @param $type String
 1645+ * @param $avail Array
16461646 * @return string
16471647 * @private
16481648 */
@@ -1666,8 +1666,8 @@
16671667 * array of type to preference (preference is a float between 0.0 and 1.0).
16681668 * Wildcards in the types are acceptable.
16691669 *
1670 - * @param array $cprefs Client's acceptable type list
1671 - * @param array $sprefs Server's offered types
 1670+ * @param $cprefs Array: client's acceptable type list
 1671+ * @param $sprefs Array: server's offered types
16721672 * @return string
16731673 *
16741674 * @todo FIXME: doesn't handle params like 'text/plain; charset=UTF-8'
@@ -1812,12 +1812,13 @@
18131813 define('TS_DB2', 8);
18141814
18151815 /**
1816 - * @param mixed $outputtype A timestamp in one of the supported formats, the
1817 - * function will autodetect which format is supplied
1818 - * and act accordingly.
1819 - * @return string Time in the format specified in $outputtype
 1816+ * @param $outputtype Mixed: A timestamp in one of the supported formats, the
 1817+ * function will autodetect which format is supplied and act
 1818+ * accordingly.
 1819+ * @param $ts Mixed: the timestamp to convert or 0 for the current timestamp
 1820+ * @return String: in the format specified in $outputtype
18201821 */
1821 -function wfTimestamp($outputtype=TS_UNIX,$ts=0) {
 1822+function wfTimestamp( $outputtype = TS_UNIX, $ts = 0 ) {
18221823 $uts = 0;
18231824 $da = array();
18241825 if ($ts==0) {
@@ -1883,9 +1884,9 @@
18841885 /**
18851886 * Return a formatted timestamp, or null if input is null.
18861887 * For dealing with nullable timestamp columns in the database.
1887 - * @param int $outputtype
1888 - * @param string $ts
1889 - * @return string
 1888+ * @param $outputtype Integer
 1889+ * @param $ts String
 1890+ * @return String
18901891 */
18911892 function wfTimestampOrNull( $outputtype = TS_UNIX, $ts = null ) {
18921893 if( is_null( $ts ) ) {
@@ -1898,7 +1899,7 @@
18991900 /**
19001901 * Check if the operating system is Windows
19011902 *
1902 - * @return bool True if it's Windows, False otherwise.
 1903+ * @return Bool: true if it's Windows, False otherwise.
19031904 */
19041905 function wfIsWindows() {
19051906 if (substr(php_uname(), 0, 7) == 'Windows') {
@@ -2033,7 +2034,7 @@
20342035 * NOTE: When possible, use the tempfile() function to create temporary
20352036 * files to avoid race conditions on file creation, etc.
20362037 *
2037 - * @return string
 2038+ * @return String
20382039 */
20392040 function wfTempDir() {
20402041 foreach( array( 'TMPDIR', 'TMP', 'TEMP' ) as $var ) {
@@ -2049,9 +2050,9 @@
20502051 /**
20512052 * Make directory, and make all parent directories if they don't exist
20522053 *
2053 - * @param string $dir Full path to directory to create
2054 - * @param int $mode Chmod value to use, default is $wgDirectoryMode
2055 - * @param string $caller Optional caller param for debugging.
 2054+ * @param $dir String: full path to directory to create
 2055+ * @param $mode Integer: chmod value to use, default is $wgDirectoryMode
 2056+ * @param $caller String: optional caller param for debugging.
20562057 * @return bool
20572058 */
20582059 function wfMkdirParents( $dir, $mode = null, $caller = null ) {
@@ -2100,9 +2101,9 @@
21012102 }
21022103
21032104 /**
2104 - * @param mixed $nr The number to format
2105 - * @param int $acc The number of digits after the decimal point, default 2
2106 - * @param bool $round Whether or not to round the value, default true
 2105+ * @param $nr Mixed: the number to format
 2106+ * @param $acc Integer: the number of digits after the decimal point, default 2
 2107+ * @param $round Boolean: whether or not to round the value, default true
21072108 * @return float
21082109 */
21092110 function wfPercent( $nr, $acc = 2, $round = true ) {
@@ -2113,9 +2114,9 @@
21142115 /**
21152116 * Encrypt a username/password.
21162117 *
2117 - * @param string $userid ID of the user
2118 - * @param string $password Password of the user
2119 - * @return string Hashed password
 2118+ * @param $userid Integer: ID of the user
 2119+ * @param $password String: password of the user
 2120+ * @return String: hashed password
21202121 * @deprecated Use User::crypt() or User::oldCrypt() instead
21212122 */
21222123 function wfEncryptPassword( $userid, $password ) {
@@ -2141,9 +2142,9 @@
21422143 * looked up didn't exist but a XHTML string, this function checks for the
21432144 * nonexistance of messages by looking at wfMsg() output
21442145 *
2145 - * @param $msg The message key looked up
2146 - * @param $wfMsgOut The output of wfMsg*()
2147 - * @return bool
 2146+ * @param $msg String: the message key looked up
 2147+ * @param $wfMsgOut String: the output of wfMsg*()
 2148+ * @return Boolean
21482149 */
21492150 function wfEmptyMsg( $msg, $wfMsgOut ) {
21502151 return $wfMsgOut === htmlspecialchars( "<$msg>" );
@@ -2152,9 +2153,9 @@
21532154 /**
21542155 * Find out whether or not a mixed variable exists in a string
21552156 *
2156 - * @param mixed needle
2157 - * @param string haystack
2158 - * @return bool
 2157+ * @param $needle String
 2158+ * @param $str String
 2159+ * @return Boolean
21592160 */
21602161 function in_string( $needle, $str ) {
21612162 return strpos( $str, $needle ) !== false;
@@ -2169,7 +2170,7 @@
21702171 /**
21712172 * Returns a regular expression of url protocols
21722173 *
2173 - * @return string
 2174+ * @return String
21742175 */
21752176 function wfUrlProtocols() {
21762177 global $wgUrlProtocols;
@@ -2207,8 +2208,8 @@
22082209 *
22092210 * I frickin' hate PHP... :P
22102211 *
2211 - * @param string $setting
2212 - * @return bool
 2212+ * @param $setting String
 2213+ * @return Bool
22132214 */
22142215 function wfIniGetBool( $setting ) {
22152216 $val = ini_get( $setting );
@@ -2281,10 +2282,11 @@
22822283 }
22832284 return $output;
22842285 }
 2286+
22852287 /**
22862288 * Executes a shell command in the background. Passes back the PID of the operation
22872289 *
2288 - * @param string $cmd
 2290+ * @param $cmd String
22892291 */
22902292 function wfShellBackgroundExec( $cmd ){
22912293 wfDebug( "wfShellBackgroundExec: $cmd\n" );
@@ -2296,6 +2298,7 @@
22972299 $pid = shell_exec( "nohup $cmd > /dev/null & echo $!" );
22982300 return $pid;
22992301 }
 2302+
23002303 /**
23012304 * Checks if the current instance can execute a shell command
23022305 *
@@ -2314,6 +2317,7 @@
23152318 }
23162319 return true;
23172320 }
 2321+
23182322 /**
23192323 * Workaround for http://bugs.php.net/bug.php?id=45132
23202324 * escapeshellarg() destroys non-ASCII characters if LANG is not a UTF-8 locale
@@ -2341,8 +2345,8 @@
23422346 *
23432347 * @see perldoc -f use
23442348 *
2345 - * @param mixed $version The version to check, can be a string, an integer, or
2346 - * a float
 2349+ * @param $req_ver Mixed: the version to check, can be a string, an integer, or
 2350+ * a float
23472351 */
23482352 function wfUsePHP( $req_ver ) {
23492353 $php_ver = PHP_VERSION;
@@ -2361,8 +2365,8 @@
23622366 *
23632367 * @see perldoc -f use
23642368 *
2365 - * @param mixed $version The version to check, can be a string, an integer, or
2366 - * a float
 2369+ * @param $req_ver Mixed: the version to check, can be a string, an integer, or
 2370+ * a float
23672371 */
23682372 function wfUseMW( $req_ver ) {
23692373 global $wgVersion;
@@ -2386,9 +2390,9 @@
23872391 * PHP's basename() only considers '\' a pathchar on Windows and Netware.
23882392 * We'll consider it so always, as we don't want \s in our Unix paths either.
23892393 *
2390 - * @param string $path
2391 - * @param string $suffix to remove if present
2392 - * @return string
 2394+ * @param $path String
 2395+ * @param $suffix String: to remove if present
 2396+ * @return String
23932397 */
23942398 function wfBaseName( $path, $suffix='' ) {
23952399 $encSuffix = ($suffix == '')
@@ -2407,9 +2411,9 @@
24082412 * May explode on non-matching case-insensitive paths,
24092413 * funky symlinks, etc.
24102414 *
2411 - * @param string $path Absolute destination path including target filename
2412 - * @param string $from Absolute source path, directory only
2413 - * @return string
 2415+ * @param $path String: absolute destination path including target filename
 2416+ * @param $from String: Absolute source path, directory only
 2417+ * @return String
24142418 */
24152419 function wfRelativePath( $path, $from ) {
24162420 // Normalize mixed input on Windows...
@@ -2451,8 +2455,9 @@
24522456 * Backwards array plus for people who haven't bothered to read the PHP manual
24532457 * XXX: will not darn your socks for you.
24542458 *
2455 - * @param array $array1, [$array2, [...]]
2456 - * @return array
 2459+ * @param $array1 Array
 2460+ * @param [$array2, [...]] Arrays
 2461+ * @return Array
24572462 */
24582463 function wfArrayMerge( $array1/* ... */ ) {
24592464 $args = func_get_args();
@@ -2499,8 +2504,8 @@
25002505 * 2) Handles protocols that don't use :// (e.g., mailto: and news:) correctly
25012506 * 3) Adds a "delimiter" element to the array, either '://' or ':' (see (2))
25022507 *
2503 - * @param string $url A URL to parse
2504 - * @return array Bits of the URL in an associative array, per PHP docs
 2508+ * @param $url String: a URL to parse
 2509+ * @return Array: bits of the URL in an associative array, per PHP docs
25052510 */
25062511 function wfParseUrl( $url ) {
25072512 global $wgUrlProtocols; // Allow all protocols defined in DefaultSettings/LocalSettings.php
@@ -2600,12 +2605,12 @@
26012606 * Supports base 2 through 36; digit values 10-36 are represented
26022607 * as lowercase letters a-z. Input is case-insensitive.
26032608 *
2604 - * @param $input string of digits
2605 - * @param $sourceBase int 2-36
2606 - * @param $destBase int 2-36
2607 - * @param $pad int 1 or greater
2608 - * @param $lowercase bool
2609 - * @return string or false on invalid input
 2609+ * @param $input String: of digits
 2610+ * @param $sourceBase Integer: 2-36
 2611+ * @param $destBase Integer: 2-36
 2612+ * @param $pad Integer: 1 or greater
 2613+ * @param $lowercase Boolean
 2614+ * @return String or false on invalid input
26102615 */
26112616 function wfBaseConvert( $input, $sourceBase, $destBase, $pad=1, $lowercase=true ) {
26122617 $input = strval( $input );
@@ -2682,8 +2687,8 @@
26832688
26842689 /**
26852690 * Create an object with a given name and an array of construct parameters
2686 - * @param string $name
2687 - * @param array $p parameters
 2691+ * @param $name String
 2692+ * @param $p Array: parameters
26882693 */
26892694 function wfCreateObject( $name, $p ){
26902695 $p = array_values( $p );
@@ -2781,7 +2786,7 @@
27822787 /**
27832788 * Get an object from the precompiled serialized directory
27842789 *
2785 - * @return mixed The variable on success, false on failure
 2790+ * @return Mixed: the variable on success, false on failure
27862791 */
27872792 function wfGetPrecompiledData( $name ) {
27882793 global $IP;
@@ -2806,12 +2811,17 @@
28072812 return $caller;
28082813 }
28092814
2810 -/** Return a string consisting all callers in stack, somewhat useful sometimes for profiling specific points */
 2815+/**
 2816+ * Return a string consisting all callers in stack, somewhat useful sometimes
 2817+ * for profiling specific points
 2818+ */
28112819 function wfGetAllCallers() {
28122820 return implode('/', array_map('wfFormatStackFrame',array_reverse(wfDebugBacktrace())));
28132821 }
28142822
2815 -/** Return a string representation of frame */
 2823+/**
 2824+ * Return a string representation of frame
 2825+ */
28162826 function wfFormatStackFrame($frame) {
28172827 return isset( $frame["class"] )?
28182828 $frame["class"]."::".$frame["function"]:
@@ -2866,15 +2876,15 @@
28672877
28682878 /*
28692879 * Get a Database object.
2870 - * @param integer $db Index of the connection to get. May be DB_MASTER for the
2871 - * master (for write queries), DB_SLAVE for potentially lagged
2872 - * read queries, or an integer >= 0 for a particular server.
 2880+ * @param $db Integer: index of the connection to get. May be DB_MASTER for the
 2881+ * master (for write queries), DB_SLAVE for potentially lagged read
 2882+ * queries, or an integer >= 0 for a particular server.
28732883 *
2874 - * @param mixed $groups Query groups. An array of group names that this query
2875 - * belongs to. May contain a single string if the query is only
2876 - * in one group.
 2884+ * @param $groups Mixed: query groups. An array of group names that this query
 2885+ * belongs to. May contain a single string if the query is only
 2886+ * in one group.
28772887 *
2878 - * @param string $wiki The wiki ID, or false for the current wiki
 2888+ * @param $wiki String: the wiki ID, or false for the current wiki
28792889 *
28802890 * Note: multiple calls to wfGetDB(DB_SLAVE) during the course of one request
28812891 * will always return the same object, unless the underlying connection or load
@@ -2887,8 +2897,7 @@
28882898 /**
28892899 * Get a load balancer object.
28902900 *
2891 - * @param array $groups List of query groups
2892 - * @param string $wiki Wiki ID, or false for the current wiki
 2901+ * @param $wiki String: wiki ID, or false for the current wiki
28932902 * @return LoadBalancer
28942903 */
28952904 function wfGetLB( $wiki = false ) {
@@ -2905,12 +2914,12 @@
29062915 /**
29072916 * Find a file.
29082917 * Shortcut for RepoGroup::singleton()->findFile()
2909 - * @param mixed $title Title object or string. May be interwiki.
2910 - * @param mixed $time Requested time for an archived image, or false for the
2911 - * current version. An image object will be returned which
2912 - * was created at the specified time.
2913 - * @param mixed $flags FileRepo::FIND_ flags
2914 - * @param boolean $bypass Bypass the file cache even if it could be used
 2918+ * @param $title Title object or string. May be interwiki.
 2919+ * @param $time Mixed: requested time for an archived image, or false for the
 2920+ * current version. An image object will be returned which was
 2921+ * created at the specified time.
 2922+ * @param $flags Mixed: FileRepo::FIND_ flags
 2923+ * @param $bypass Boolean: bypass the file cache even if it could be used
29152924 * @return File, or false if the file does not exist
29162925 */
29172926 function wfFindFile( $title, $time = false, $flags = 0, $bypass = false ) {
@@ -2932,7 +2941,7 @@
29332942 /**
29342943 * Should low-performance queries be disabled?
29352944 *
2936 - * @return bool
 2945+ * @return Boolean
29372946 */
29382947 function wfQueriesMustScale() {
29392948 global $wgMiserMode;
@@ -2946,8 +2955,8 @@
29472956 * Get the path to a specified script file, respecting file
29482957 * extensions; this is a wrapper around $wgScriptExtension etc.
29492958 *
2950 - * @param string $script Script filename, sans extension
2951 - * @return string
 2959+ * @param $script String: script filename, sans extension
 2960+ * @return String
29522961 */
29532962 function wfScript( $script = 'index' ) {
29542963 global $wgScriptPath, $wgScriptExtension;
@@ -2980,8 +2989,8 @@
29812990 * Convenience function converts boolean values into "true"
29822991 * or "false" (string) values
29832992 *
2984 - * @param bool $value
2985 - * @return string
 2993+ * @param $value Boolean
 2994+ * @return String
29862995 */
29872996 function wfBoolToStr( $value ) {
29882997 return $value ? 'true' : 'false';
@@ -3009,9 +3018,9 @@
30103019 /**
30113020 * Displays a maxlag error
30123021 *
3013 - * @param string $host Server that lags the most
3014 - * @param int $lag Maxlag (actual)
3015 - * @param int $maxLag Maxlag (requested)
 3022+ * @param $host String: server that lags the most
 3023+ * @param $lag Integer: maxlag (actual)
 3024+ * @param $maxLag Integer: maxlag (requested)
30163025 */
30173026 function wfMaxlagError( $host, $lag, $maxLag ) {
30183027 global $wgShowHostnames;
@@ -3028,7 +3037,7 @@
30293038
30303039 /**
30313040 * Throws a warning that $function is deprecated
3032 - * @param string $function
 3041+ * @param $function String
30333042 * @return null
30343043 */
30353044 function wfDeprecated( $function ) {
@@ -3074,7 +3083,7 @@
30753084 * that effect (and then sleep for a little while), so it's probably not best
30763085 * to use this outside maintenance scripts in its present form.
30773086 *
3078 - * @param int $maxLag
 3087+ * @param $maxLag Integer
30793088 * @return null
30803089 */
30813090 function wfWaitForSlaves( $maxLag ) {
@@ -3127,7 +3136,8 @@
31283137 }
31293138
31303139 /** Generate a random 32-character hexadecimal token.
3131 - * @param mixed $salt Some sort of salt, if necessary, to add to random characters before hashing.
 3140+ * @param $salt Mixed: some sort of salt, if necessary, to add to random
 3141+ * characters before hashing.
31323142 */
31333143 function wfGenerateToken( $salt = '' ) {
31343144 $salt = serialize($salt);
@@ -3137,7 +3147,7 @@
31383148
31393149 /**
31403150 * Replace all invalid characters with -
3141 - * @param mixed $title Filename to process
 3151+ * @param $name Mixed: filename to process
31423152 */
31433153 function wfStripIllegalFilenameChars( $name ) {
31443154 $name = wfBaseName( $name );
@@ -3146,11 +3156,11 @@
31473157 }
31483158
31493159 /**
3150 - * Insert array into another array after the specified *KEY*
3151 - * @param array $array The array.
3152 - * @param array $insert The array to insert.
3153 - * @param mixed $after The key to insert after
3154 - */
 3160+ * Insert array into another array after the specified *KEY*
 3161+ * @param $array Array: The array.
 3162+ * @param $insert Array: The array to insert.
 3163+ * @param $after Mixed: The key to insert after
 3164+ */
31553165 function wfArrayInsertAfter( $array, $insert, $after ) {
31563166 // Find the offset of the element to insert after.
31573167 $keys = array_keys($array);

Status & tagging log