Index: trunk/phase3/includes/Export.php |
— | — | @@ -507,6 +507,7 @@ |
508 | 508 | * Closes a <page> section on the output stream. |
509 | 509 | * |
510 | 510 | * @access private |
| 511 | + * @return string |
511 | 512 | */ |
512 | 513 | function closePage() { |
513 | 514 | return " </page>\n"; |
— | — | @@ -633,6 +634,7 @@ |
634 | 635 | |
635 | 636 | /** |
636 | 637 | * Warning! This data is potentially inconsistent. :( |
| 638 | + * @return string |
637 | 639 | */ |
638 | 640 | function writeUploads( $row, $dumpContents = false ) { |
639 | 641 | if ( $row->page_namespace == NS_IMAGE ) { |
— | — | @@ -773,6 +775,7 @@ |
774 | 776 | /** |
775 | 777 | * Returns the name of the file or files which are |
776 | 778 | * being written to, if there are any. |
| 779 | + * @return null |
777 | 780 | */ |
778 | 781 | function getFilenames() { |
779 | 782 | return NULL; |
Index: trunk/phase3/includes/FeedUtils.php |
— | — | @@ -165,6 +165,7 @@ |
166 | 166 | * @param $title Title object: used to generate the diff URL |
167 | 167 | * @param $newid Integer newid for this diff |
168 | 168 | * @param $oldid Integer|null oldid for the diff. Null means it is a new article |
| 169 | + * @return string |
169 | 170 | */ |
170 | 171 | protected static function getDiffLink( Title $title, $newid, $oldid = null ) { |
171 | 172 | $queryParameters = ($oldid == null) |
Index: trunk/phase3/includes/CategoryViewer.php |
— | — | @@ -172,7 +172,8 @@ |
173 | 173 | * |
174 | 174 | * @param Title $title |
175 | 175 | * @param string $sortkey The human-readable sortkey (before transforming to icu or whatever). |
176 | | - */ |
| 176 | + * @return string |
| 177 | + */ |
177 | 178 | function getSubcategorySortChar( $title, $sortkey ) { |
178 | 179 | global $wgContLang; |
179 | 180 | |
Index: trunk/phase3/includes/ImageGallery.php |
— | — | @@ -168,6 +168,7 @@ |
169 | 169 | |
170 | 170 | /** |
171 | 171 | * isEmpty() returns true if the gallery contains no images |
| 172 | + * @return bool |
172 | 173 | */ |
173 | 174 | function isEmpty() { |
174 | 175 | return empty( $this->mImages ); |
— | — | @@ -215,6 +216,7 @@ |
216 | 217 | * - the additional text provided when adding the image |
217 | 218 | * - the size of the image |
218 | 219 | * |
| 220 | + * @return string |
219 | 221 | */ |
220 | 222 | function toHTML() { |
221 | 223 | global $wgLang; |
Index: trunk/phase3/includes/AjaxResponse.php |
— | — | @@ -141,6 +141,7 @@ |
142 | 142 | * possible. If sucessful, the AjaxResponse is disabled so that |
143 | 143 | * any future call to AjaxResponse::printText() have no effect. The method |
144 | 144 | * returns true iff the response code was set to 304 Not Modified. |
| 145 | + * @return bool |
145 | 146 | */ |
146 | 147 | function checkLastModified ( $timestamp ) { |
147 | 148 | global $wgCachePages, $wgCacheEpoch, $wgUser; |
Index: trunk/phase3/includes/ExternalStoreDB.php |
— | — | @@ -73,6 +73,7 @@ |
74 | 74 | /** |
75 | 75 | * Fetch data from given URL |
76 | 76 | * @param $url String: an url of the form DB://cluster/id or DB://cluster/id/itemid for concatened storage. |
| 77 | + * @return mixed |
77 | 78 | */ |
78 | 79 | function fetchFromURL( $url ) { |
79 | 80 | $path = explode( '/', $url ); |
Index: trunk/phase3/includes/Category.php |
— | — | @@ -231,7 +231,10 @@ |
232 | 232 | ); |
233 | 233 | } |
234 | 234 | |
235 | | - /** Generic accessor */ |
| 235 | + /** |
| 236 | + * Generic accessor |
| 237 | + * @return bool |
| 238 | + */ |
236 | 239 | private function getX( $key ) { |
237 | 240 | if ( !$this->initialize() ) { |
238 | 241 | return false; |
Index: trunk/phase3/includes/ImagePage.php |
— | — | @@ -30,6 +30,7 @@ |
31 | 31 | /** |
32 | 32 | * Constructor from a page id |
33 | 33 | * @param $id Int article ID to load |
| 34 | + * @returnImagePage|null |
34 | 35 | */ |
35 | 36 | public static function newFromID( $id ) { |
36 | 37 | $t = Title::newFromID( $id ); |
Index: trunk/phase3/includes/CategoryPage.php |
— | — | @@ -29,6 +29,7 @@ |
30 | 30 | /** |
31 | 31 | * Constructor from a page id |
32 | 32 | * @param $id Int article ID to load |
| 33 | + * @return CategoryPage|null |
33 | 34 | */ |
34 | 35 | public static function newFromID( $id ) { |
35 | 36 | $t = Title::newFromID( $id ); |
Index: trunk/phase3/includes/AuthPlugin.php |
— | — | @@ -103,6 +103,7 @@ |
104 | 104 | * forget the & on your function declaration. |
105 | 105 | * |
106 | 106 | * @param $user User object |
| 107 | + * @return bool |
107 | 108 | */ |
108 | 109 | public function updateUser( &$user ) { |
109 | 110 | # Override this and do something |
Index: trunk/phase3/includes/diff/DifferenceEngine.php |
— | — | @@ -672,6 +672,7 @@ |
673 | 673 | * |
674 | 674 | * @param $otext String: old text, must be already segmented |
675 | 675 | * @param $ntext String: new text, must be already segmented |
| 676 | + * @return bool|string |
676 | 677 | */ |
677 | 678 | function generateDiffBody( $otext, $ntext ) { |
678 | 679 | global $wgExternalDiffEngine, $wgContLang; |
— | — | @@ -747,6 +748,7 @@ |
748 | 749 | /** |
749 | 750 | * Generate a debug comment indicating diff generating time, |
750 | 751 | * server node, and generator backend. |
| 752 | + * @return string |
751 | 753 | */ |
752 | 754 | protected function debug( $generator = "internal" ) { |
753 | 755 | global $wgShowHostnames; |
— | — | @@ -768,6 +770,7 @@ |
769 | 771 | |
770 | 772 | /** |
771 | 773 | * Replace line numbers with the text in the user's language |
| 774 | + * @return mixed |
772 | 775 | */ |
773 | 776 | function localiseLineNumbers( $text ) { |
774 | 777 | return preg_replace_callback( '/<!--LINE (\d+)-->/', |
Index: trunk/phase3/includes/FileDeleteForm.php |
— | — | @@ -122,6 +122,7 @@ |
123 | 123 | * @param $reason String: reason of the deletion |
124 | 124 | * @param $suppress Boolean: whether to mark all deleted versions as restricted |
125 | 125 | * @param $user User object performing the request |
| 126 | + * @return bool|Status |
126 | 127 | */ |
127 | 128 | public static function doDelete( &$title, &$file, &$oldimage, $reason, $suppress, User $user = null ) { |
128 | 129 | if ( $user === null ) { |
Index: trunk/phase3/includes/ConfEditor.php |
— | — | @@ -139,6 +139,7 @@ |
140 | 140 | * insert |
141 | 141 | * Insert a new element at the start of the array. |
142 | 142 | * |
| 143 | + * @return string |
143 | 144 | */ |
144 | 145 | public function edit( $ops ) { |
145 | 146 | $this->parse(); |
— | — | @@ -371,6 +372,7 @@ |
372 | 373 | * Finds the source byte region which you would want to delete, if $pathName |
373 | 374 | * was to be deleted. Includes the leading spaces and tabs, the trailing line |
374 | 375 | * break, and any comments in between. |
| 376 | + * @return array |
375 | 377 | */ |
376 | 378 | function findDeletionRegion( $pathName ) { |
377 | 379 | if ( !isset( $this->pathInfo[$pathName] ) ) { |
— | — | @@ -428,6 +430,7 @@ |
429 | 431 | * or semicolon. |
430 | 432 | * |
431 | 433 | * The end position is the past-the-end (end + 1) value as per convention. |
| 434 | + * @return array |
432 | 435 | */ |
433 | 436 | function findValueRegion( $pathName ) { |
434 | 437 | if ( !isset( $this->pathInfo[$pathName] ) ) { |
— | — | @@ -444,6 +447,7 @@ |
445 | 448 | * Find the path name of the last element in the array. |
446 | 449 | * If the array is empty, this will return the \@extra interstitial element. |
447 | 450 | * If the specified path is not found or is not an array, it will return false. |
| 451 | + * @return bool|int|string |
448 | 452 | */ |
449 | 453 | function findLastArrayElement( $path ) { |
450 | 454 | // Try for a real element |
— | — | @@ -480,6 +484,7 @@ |
481 | 485 | * Find the path name of first element in the array. |
482 | 486 | * If the array is empty, this will return the \@extra interstitial element. |
483 | 487 | * If the specified path is not found or is not an array, it will return false. |
| 488 | + * @return bool|int|string |
484 | 489 | */ |
485 | 490 | function findFirstArrayElement( $path ) { |
486 | 491 | // Try for an ordinary element |
— | — | @@ -504,6 +509,7 @@ |
505 | 510 | /** |
506 | 511 | * Get the indent string which sits after a given start position. |
507 | 512 | * Returns false if the position is not at the start of the line. |
| 513 | + * @return array |
508 | 514 | */ |
509 | 515 | function getIndent( $pos, $key = false, $arrowPos = false ) { |
510 | 516 | $arrowIndent = ' '; |
— | — | @@ -725,6 +731,7 @@ |
726 | 732 | |
727 | 733 | /** |
728 | 734 | * Create a ConfEditorToken from an element of token_get_all() |
| 735 | + * @return \ConfEditorToken |
729 | 736 | */ |
730 | 737 | function newTokenObj( $internalToken ) { |
731 | 738 | if ( is_array( $internalToken ) ) { |
— | — | @@ -776,6 +783,7 @@ |
777 | 784 | /** |
778 | 785 | * Get the token $offset steps ahead of the current position. |
779 | 786 | * $offset may be negative, to get tokens behind the current position. |
| 787 | + * @return \ConfEditorToken |
780 | 788 | */ |
781 | 789 | function getTokenAhead( $offset ) { |
782 | 790 | $pos = $this->pos + $offset; |
— | — | @@ -821,6 +829,7 @@ |
822 | 830 | |
823 | 831 | /** |
824 | 832 | * Pop a state from the state stack. |
| 833 | + * @return mixed |
825 | 834 | */ |
826 | 835 | function popState() { |
827 | 836 | return array_pop( $this->stateStack ); |
— | — | @@ -829,6 +838,7 @@ |
830 | 839 | /** |
831 | 840 | * Returns true if the user input path is valid. |
832 | 841 | * This exists to allow "/" and "@" to be reserved for string path keys |
| 842 | + * @return bool |
833 | 843 | */ |
834 | 844 | function validatePath( $path ) { |
835 | 845 | return strpos( $path, '/' ) === false && substr( $path, 0, 1 ) != '@'; |
— | — | @@ -949,6 +959,7 @@ |
950 | 960 | |
951 | 961 | /** |
952 | 962 | * Get a readable name for the given token type. |
| 963 | + * @return string |
953 | 964 | */ |
954 | 965 | function getTypeName( $type ) { |
955 | 966 | if ( is_int( $type ) ) { |
— | — | @@ -962,6 +973,7 @@ |
963 | 974 | * Looks ahead to see if the given type is the next token type, starting |
964 | 975 | * from the current position plus the given offset. Skips any intervening |
965 | 976 | * whitespace. |
| 977 | + * @return bool |
966 | 978 | */ |
967 | 979 | function isAhead( $type, $offset = 0 ) { |
968 | 980 | $ahead = $offset; |
Index: trunk/phase3/includes/ForkController.php |
— | — | @@ -49,6 +49,7 @@ |
50 | 50 | * This will return 'child' in the child processes. In the parent process, |
51 | 51 | * it will run until all the child processes exit or a TERM signal is |
52 | 52 | * received. It will then return 'done'. |
| 53 | + * @return string |
53 | 54 | */ |
54 | 55 | public function start() { |
55 | 56 | // Trap SIGTERM |
Index: trunk/phase3/includes/BacklinkCache.php |
— | — | @@ -179,6 +179,7 @@ |
180 | 180 | /** |
181 | 181 | * Get the field name prefix for a given table |
182 | 182 | * @param $table String |
| 183 | + * @return null|string |
183 | 184 | */ |
184 | 185 | protected function getPrefix( $table ) { |
185 | 186 | static $prefixes = array( |
— | — | @@ -206,6 +207,7 @@ |
207 | 208 | * Get the SQL condition array for selecting backlinks, with a join |
208 | 209 | * on the page table. |
209 | 210 | * @param $table String |
| 211 | + * @return array|null |
210 | 212 | */ |
211 | 213 | protected function getConditions( $table ) { |
212 | 214 | $prefix = $this->getPrefix( $table ); |
Index: trunk/phase3/includes/Feed.php |
— | — | @@ -334,6 +334,7 @@ |
335 | 335 | class AtomFeed extends ChannelFeed { |
336 | 336 | /** |
337 | 337 | * @todo document |
| 338 | + * @return string |
338 | 339 | */ |
339 | 340 | function formatTime( $ts ) { |
340 | 341 | // need to use RFC 822 time format at least for rss2.0 |
Index: trunk/phase3/includes/Import.php |
— | — | @@ -396,6 +396,7 @@ |
397 | 397 | |
398 | 398 | /** |
399 | 399 | * Primary entry point |
| 400 | + * @return bool |
400 | 401 | */ |
401 | 402 | public function doImport() { |
402 | 403 | $this->reader->read(); |
Index: trunk/phase3/includes/cache/MessageCache.php |
— | — | @@ -260,6 +260,7 @@ |
261 | 261 | * is disabled. |
262 | 262 | * |
263 | 263 | * @param $code String: language to which load messages |
| 264 | + * @return bool |
264 | 265 | */ |
265 | 266 | function load( $code = false ) { |
266 | 267 | global $wgUseLocalMessageCache; |
Index: trunk/phase3/includes/Action.php |
— | — | @@ -501,6 +501,7 @@ |
502 | 502 | |
503 | 503 | /** |
504 | 504 | * We don't want an HTMLForm |
| 505 | + * @return bool |
505 | 506 | */ |
506 | 507 | protected function getFormFields() { |
507 | 508 | return false; |
Index: trunk/phase3/includes/FormOptions.php |
— | — | @@ -291,11 +291,17 @@ |
292 | 292 | * @see http://php.net/manual/en/class.arrayaccess.php |
293 | 293 | */ |
294 | 294 | /* @{ */ |
295 | | - /** Whether option exist*/ |
| 295 | + /** |
| 296 | + * Whether option exist |
| 297 | + * @return bool |
| 298 | + */ |
296 | 299 | public function offsetExists( $name ) { |
297 | 300 | return isset( $this->options[$name] ); |
298 | 301 | } |
299 | | - /** Retrieve an option value */ |
| 302 | + /** |
| 303 | + * Retrieve an option value |
| 304 | + * @return Mixed |
| 305 | + */ |
300 | 306 | public function offsetGet( $name ) { |
301 | 307 | return $this->getValue( $name ); |
302 | 308 | } |
Index: trunk/phase3/includes/filerepo/RepoGroup.php |
— | — | @@ -189,6 +189,7 @@ |
190 | 190 | |
191 | 191 | /** |
192 | 192 | * Interface for FileRepo::checkRedirect() |
| 193 | + * @return bool |
193 | 194 | */ |
194 | 195 | function checkRedirect( Title $title ) { |
195 | 196 | if ( !$this->reposInitialised ) { |
— | — | @@ -251,6 +252,7 @@ |
252 | 253 | |
253 | 254 | /** |
254 | 255 | * Get the repo instance with a given key. |
| 256 | + * @return bool|LocalRepo |
255 | 257 | */ |
256 | 258 | function getRepo( $index ) { |
257 | 259 | if ( !$this->reposInitialised ) { |
— | — | @@ -266,6 +268,7 @@ |
267 | 269 | } |
268 | 270 | /** |
269 | 271 | * Get the repo instance by its name |
| 272 | + * @return bool |
270 | 273 | */ |
271 | 274 | function getRepoByName( $name ) { |
272 | 275 | if ( !$this->reposInitialised ) { |
— | — | @@ -294,6 +297,7 @@ |
295 | 298 | * |
296 | 299 | * @param $callback Callback: the function to call |
297 | 300 | * @param $params Array: optional additional parameters to pass to the function |
| 301 | + * @return bool |
298 | 302 | */ |
299 | 303 | function forEachForeignRepo( $callback, $params = array() ) { |
300 | 304 | foreach( $this->foreignRepos as $repo ) { |
Index: trunk/phase3/includes/filerepo/ForeignDBViaLBRepo.php |
— | — | @@ -39,6 +39,7 @@ |
40 | 40 | * Get a key on the primary cache for this repository. |
41 | 41 | * Returns false if the repository's cache is not accessible at this site. |
42 | 42 | * The parameters are the parts of the key, as for wfMemcKey(). |
| 43 | + * @return bool|string |
43 | 44 | */ |
44 | 45 | function getSharedCacheKey( /*...*/ ) { |
45 | 46 | if ( $this->hasSharedCache() ) { |
Index: trunk/phase3/includes/filerepo/FileRepo.php |
— | — | @@ -411,6 +411,7 @@ |
412 | 412 | * SHA-1 content hash. |
413 | 413 | * |
414 | 414 | * STUB |
| 415 | + * @return array |
415 | 416 | */ |
416 | 417 | public function findBySha1( $hash ) { |
417 | 418 | return array(); |
— | — | @@ -456,6 +457,7 @@ |
457 | 458 | * Get the name of an image from its title object |
458 | 459 | * |
459 | 460 | * @param $title Title |
| 461 | + * @return String |
460 | 462 | */ |
461 | 463 | public function getNameFromTitle( Title $title ) { |
462 | 464 | global $wgContLang; |
— | — | @@ -869,6 +871,7 @@ |
870 | 872 | * be archived, if there is one. Relative to the public zone root. |
871 | 873 | * @param $flags Integer: bitfield, may be FileRepo::DELETE_SOURCE to indicate |
872 | 874 | * that the source file should be deleted if possible |
| 875 | + * @return FileRepoStatus |
873 | 876 | */ |
874 | 877 | public function publish( $srcPath, $dstRel, $archiveRel, $flags = 0 ) { |
875 | 878 | $status = $this->publishBatch( array( array( $srcPath, $dstRel, $archiveRel ) ), $flags ); |
— | — | @@ -1422,6 +1425,7 @@ |
1423 | 1426 | * The parameters are the parts of the key, as for wfMemcKey(). |
1424 | 1427 | * |
1425 | 1428 | * STUB |
| 1429 | + * @return bool |
1426 | 1430 | */ |
1427 | 1431 | function getSharedCacheKey( /*...*/ ) { |
1428 | 1432 | return false; |
Index: trunk/phase3/includes/filerepo/ForeignDBRepo.php |
— | — | @@ -61,6 +61,7 @@ |
62 | 62 | * Get a key on the primary cache for this repository. |
63 | 63 | * Returns false if the repository's cache is not accessible at this site. |
64 | 64 | * The parameters are the parts of the key, as for wfMemcKey(). |
| 65 | + * @return bool|mixed |
65 | 66 | */ |
66 | 67 | function getSharedCacheKey( /*...*/ ) { |
67 | 68 | if ( $this->hasSharedCache() ) { |
Index: trunk/phase3/includes/filerepo/ForeignAPIRepo.php |
— | — | @@ -77,6 +77,7 @@ |
78 | 78 | |
79 | 79 | /** |
80 | 80 | * No-ops |
| 81 | + * @return bool |
81 | 82 | */ |
82 | 83 | |
83 | 84 | function storeBatch( $triplets, $flags = 0 ) { |
— | — | @@ -231,6 +232,7 @@ |
232 | 233 | * @param $width |
233 | 234 | * @param $height |
234 | 235 | * @param String $param Other rendering parameters (page number, etc) from handler's makeParamString. |
| 236 | + * @return bool|string |
235 | 237 | */ |
236 | 238 | function getThumbUrlFromCache( $name, $width, $height, $params="" ) { |
237 | 239 | global $wgMemc; |
— | — | @@ -312,6 +314,7 @@ |
313 | 315 | |
314 | 316 | /** |
315 | 317 | * @see FileRepo::getZoneUrl() |
| 318 | + * @return String |
316 | 319 | */ |
317 | 320 | function getZoneUrl( $zone ) { |
318 | 321 | switch ( $zone ) { |
— | — | @@ -326,6 +329,7 @@ |
327 | 330 | |
328 | 331 | /** |
329 | 332 | * Get the local directory corresponding to one of the basic zones |
| 333 | + * @return bool|null|string |
330 | 334 | */ |
331 | 335 | function getZonePath( $zone ) { |
332 | 336 | $supported = array( 'public', 'thumb' ); |
— | — | @@ -345,6 +349,7 @@ |
346 | 350 | |
347 | 351 | /** |
348 | 352 | * The user agent the ForeignAPIRepo will use. |
| 353 | + * @return string |
349 | 354 | */ |
350 | 355 | public static function getUserAgent() { |
351 | 356 | return Http::userAgent() . " ForeignAPIRepo/" . self::VERSION; |
— | — | @@ -353,6 +358,7 @@ |
354 | 359 | /** |
355 | 360 | * Like a Http:get request, but with custom User-Agent. |
356 | 361 | * @see Http:get |
| 362 | + * @return bool|String |
357 | 363 | */ |
358 | 364 | public static function httpGet( $url, $timeout = 'default', $options = array() ) { |
359 | 365 | $options['timeout'] = $timeout; |
— | — | @@ -362,7 +368,7 @@ |
363 | 369 | $options['method'] = "GET"; |
364 | 370 | |
365 | 371 | if ( !isset( $options['timeout'] ) ) { |
366 | | - $options['timeout'] = 'default'; |
| 372 | + $options['timeout'] = 'default'; |
367 | 373 | } |
368 | 374 | |
369 | 375 | $req = MWHttpRequest::factory( $url, $options ); |
— | — | @@ -370,9 +376,9 @@ |
371 | 377 | $status = $req->execute(); |
372 | 378 | |
373 | 379 | if ( $status->isOK() ) { |
374 | | - return $req->getContent(); |
| 380 | + return $req->getContent(); |
375 | 381 | } else { |
376 | | - return false; |
| 382 | + return false; |
377 | 383 | } |
378 | 384 | } |
379 | 385 | |
Index: trunk/phase3/includes/filerepo/file/OldLocalFile.php |
— | — | @@ -64,6 +64,7 @@ |
65 | 65 | |
66 | 66 | /** |
67 | 67 | * Fields in the oldimage table |
| 68 | + * @return array |
68 | 69 | */ |
69 | 70 | static function selectFields() { |
70 | 71 | return array( |
Index: trunk/phase3/includes/filerepo/file/LocalFile.php |
— | — | @@ -121,6 +121,7 @@ |
122 | 122 | |
123 | 123 | /** |
124 | 124 | * Fields in the image table |
| 125 | + * @return array |
125 | 126 | */ |
126 | 127 | static function selectFields() { |
127 | 128 | return array( |
— | — | @@ -160,6 +161,7 @@ |
161 | 162 | /** |
162 | 163 | * Get the memcached key for the main data for this file, or false if |
163 | 164 | * there is no access to the shared cache. |
| 165 | + * @return bool |
164 | 166 | */ |
165 | 167 | function getCacheKey() { |
166 | 168 | $hashedName = md5( $this->getName() ); |
— | — | @@ -169,6 +171,7 @@ |
170 | 172 | |
171 | 173 | /** |
172 | 174 | * Try to load file metadata from memcached. Returns true on success. |
| 175 | + * @return bool |
173 | 176 | */ |
174 | 177 | function loadFromCache() { |
175 | 178 | global $wgMemc; |
— | — | @@ -286,6 +289,7 @@ |
287 | 290 | /** |
288 | 291 | * Decode a row from the database (either object or array) to an array |
289 | 292 | * with timestamps and MIME types decoded, and the field prefix removed. |
| 293 | + * @return array |
290 | 294 | */ |
291 | 295 | function decodeRow( $row, $prefix = 'img_' ) { |
292 | 296 | $array = (array)$row; |
— | — | @@ -474,6 +478,7 @@ |
475 | 479 | * Return the width of the image |
476 | 480 | * |
477 | 481 | * Returns false on error |
| 482 | + * @return bool |
478 | 483 | */ |
479 | 484 | public function getWidth( $page = 1 ) { |
480 | 485 | $this->load(); |
— | — | @@ -494,6 +499,7 @@ |
495 | 500 | * Return the height of the image |
496 | 501 | * |
497 | 502 | * Returns false on error |
| 503 | + * @return bool |
498 | 504 | */ |
499 | 505 | public function getHeight( $page = 1 ) { |
500 | 506 | $this->load(); |
— | — | @@ -527,6 +533,7 @@ |
528 | 534 | |
529 | 535 | /** |
530 | 536 | * Get handler-specific metadata |
| 537 | + * @return string |
531 | 538 | */ |
532 | 539 | function getMetadata() { |
533 | 540 | $this->load(); |
— | — | @@ -824,6 +831,7 @@ |
825 | 832 | * 0 return line for current version |
826 | 833 | * 1 query for old versions, return first one |
827 | 834 | * 2, ... return next old version from above query |
| 835 | + * @return bool |
828 | 836 | */ |
829 | 837 | public function nextHistoryLine() { |
830 | 838 | # Polymorphic function name to distinguish foreign and local fetches |
— | — | @@ -920,6 +928,7 @@ |
921 | 929 | |
922 | 930 | /** |
923 | 931 | * Record a file upload in the upload log and the image table |
| 932 | + * @return bool |
924 | 933 | */ |
925 | 934 | function recordUpload( $oldver, $desc, $license = '', $copyStatus = '', $source = '', |
926 | 935 | $watch = false, $timestamp = false ) |
— | — | @@ -939,6 +948,7 @@ |
940 | 949 | |
941 | 950 | /** |
942 | 951 | * Record a file upload in the upload log and the image table |
| 952 | + * @return bool |
943 | 953 | */ |
944 | 954 | function recordUpload2( |
945 | 955 | $oldver, $comment, $pageText, $props = false, $timestamp = false, $user = null |
— | — | @@ -1336,6 +1346,7 @@ |
1337 | 1347 | |
1338 | 1348 | /** |
1339 | 1349 | * Get the URL of the file description page. |
| 1350 | + * @return String |
1340 | 1351 | */ |
1341 | 1352 | function getDescriptionUrl() { |
1342 | 1353 | return $this->title->getLocalUrl(); |
— | — | @@ -1345,6 +1356,7 @@ |
1346 | 1357 | * Get the HTML text of the description page |
1347 | 1358 | * This is not used by ImagePage for local files, since (among other things) |
1348 | 1359 | * it skips the parser cache. |
| 1360 | + * @return bool|mixed |
1349 | 1361 | */ |
1350 | 1362 | function getDescriptionText() { |
1351 | 1363 | global $wgParser; |
— | — | @@ -1634,6 +1646,7 @@ |
1635 | 1647 | |
1636 | 1648 | /** |
1637 | 1649 | * Run the transaction |
| 1650 | + * @return \FileRepoStatus |
1638 | 1651 | */ |
1639 | 1652 | function execute() { |
1640 | 1653 | global $wgUseSquid; |
— | — | @@ -1724,6 +1737,7 @@ |
1725 | 1738 | |
1726 | 1739 | /** |
1727 | 1740 | * Removes non-existent files from a deletion batch. |
| 1741 | + * @return array |
1728 | 1742 | */ |
1729 | 1743 | function removeNonexistentFiles( $batch ) { |
1730 | 1744 | $files = $newBatch = array(); |
— | — | @@ -1793,6 +1807,7 @@ |
1794 | 1808 | * rows and there's no need to keep the image row locked while it's acquiring those locks |
1795 | 1809 | * The caller may have its own transaction open. |
1796 | 1810 | * So we save the batch and let the caller call cleanup() |
| 1811 | + * @return \FileRepoStatus |
1797 | 1812 | */ |
1798 | 1813 | function execute() { |
1799 | 1814 | global $wgLang; |
— | — | @@ -2015,6 +2030,7 @@ |
2016 | 2031 | |
2017 | 2032 | /** |
2018 | 2033 | * Removes non-existent files from a store batch. |
| 2034 | + * @return array |
2019 | 2035 | */ |
2020 | 2036 | function removeNonexistentFiles( $triplets ) { |
2021 | 2037 | $files = $filteredTriplets = array(); |
— | — | @@ -2034,6 +2050,7 @@ |
2035 | 2051 | |
2036 | 2052 | /** |
2037 | 2053 | * Removes non-existent files from a cleanup batch. |
| 2054 | + * @return array |
2038 | 2055 | */ |
2039 | 2056 | function removeNonexistentFromCleanup( $batch ) { |
2040 | 2057 | $files = $newBatch = array(); |
— | — | @@ -2058,6 +2075,7 @@ |
2059 | 2076 | /** |
2060 | 2077 | * Delete unused files in the deleted zone. |
2061 | 2078 | * This should be called from outside the transaction in which execute() was called. |
| 2079 | + * @return \FileRepoStatus|void |
2062 | 2080 | */ |
2063 | 2081 | function cleanup() { |
2064 | 2082 | if ( !$this->cleanupBatch ) { |
— | — | @@ -2178,6 +2196,7 @@ |
2179 | 2197 | |
2180 | 2198 | /** |
2181 | 2199 | * Perform the move. |
| 2200 | + * @return \FileRepoStatus |
2182 | 2201 | */ |
2183 | 2202 | function execute() { |
2184 | 2203 | $repo = $this->file->repo; |
— | — | @@ -2268,6 +2287,7 @@ |
2269 | 2288 | |
2270 | 2289 | /** |
2271 | 2290 | * Generate triplets for FileRepo::storeBatch(). |
| 2291 | + * @return array |
2272 | 2292 | */ |
2273 | 2293 | function getMoveTriplets() { |
2274 | 2294 | $moves = array_merge( array( $this->cur ), $this->olds ); |
— | — | @@ -2285,6 +2305,7 @@ |
2286 | 2306 | |
2287 | 2307 | /** |
2288 | 2308 | * Removes non-existent files from move batch. |
| 2309 | + * @return array |
2289 | 2310 | */ |
2290 | 2311 | function removeNonexistentFiles( $triplets ) { |
2291 | 2312 | $files = array(); |
Index: trunk/phase3/includes/filerepo/file/File.php |
— | — | @@ -433,6 +433,7 @@ |
434 | 434 | * Get handler-specific metadata |
435 | 435 | * Overridden by LocalFile, UnregisteredLocalFile |
436 | 436 | * STUB |
| 437 | + * @return bool |
437 | 438 | */ |
438 | 439 | public function getMetadata() { |
439 | 440 | return false; |
— | — | @@ -462,6 +463,7 @@ |
463 | 464 | * Return the bit depth of the file |
464 | 465 | * Overridden by LocalFile |
465 | 466 | * STUB |
| 467 | + * @return int |
466 | 468 | */ |
467 | 469 | public function getBitDepth() { |
468 | 470 | return 0; |
— | — | @@ -471,6 +473,7 @@ |
472 | 474 | * Return the size of the image file, in bytes |
473 | 475 | * Overridden by LocalFile, UnregisteredLocalFile |
474 | 476 | * STUB |
| 477 | + * @return bool |
475 | 478 | */ |
476 | 479 | public function getSize() { |
477 | 480 | return false; |
— | — | @@ -492,6 +495,7 @@ |
493 | 496 | * Use the value returned by this function with the MEDIATYPE_xxx constants. |
494 | 497 | * Overridden by LocalFile, |
495 | 498 | * STUB |
| 499 | + * @return string |
496 | 500 | */ |
497 | 501 | function getMediaType() { |
498 | 502 | return MEDIATYPE_UNKNOWN; |
— | — | @@ -518,6 +522,7 @@ |
519 | 523 | |
520 | 524 | /** |
521 | 525 | * Accessor for __get() |
| 526 | + * @return bool |
522 | 527 | */ |
523 | 528 | protected function getCanRender() { |
524 | 529 | return $this->canRender(); |
— | — | @@ -938,6 +943,7 @@ |
939 | 944 | * Get all thumbnail names previously generated for this file |
940 | 945 | * STUB |
941 | 946 | * Overridden by LocalFile |
| 947 | + * @return array |
942 | 948 | */ |
943 | 949 | function getThumbnails() { |
944 | 950 | return array(); |
— | — | @@ -1004,6 +1010,7 @@ |
1005 | 1011 | * |
1006 | 1012 | * STUB |
1007 | 1013 | * Overridden in LocalFile |
| 1014 | + * @return bool |
1008 | 1015 | */ |
1009 | 1016 | public function nextHistoryLine() { |
1010 | 1017 | return false; |
— | — | @@ -1360,6 +1367,7 @@ |
1361 | 1368 | /** |
1362 | 1369 | * Return the deletion bitfield |
1363 | 1370 | * STUB |
| 1371 | + * @return int |
1364 | 1372 | */ |
1365 | 1373 | function getVisibility() { |
1366 | 1374 | return 0; |
Index: trunk/phase3/includes/filerepo/file/ForeignAPIFile.php |
— | — | @@ -68,6 +68,7 @@ |
69 | 69 | |
70 | 70 | /** |
71 | 71 | * Get the property string for iiprop and aiprop |
| 72 | + * @return string |
72 | 73 | */ |
73 | 74 | static function getProps() { |
74 | 75 | return 'timestamp|user|comment|url|size|sha1|metadata|mime'; |
— | — | @@ -183,6 +184,7 @@ |
184 | 185 | |
185 | 186 | /** |
186 | 187 | * Only useful if we're locally caching thumbs anyway... |
| 188 | + * @return null|string |
187 | 189 | */ |
188 | 190 | function getThumbPath( $suffix = '' ) { |
189 | 191 | if ( $this->repo->canCacheThumbs() ) { |
Index: trunk/phase3/includes/filerepo/LocalRepo.php |
— | — | @@ -189,6 +189,7 @@ |
190 | 190 | * We can't say Title object, what database it should use, so we duplicate that function here. |
191 | 191 | * |
192 | 192 | * @param $title Title |
| 193 | + * @return bool|int|mixed |
193 | 194 | */ |
194 | 195 | protected function getArticleID( $title ) { |
195 | 196 | if( !$title instanceof Title ) { |
— | — | @@ -233,6 +234,7 @@ |
234 | 235 | |
235 | 236 | /** |
236 | 237 | * Get a connection to the slave DB |
| 238 | + * @return DatabaseBase |
237 | 239 | */ |
238 | 240 | function getSlaveDB() { |
239 | 241 | return wfGetDB( DB_SLAVE ); |
— | — | @@ -240,6 +242,7 @@ |
241 | 243 | |
242 | 244 | /** |
243 | 245 | * Get a connection to the master DB |
| 246 | + * @return DatabaseBase |
244 | 247 | */ |
245 | 248 | function getMasterDB() { |
246 | 249 | return wfGetDB( DB_MASTER ); |
Index: trunk/phase3/includes/filerepo/backend/FileBackend.php |
— | — | @@ -885,6 +885,7 @@ |
886 | 886 | |
887 | 887 | /** |
888 | 888 | * @see FileBackendStore::moveInternal() |
| 889 | + * @return Status |
889 | 890 | */ |
890 | 891 | protected function doMoveInternal( array $params ) { |
891 | 892 | // Copy source to dest |
— | — | @@ -899,6 +900,7 @@ |
900 | 901 | |
901 | 902 | /** |
902 | 903 | * @see FileBackend::concatenate() |
| 904 | + * @return Status |
903 | 905 | */ |
904 | 906 | final public function concatenate( array $params ) { |
905 | 907 | wfProfileIn( __METHOD__ ); |
— | — | @@ -917,6 +919,7 @@ |
918 | 920 | |
919 | 921 | /** |
920 | 922 | * @see FileBackendStore::concatenate() |
| 923 | + * @return Status |
921 | 924 | */ |
922 | 925 | protected function doConcatenate( array $params ) { |
923 | 926 | $status = Status::newGood(); |
— | — | @@ -972,6 +975,7 @@ |
973 | 976 | |
974 | 977 | /** |
975 | 978 | * @see FileBackend::doPrepare() |
| 979 | + * @return Status |
976 | 980 | */ |
977 | 981 | final protected function doPrepare( array $params ) { |
978 | 982 | wfProfileIn( __METHOD__ ); |
— | — | @@ -1000,6 +1004,7 @@ |
1001 | 1005 | |
1002 | 1006 | /** |
1003 | 1007 | * @see FileBackendStore::doPrepare() |
| 1008 | + * @return Status |
1004 | 1009 | */ |
1005 | 1010 | protected function doPrepareInternal( $container, $dir, array $params ) { |
1006 | 1011 | return Status::newGood(); |
— | — | @@ -1007,6 +1012,7 @@ |
1008 | 1013 | |
1009 | 1014 | /** |
1010 | 1015 | * @see FileBackend::doSecure() |
| 1016 | + * @return Status |
1011 | 1017 | */ |
1012 | 1018 | final protected function doSecure( array $params ) { |
1013 | 1019 | wfProfileIn( __METHOD__ ); |
— | — | @@ -1035,6 +1041,7 @@ |
1036 | 1042 | |
1037 | 1043 | /** |
1038 | 1044 | * @see FileBackendStore::doSecure() |
| 1045 | + * @return Status |
1039 | 1046 | */ |
1040 | 1047 | protected function doSecureInternal( $container, $dir, array $params ) { |
1041 | 1048 | return Status::newGood(); |
— | — | @@ -1042,6 +1049,7 @@ |
1043 | 1050 | |
1044 | 1051 | /** |
1045 | 1052 | * @see FileBackend::doClean() |
| 1053 | + * @return Status |
1046 | 1054 | */ |
1047 | 1055 | final protected function doClean( array $params ) { |
1048 | 1056 | wfProfileIn( __METHOD__ ); |
— | — | @@ -1078,6 +1086,7 @@ |
1079 | 1087 | |
1080 | 1088 | /** |
1081 | 1089 | * @see FileBackendStore::doClean() |
| 1090 | + * @return Status |
1082 | 1091 | */ |
1083 | 1092 | protected function doCleanInternal( $container, $dir, array $params ) { |
1084 | 1093 | return Status::newGood(); |
— | — | @@ -1085,6 +1094,7 @@ |
1086 | 1095 | |
1087 | 1096 | /** |
1088 | 1097 | * @see FileBackend::fileExists() |
| 1098 | + * @return bool|null |
1089 | 1099 | */ |
1090 | 1100 | final public function fileExists( array $params ) { |
1091 | 1101 | wfProfileIn( __METHOD__ ); |
— | — | @@ -1095,6 +1105,7 @@ |
1096 | 1106 | |
1097 | 1107 | /** |
1098 | 1108 | * @see FileBackend::getFileTimestamp() |
| 1109 | + * @return bool |
1099 | 1110 | */ |
1100 | 1111 | final public function getFileTimestamp( array $params ) { |
1101 | 1112 | wfProfileIn( __METHOD__ ); |
— | — | @@ -1105,6 +1116,7 @@ |
1106 | 1117 | |
1107 | 1118 | /** |
1108 | 1119 | * @see FileBackend::getFileSize() |
| 1120 | + * @return bool |
1109 | 1121 | */ |
1110 | 1122 | final public function getFileSize( array $params ) { |
1111 | 1123 | wfProfileIn( __METHOD__ ); |
— | — | @@ -1115,6 +1127,7 @@ |
1116 | 1128 | |
1117 | 1129 | /** |
1118 | 1130 | * @see FileBackend::getFileStat() |
| 1131 | + * @return bool|void |
1119 | 1132 | */ |
1120 | 1133 | final public function getFileStat( array $params ) { |
1121 | 1134 | wfProfileIn( __METHOD__ ); |
— | — | @@ -1148,6 +1161,7 @@ |
1149 | 1162 | |
1150 | 1163 | /** |
1151 | 1164 | * @see FileBackend::getFileContents() |
| 1165 | + * @return bool|string |
1152 | 1166 | */ |
1153 | 1167 | public function getFileContents( array $params ) { |
1154 | 1168 | wfProfileIn( __METHOD__ ); |
— | — | @@ -1165,6 +1179,7 @@ |
1166 | 1180 | |
1167 | 1181 | /** |
1168 | 1182 | * @see FileBackend::getFileSha1Base36() |
| 1183 | + * @return bool |
1169 | 1184 | */ |
1170 | 1185 | final public function getFileSha1Base36( array $params ) { |
1171 | 1186 | wfProfileIn( __METHOD__ ); |
— | — | @@ -1184,6 +1199,7 @@ |
1185 | 1200 | |
1186 | 1201 | /** |
1187 | 1202 | * @see FileBackendStore::getFileSha1Base36() |
| 1203 | + * @return bool |
1188 | 1204 | */ |
1189 | 1205 | protected function doGetFileSha1Base36( array $params ) { |
1190 | 1206 | $fsFile = $this->getLocalReference( $params ); |
— | — | @@ -1196,6 +1212,7 @@ |
1197 | 1213 | |
1198 | 1214 | /** |
1199 | 1215 | * @see FileBackend::getFileProps() |
| 1216 | + * @return Array |
1200 | 1217 | */ |
1201 | 1218 | final public function getFileProps( array $params ) { |
1202 | 1219 | wfProfileIn( __METHOD__ ); |
— | — | @@ -1207,6 +1224,7 @@ |
1208 | 1225 | |
1209 | 1226 | /** |
1210 | 1227 | * @see FileBackend::getLocalReference() |
| 1228 | + * @return null|\TempFSFile |
1211 | 1229 | */ |
1212 | 1230 | public function getLocalReference( array $params ) { |
1213 | 1231 | wfProfileIn( __METHOD__ ); |
— | — | @@ -1226,6 +1244,7 @@ |
1227 | 1245 | |
1228 | 1246 | /** |
1229 | 1247 | * @see FileBackend::streamFile() |
| 1248 | + * @return Status |
1230 | 1249 | */ |
1231 | 1250 | final public function streamFile( array $params ) { |
1232 | 1251 | wfProfileIn( __METHOD__ ); |
— | — | @@ -1253,6 +1272,7 @@ |
1254 | 1273 | |
1255 | 1274 | /** |
1256 | 1275 | * @see FileBackendStore::streamFile() |
| 1276 | + * @return Status |
1257 | 1277 | */ |
1258 | 1278 | protected function doStreamFile( array $params ) { |
1259 | 1279 | $status = Status::newGood(); |
— | — | @@ -1268,7 +1288,8 @@ |
1269 | 1289 | } |
1270 | 1290 | |
1271 | 1291 | /** |
1272 | | - * @copydoc FileBackend::getFileList() |
| 1292 | + * @copydoc FileBackend::getFileList() |
| 1293 | + * @return Array|FileBackendStoreShardListIterator|null|Traversable |
1273 | 1294 | */ |
1274 | 1295 | final public function getFileList( array $params ) { |
1275 | 1296 | list( $fullCont, $dir, $shard ) = $this->resolveStoragePath( $params['dir'] ); |
— | — | @@ -1349,6 +1370,7 @@ |
1350 | 1371 | |
1351 | 1372 | /** |
1352 | 1373 | * @see FileBackend::doOperationsInternal() |
| 1374 | + * @return Status |
1353 | 1375 | */ |
1354 | 1376 | protected function doOperationsInternal( array $ops, array $opts ) { |
1355 | 1377 | wfProfileIn( __METHOD__ ); |
Index: trunk/phase3/includes/filerepo/backend/FileBackendMultiWrite.php |
— | — | @@ -76,6 +76,7 @@ |
77 | 77 | |
78 | 78 | /** |
79 | 79 | * @see FileBackend::doOperationsInternal() |
| 80 | + * @return Status |
80 | 81 | */ |
81 | 82 | final protected function doOperationsInternal( array $ops, array $opts ) { |
82 | 83 | $status = Status::newGood(); |
— | — | @@ -277,6 +278,7 @@ |
278 | 279 | |
279 | 280 | /** |
280 | 281 | * @see FileBackend::doPrepare() |
| 282 | + * @return Status |
281 | 283 | */ |
282 | 284 | public function doPrepare( array $params ) { |
283 | 285 | $status = Status::newGood(); |
— | — | @@ -289,6 +291,7 @@ |
290 | 292 | |
291 | 293 | /** |
292 | 294 | * @see FileBackend::doSecure() |
| 295 | + * @return Status |
293 | 296 | */ |
294 | 297 | public function doSecure( array $params ) { |
295 | 298 | $status = Status::newGood(); |
— | — | @@ -301,6 +304,7 @@ |
302 | 305 | |
303 | 306 | /** |
304 | 307 | * @see FileBackend::doClean() |
| 308 | + * @return Status |
305 | 309 | */ |
306 | 310 | public function doClean( array $params ) { |
307 | 311 | $status = Status::newGood(); |
Index: trunk/phase3/includes/filerepo/backend/lockmanager/DBLockManager.php |
— | — | @@ -90,6 +90,7 @@ |
91 | 91 | |
92 | 92 | /** |
93 | 93 | * @see LockManager::doLock() |
| 94 | + * @return Status |
94 | 95 | */ |
95 | 96 | protected function doLock( array $paths, $type ) { |
96 | 97 | $status = Status::newGood(); |
— | — | @@ -140,6 +141,7 @@ |
141 | 142 | |
142 | 143 | /** |
143 | 144 | * @see LockManager::doUnlock() |
| 145 | + * @return Status |
144 | 146 | */ |
145 | 147 | protected function doUnlock( array $paths, $type ) { |
146 | 148 | $status = Status::newGood(); |
Index: trunk/phase3/includes/filerepo/backend/FSFileBackend.php |
— | — | @@ -62,6 +62,7 @@ |
63 | 63 | |
64 | 64 | /** |
65 | 65 | * @see FileBackendStore::resolveContainerPath() |
| 66 | + * @return null|string |
66 | 67 | */ |
67 | 68 | protected function resolveContainerPath( $container, $relStoragePath ) { |
68 | 69 | // Check that container has a root directory |
— | — | @@ -130,6 +131,7 @@ |
131 | 132 | |
132 | 133 | /** |
133 | 134 | * @see FileBackendStore::isPathUsableInternal() |
| 135 | + * @return bool |
134 | 136 | */ |
135 | 137 | public function isPathUsableInternal( $storagePath ) { |
136 | 138 | $fsPath = $this->resolveToFSPath( $storagePath ); |
— | — | @@ -151,6 +153,7 @@ |
152 | 154 | |
153 | 155 | /** |
154 | 156 | * @see FileBackendStore::doStoreInternal() |
| 157 | + * @return Status |
155 | 158 | */ |
156 | 159 | protected function doStoreInternal( array $params ) { |
157 | 160 | $status = Status::newGood(); |
— | — | @@ -191,6 +194,7 @@ |
192 | 195 | |
193 | 196 | /** |
194 | 197 | * @see FileBackendStore::doCopyInternal() |
| 198 | + * @return Status |
195 | 199 | */ |
196 | 200 | protected function doCopyInternal( array $params ) { |
197 | 201 | $status = Status::newGood(); |
— | — | @@ -237,6 +241,7 @@ |
238 | 242 | |
239 | 243 | /** |
240 | 244 | * @see FileBackendStore::doMoveInternal() |
| 245 | + * @return Status |
241 | 246 | */ |
242 | 247 | protected function doMoveInternal( array $params ) { |
243 | 248 | $status = Status::newGood(); |
— | — | @@ -285,6 +290,7 @@ |
286 | 291 | |
287 | 292 | /** |
288 | 293 | * @see FileBackendStore::doDeleteInternal() |
| 294 | + * @return Status |
289 | 295 | */ |
290 | 296 | protected function doDeleteInternal( array $params ) { |
291 | 297 | $status = Status::newGood(); |
— | — | @@ -315,6 +321,7 @@ |
316 | 322 | |
317 | 323 | /** |
318 | 324 | * @see FileBackendStore::doCreateInternal() |
| 325 | + * @return Status |
319 | 326 | */ |
320 | 327 | protected function doCreateInternal( array $params ) { |
321 | 328 | $status = Status::newGood(); |
— | — | @@ -355,6 +362,7 @@ |
356 | 363 | |
357 | 364 | /** |
358 | 365 | * @see FileBackendStore::doPrepareInternal() |
| 366 | + * @return Status |
359 | 367 | */ |
360 | 368 | protected function doPrepareInternal( $fullCont, $dirRel, array $params ) { |
361 | 369 | $status = Status::newGood(); |
— | — | @@ -373,6 +381,7 @@ |
374 | 382 | |
375 | 383 | /** |
376 | 384 | * @see FileBackendStore::doSecureInternal() |
| 385 | + * @return Status |
377 | 386 | */ |
378 | 387 | protected function doSecureInternal( $fullCont, $dirRel, array $params ) { |
379 | 388 | $status = Status::newGood(); |
— | — | @@ -407,6 +416,7 @@ |
408 | 417 | |
409 | 418 | /** |
410 | 419 | * @see FileBackendStore::doCleanInternal() |
| 420 | + * @return Status |
411 | 421 | */ |
412 | 422 | protected function doCleanInternal( $fullCont, $dirRel, array $params ) { |
413 | 423 | $status = Status::newGood(); |
— | — | @@ -423,6 +433,7 @@ |
424 | 434 | |
425 | 435 | /** |
426 | 436 | * @see FileBackendStore::doFileExists() |
| 437 | + * @return array|bool|null |
427 | 438 | */ |
428 | 439 | protected function doGetFileStat( array $params ) { |
429 | 440 | $source = $this->resolveToFSPath( $params['src'] ); |
— | — | @@ -455,6 +466,7 @@ |
456 | 467 | |
457 | 468 | /** |
458 | 469 | * @see FileBackendStore::getFileListInternal() |
| 470 | + * @return array|FSFileBackendFileList|null |
459 | 471 | */ |
460 | 472 | public function getFileListInternal( $fullCont, $dirRel, array $params ) { |
461 | 473 | list( $b, $shortCont, $r ) = FileBackend::splitStoragePath( $params['dir'] ); |
— | — | @@ -479,6 +491,7 @@ |
480 | 492 | |
481 | 493 | /** |
482 | 494 | * @see FileBackendStore::getLocalReference() |
| 495 | + * @return FSFile|null |
483 | 496 | */ |
484 | 497 | public function getLocalReference( array $params ) { |
485 | 498 | $source = $this->resolveToFSPath( $params['src'] ); |
— | — | @@ -490,6 +503,7 @@ |
491 | 504 | |
492 | 505 | /** |
493 | 506 | * @see FileBackendStore::getLocalCopy() |
| 507 | + * @return null|TempFSFile |
494 | 508 | */ |
495 | 509 | public function getLocalCopy( array $params ) { |
496 | 510 | $source = $this->resolveToFSPath( $params['src'] ); |
Index: trunk/phase3/includes/filerepo/backend/SwiftFileBackend.php |
— | — | @@ -68,6 +68,7 @@ |
69 | 69 | |
70 | 70 | /** |
71 | 71 | * @see FileBackendStore::resolveContainerPath() |
| 72 | + * @return null |
72 | 73 | */ |
73 | 74 | protected function resolveContainerPath( $container, $relStoragePath ) { |
74 | 75 | if ( strlen( urlencode( $relStoragePath ) ) > 1024 ) { |
— | — | @@ -78,6 +79,7 @@ |
79 | 80 | |
80 | 81 | /** |
81 | 82 | * @see FileBackendStore::isPathUsableInternal() |
| 83 | + * @return bool |
82 | 84 | */ |
83 | 85 | public function isPathUsableInternal( $storagePath ) { |
84 | 86 | list( $container, $rel ) = $this->resolveStoragePathReal( $storagePath ); |
— | — | @@ -99,6 +101,7 @@ |
100 | 102 | |
101 | 103 | /** |
102 | 104 | * @see FileBackendStore::doCreateInternal() |
| 105 | + * @return Status |
103 | 106 | */ |
104 | 107 | protected function doCreateInternal( array $params ) { |
105 | 108 | $status = Status::newGood(); |
— | — | @@ -161,6 +164,7 @@ |
162 | 165 | |
163 | 166 | /** |
164 | 167 | * @see FileBackendStore::doStoreInternal() |
| 168 | + * @return Status |
165 | 169 | */ |
166 | 170 | protected function doStoreInternal( array $params ) { |
167 | 171 | $status = Status::newGood(); |
— | — | @@ -229,6 +233,7 @@ |
230 | 234 | |
231 | 235 | /** |
232 | 236 | * @see FileBackendStore::doCopyInternal() |
| 237 | + * @return Status |
233 | 238 | */ |
234 | 239 | protected function doCopyInternal( array $params ) { |
235 | 240 | $status = Status::newGood(); |
— | — | @@ -284,6 +289,7 @@ |
285 | 290 | |
286 | 291 | /** |
287 | 292 | * @see FileBackendStore::doDeleteInternal() |
| 293 | + * @return Status |
288 | 294 | */ |
289 | 295 | protected function doDeleteInternal( array $params ) { |
290 | 296 | $status = Status::newGood(); |
— | — | @@ -315,6 +321,7 @@ |
316 | 322 | |
317 | 323 | /** |
318 | 324 | * @see FileBackendStore::doPrepareInternal() |
| 325 | + * @return Status |
319 | 326 | */ |
320 | 327 | protected function doPrepareInternal( $fullCont, $dir, array $params ) { |
321 | 328 | $status = Status::newGood(); |
— | — | @@ -360,6 +367,7 @@ |
361 | 368 | |
362 | 369 | /** |
363 | 370 | * @see FileBackendStore::doSecureInternal() |
| 371 | + * @return Status |
364 | 372 | */ |
365 | 373 | protected function doSecureInternal( $fullCont, $dir, array $params ) { |
366 | 374 | $status = Status::newGood(); |
— | — | @@ -394,6 +402,7 @@ |
395 | 403 | |
396 | 404 | /** |
397 | 405 | * @see FileBackendStore::doCleanInternal() |
| 406 | + * @return Status |
398 | 407 | */ |
399 | 408 | protected function doCleanInternal( $fullCont, $dir, array $params ) { |
400 | 409 | $status = Status::newGood(); |
— | — | @@ -438,6 +447,7 @@ |
439 | 448 | |
440 | 449 | /** |
441 | 450 | * @see FileBackendStore::doFileExists() |
| 451 | + * @return array|bool|null |
442 | 452 | */ |
443 | 453 | protected function doGetFileStat( array $params ) { |
444 | 454 | list( $srcCont, $srcRel ) = $this->resolveStoragePathReal( $params['src'] ); |
— | — | @@ -499,6 +509,7 @@ |
500 | 510 | |
501 | 511 | /** |
502 | 512 | * @see FileBackend::getFileContents() |
| 513 | + * @return bool|null|string |
503 | 514 | */ |
504 | 515 | public function getFileContents( array $params ) { |
505 | 516 | list( $srcCont, $srcRel ) = $this->resolveStoragePathReal( $params['src'] ); |
— | — | @@ -526,6 +537,7 @@ |
527 | 538 | |
528 | 539 | /** |
529 | 540 | * @see FileBackendStore::getFileListInternal() |
| 541 | + * @return SwiftFileBackendFileList |
530 | 542 | */ |
531 | 543 | public function getFileListInternal( $fullCont, $dir, array $params ) { |
532 | 544 | return new SwiftFileBackendFileList( $this, $fullCont, $dir ); |
— | — | @@ -559,6 +571,7 @@ |
560 | 572 | |
561 | 573 | /** |
562 | 574 | * @see FileBackendStore::doGetFileSha1base36() |
| 575 | + * @return bool |
563 | 576 | */ |
564 | 577 | public function doGetFileSha1base36( array $params ) { |
565 | 578 | $stat = $this->getFileStat( $params ); |
— | — | @@ -571,6 +584,7 @@ |
572 | 585 | |
573 | 586 | /** |
574 | 587 | * @see FileBackendStore::doStreamFile() |
| 588 | + * @return Status |
575 | 589 | */ |
576 | 590 | protected function doStreamFile( array $params ) { |
577 | 591 | $status = Status::newGood(); |
— | — | @@ -610,6 +624,7 @@ |
611 | 625 | |
612 | 626 | /** |
613 | 627 | * @see FileBackendStore::getLocalCopy() |
| 628 | + * @return null|TempFSFile |
614 | 629 | */ |
615 | 630 | public function getLocalCopy( array $params ) { |
616 | 631 | list( $srcCont, $srcRel ) = $this->resolveStoragePathReal( $params['src'] ); |
Index: trunk/phase3/includes/Article.php |
— | — | @@ -1770,6 +1770,7 @@ |
1771 | 1771 | * |
1772 | 1772 | * @param $fname String Name of called method |
1773 | 1773 | * @param $args Array Arguments to the method |
| 1774 | + * @return mixed |
1774 | 1775 | */ |
1775 | 1776 | public function __call( $fname, $args ) { |
1776 | 1777 | if ( is_callable( array( $this->mPage, $fname ) ) ) { |
Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -20,33 +20,48 @@ |
21 | 21 | */ |
22 | 22 | |
23 | 23 | if( !function_exists( 'iconv' ) ) { |
24 | | - /** @codeCoverageIgnore */ |
| 24 | + /** |
| 25 | + * @codeCoverageIgnore |
| 26 | + * @return string |
| 27 | + */ |
25 | 28 | function iconv( $from, $to, $string ) { |
26 | 29 | return Fallback::iconv( $from, $to, $string ); |
27 | 30 | } |
28 | 31 | } |
29 | 32 | |
30 | 33 | if ( !function_exists( 'mb_substr' ) ) { |
31 | | - /** @codeCoverageIgnore */ |
| 34 | + /** |
| 35 | + * @codeCoverageIgnore |
| 36 | + * @return string |
| 37 | + */ |
32 | 38 | function mb_substr( $str, $start, $count='end' ) { |
33 | 39 | return Fallback::mb_substr( $str, $start, $count ); |
34 | 40 | } |
35 | 41 | |
36 | | - /** @codeCoverageIgnore */ |
| 42 | + /** |
| 43 | + * @codeCoverageIgnore |
| 44 | + * @return int |
| 45 | + */ |
37 | 46 | function mb_substr_split_unicode( $str, $splitPos ) { |
38 | 47 | return Fallback::mb_substr_split_unicode( $str, $splitPos ); |
39 | 48 | } |
40 | 49 | } |
41 | 50 | |
42 | 51 | if ( !function_exists( 'mb_strlen' ) ) { |
43 | | - /** @codeCoverageIgnore */ |
| 52 | + /** |
| 53 | + * @codeCoverageIgnore |
| 54 | + * @return int |
| 55 | + */ |
44 | 56 | function mb_strlen( $str, $enc = '' ) { |
45 | 57 | return Fallback::mb_strlen( $str, $enc ); |
46 | 58 | } |
47 | 59 | } |
48 | 60 | |
49 | 61 | if( !function_exists( 'mb_strpos' ) ) { |
50 | | - /** @codeCoverageIgnore */ |
| 62 | + /** |
| 63 | + * @codeCoverageIgnore |
| 64 | + * @return int |
| 65 | + */ |
51 | 66 | function mb_strpos( $haystack, $needle, $offset = 0, $encoding = '' ) { |
52 | 67 | return Fallback::mb_strpos( $haystack, $needle, $offset, $encoding ); |
53 | 68 | } |
— | — | @@ -54,7 +69,10 @@ |
55 | 70 | } |
56 | 71 | |
57 | 72 | if( !function_exists( 'mb_strrpos' ) ) { |
58 | | - /** @codeCoverageIgnore */ |
| 73 | + /** |
| 74 | + * @codeCoverageIgnore |
| 75 | + * @return int |
| 76 | + */ |
59 | 77 | function mb_strrpos( $haystack, $needle, $offset = 0, $encoding = '' ) { |
60 | 78 | return Fallback::mb_strrpos( $haystack, $needle, $offset, $encoding ); |
61 | 79 | } |
— | — | @@ -63,7 +81,10 @@ |
64 | 82 | |
65 | 83 | // Support for Wietse Venema's taint feature |
66 | 84 | if ( !function_exists( 'istainted' ) ) { |
67 | | - /** @codeCoverageIgnore */ |
| 85 | + /** |
| 86 | + * @codeCoverageIgnore |
| 87 | + * @return int |
| 88 | + */ |
68 | 89 | function istainted( $var ) { |
69 | 90 | return 0; |
70 | 91 | } |
— | — | @@ -885,6 +906,7 @@ |
886 | 907 | |
887 | 908 | /** |
888 | 909 | * Returns true if debug logging should be suppressed if $wgDebugRawPage = false |
| 910 | + * @return bool |
889 | 911 | */ |
890 | 912 | function wfIsDebugRawPage() { |
891 | 913 | static $cache; |
Index: trunk/phase3/includes/HttpFunctions.php |
— | — | @@ -376,6 +376,7 @@ |
377 | 377 | * |
378 | 378 | * @param $fh handle |
379 | 379 | * @param $content String |
| 380 | + * @return int |
380 | 381 | */ |
381 | 382 | public function read( $fh, $content ) { |
382 | 383 | $this->content .= $content; |
Index: trunk/phase3/includes/Cookie.php |
— | — | @@ -193,6 +193,7 @@ |
194 | 194 | |
195 | 195 | /** |
196 | 196 | * @see Cookie::serializeToHttpRequest |
| 197 | + * @return string |
197 | 198 | */ |
198 | 199 | public function serializeToHttpRequest( $path, $domain ) { |
199 | 200 | $cookies = array(); |
— | — | @@ -213,6 +214,7 @@ |
214 | 215 | * |
215 | 216 | * @param $cookie String |
216 | 217 | * @param $domain String: cookie's domain |
| 218 | + * @return null |
217 | 219 | */ |
218 | 220 | public function parseCookieResponseHeader ( $cookie, $domain ) { |
219 | 221 | $len = strlen( 'Set-Cookie:' ); |
Index: trunk/phase3/includes/actions/HistoryAction.php |
— | — | @@ -782,6 +782,7 @@ |
783 | 783 | |
784 | 784 | /** |
785 | 785 | * Get the "prevent clickjacking" flag |
| 786 | + * @return bool |
786 | 787 | */ |
787 | 788 | function getPreventClickjacking() { |
788 | 789 | return $this->preventClickjacking; |
Index: trunk/phase3/includes/api/ApiUpload.php |
— | — | @@ -113,6 +113,7 @@ |
114 | 114 | } |
115 | 115 | /** |
116 | 116 | * Get an uplaod result based on upload context |
| 117 | + * @return array |
117 | 118 | */ |
118 | 119 | private function getContextResult(){ |
119 | 120 | $warnings = $this->getApiWarnings(); |
— | — | @@ -131,7 +132,8 @@ |
132 | 133 | return $this->performUpload(); |
133 | 134 | } |
134 | 135 | /** |
135 | | - * Get Stash Result, throws an expetion if the file could not be stashed. |
| 136 | + * Get Stash Result, throws an expetion if the file could not be stashed. |
| 137 | + * @return array |
136 | 138 | */ |
137 | 139 | private function getStashResult(){ |
138 | 140 | $result = array (); |
— | — | @@ -149,6 +151,7 @@ |
150 | 152 | /** |
151 | 153 | * Get Warnings Result |
152 | 154 | * @param $warnings Array of Api upload warnings |
| 155 | + * @return array |
153 | 156 | */ |
154 | 157 | private function getWarningsResult( $warnings ){ |
155 | 158 | $result = array(); |
— | — | @@ -165,7 +168,8 @@ |
166 | 169 | return $result; |
167 | 170 | } |
168 | 171 | /** |
169 | | - * Get the result of a chunk upload. |
| 172 | + * Get the result of a chunk upload. |
| 173 | + * @return array |
170 | 174 | */ |
171 | 175 | private function getChunkResult(){ |
172 | 176 | $result = array(); |
Index: trunk/phase3/includes/db/DatabaseIbm_db2.php |
— | — | @@ -313,6 +313,7 @@ |
314 | 314 | |
315 | 315 | /** |
316 | 316 | * Returns true if this database supports (and uses) cascading deletes |
| 317 | + * @return bool |
317 | 318 | */ |
318 | 319 | function cascadingDeletes() { |
319 | 320 | return true; |
— | — | @@ -321,6 +322,7 @@ |
322 | 323 | /** |
323 | 324 | * Returns true if this database supports (and uses) triggers (e.g. on the |
324 | 325 | * page table) |
| 326 | + * @return bool |
325 | 327 | */ |
326 | 328 | function cleanupTriggers() { |
327 | 329 | return true; |
— | — | @@ -330,6 +332,7 @@ |
331 | 333 | * Returns true if this database is strict about what can be put into an |
332 | 334 | * IP field. |
333 | 335 | * Specifically, it uses a NULL value instead of an empty string. |
| 336 | + * @return bool |
334 | 337 | */ |
335 | 338 | function strictIPs() { |
336 | 339 | return true; |
— | — | @@ -337,13 +340,15 @@ |
338 | 341 | |
339 | 342 | /** |
340 | 343 | * Returns true if this database uses timestamps rather than integers |
341 | | - */ |
| 344 | + * @return bool |
| 345 | + */ |
342 | 346 | function realTimestamps() { |
343 | 347 | return true; |
344 | 348 | } |
345 | 349 | |
346 | 350 | /** |
347 | 351 | * Returns true if this database does an implicit sort when doing GROUP BY |
| 352 | + * @return bool |
348 | 353 | */ |
349 | 354 | function implicitGroupby() { |
350 | 355 | return false; |
— | — | @@ -353,6 +358,7 @@ |
354 | 359 | * Returns true if this database does an implicit order by when the column |
355 | 360 | * has an index |
356 | 361 | * For example: SELECT page_title FROM page LIMIT 1 |
| 362 | + * @return bool |
357 | 363 | */ |
358 | 364 | function implicitOrderby() { |
359 | 365 | return false; |
— | — | @@ -361,6 +367,7 @@ |
362 | 368 | /** |
363 | 369 | * Returns true if this database can do a native search on IP columns |
364 | 370 | * e.g. this works as expected: .. WHERE rc_ip = '127.42.12.102/32'; |
| 371 | + * @return bool |
365 | 372 | */ |
366 | 373 | function searchableIPs() { |
367 | 374 | return true; |
— | — | @@ -368,6 +375,7 @@ |
369 | 376 | |
370 | 377 | /** |
371 | 378 | * Returns true if this database can use functional indexes |
| 379 | + * @return bool |
372 | 380 | */ |
373 | 381 | function functionalIndexes() { |
374 | 382 | return true; |
— | — | @@ -375,6 +383,7 @@ |
376 | 384 | |
377 | 385 | /** |
378 | 386 | * Returns a unique string representing the wiki on the server |
| 387 | + * @return string |
379 | 388 | */ |
380 | 389 | public function getWikiID() { |
381 | 390 | if( $this->mSchema ) { |
— | — | @@ -546,6 +555,7 @@ |
547 | 556 | /** |
548 | 557 | * Closes a database connection, if it is open |
549 | 558 | * Returns success, true if already closed |
| 559 | + * @return bool |
550 | 560 | */ |
551 | 561 | public function close() { |
552 | 562 | $this->mOpened = false; |
— | — | @@ -562,6 +572,7 @@ |
563 | 573 | /** |
564 | 574 | * Retrieves the most current database error |
565 | 575 | * Forces a database rollback |
| 576 | + * @return bool|string |
566 | 577 | */ |
567 | 578 | public function lastError() { |
568 | 579 | $connerr = db2_conn_errormsg(); |
— | — | @@ -836,6 +847,7 @@ |
837 | 848 | * LIST_SET - comma separated with field names, like a SET clause |
838 | 849 | * LIST_NAMES - comma separated field names |
839 | 850 | * LIST_SET_PREPARED - like LIST_SET, except with ? tokens as values |
| 851 | + * @return string |
840 | 852 | */ |
841 | 853 | function makeList( $a, $mode = LIST_COMMA ) { |
842 | 854 | if ( !is_array( $a ) ) { |
— | — | @@ -873,6 +885,7 @@ |
874 | 886 | * @param $sql string SQL query we will append the limit too |
875 | 887 | * @param $limit integer the SQL limit |
876 | 888 | * @param $offset integer the SQL offset (default false) |
| 889 | + * @return string |
877 | 890 | */ |
878 | 891 | public function limitResult( $sql, $limit, $offset=false ) { |
879 | 892 | if( !is_numeric( $limit ) ) { |
— | — | @@ -1153,6 +1166,7 @@ |
1154 | 1167 | * DELETE query wrapper |
1155 | 1168 | * |
1156 | 1169 | * Use $conds == "*" to delete all rows |
| 1170 | + * @return bool|\ResultWrapper |
1157 | 1171 | */ |
1158 | 1172 | public function delete( $table, $conds, $fname = 'DatabaseIbm_db2::delete' ) { |
1159 | 1173 | if ( !$conds ) { |
— | — | @@ -1640,6 +1654,7 @@ |
1641 | 1655 | * in the appropriate places. |
1642 | 1656 | * @param $query String |
1643 | 1657 | * @param $args ... |
| 1658 | + * @return Resource |
1644 | 1659 | */ |
1645 | 1660 | public function safeQuery( $query, $args = null ) { |
1646 | 1661 | // copied verbatim from Database.php |
— | — | @@ -1674,6 +1689,7 @@ |
1675 | 1690 | |
1676 | 1691 | /** |
1677 | 1692 | * Switches module between regular and install modes |
| 1693 | + * @return string |
1678 | 1694 | */ |
1679 | 1695 | public function setMode( $mode ) { |
1680 | 1696 | $old = $this->mMode; |
Index: trunk/phase3/includes/db/Database.php |
— | — | @@ -641,6 +641,7 @@ |
642 | 642 | * Same as new factory( ... ), kept for backward compatibility |
643 | 643 | * @deprecated since 1.18 |
644 | 644 | * @see Database::factory() |
| 645 | + * @return DatabaseBase |
645 | 646 | */ |
646 | 647 | public final static function newFromType( $dbType, $p = array() ) { |
647 | 648 | wfDeprecated( __METHOD__, '1.18' ); |
Index: trunk/phase3/includes/db/DatabaseMssql.php |
— | — | @@ -46,6 +46,7 @@ |
47 | 47 | |
48 | 48 | /** |
49 | 49 | * Usually aborts on failure |
| 50 | + * @return bool|DatabaseBase|null |
50 | 51 | */ |
51 | 52 | function open( $server, $user, $password, $dbName ) { |
52 | 53 | # Test for driver support, to avoid suppressed fatal error |
— | — | @@ -107,6 +108,7 @@ |
108 | 109 | /** |
109 | 110 | * Closes a database connection, if it is open |
110 | 111 | * Returns success, true if already closed |
| 112 | + * @return bool |
111 | 113 | */ |
112 | 114 | function close() { |
113 | 115 | $this->mOpened = false; |
— | — | @@ -226,6 +228,7 @@ |
227 | 229 | |
228 | 230 | /** |
229 | 231 | * This must be called after nextSequenceVal |
| 232 | + * @return null |
230 | 233 | */ |
231 | 234 | function insertId() { |
232 | 235 | return $this->mInsertId; |
— | — | @@ -310,6 +313,7 @@ |
311 | 314 | * This is not necessarily an accurate estimate, so use sparingly |
312 | 315 | * Returns -1 if count cannot be found |
313 | 316 | * Takes same arguments as Database::select() |
| 317 | + * @return int |
314 | 318 | */ |
315 | 319 | function estimateRowCount( $table, $vars = '*', $conds = '', $fname = 'DatabaseMssql::estimateRowCount', $options = array() ) { |
316 | 320 | $options['EXPLAIN'] = true;// http://msdn2.microsoft.com/en-us/library/aa259203.aspx |
— | — | @@ -326,6 +330,7 @@ |
327 | 331 | /** |
328 | 332 | * Returns information about an index |
329 | 333 | * If errors are explicitly ignored, returns NULL on failure |
| 334 | + * @return array|bool|null |
330 | 335 | */ |
331 | 336 | function indexInfo( $table, $index, $fname = 'DatabaseMssql::indexExists' ) { |
332 | 337 | # This does not return the same info as MYSQL would, but that's OK because MediaWiki never uses the |
— | — | @@ -365,6 +370,7 @@ |
366 | 371 | * |
367 | 372 | * Usually aborts on failure |
368 | 373 | * If errors are explicitly ignored, returns success |
| 374 | + * @return bool |
369 | 375 | */ |
370 | 376 | function insert( $table, $arrToInsert, $fname = 'DatabaseMssql::insert', $options = array() ) { |
371 | 377 | # No rows to insert, easy just return now |
— | — | @@ -494,6 +500,7 @@ |
495 | 501 | * Source items may be literals rather than field names, but strings should be quoted with Database::addQuotes() |
496 | 502 | * $conds may be "*" to copy the whole table |
497 | 503 | * srcTable may be an array of tables. |
| 504 | + * @return null|\ResultWrapper |
498 | 505 | */ |
499 | 506 | function insertSelect( $destTable, $srcTable, $varMap, $conds, $fname = 'DatabaseMssql::insertSelect', |
500 | 507 | $insertOptions = array(), $selectOptions = array() ) { |
— | — | @@ -511,6 +518,7 @@ |
512 | 519 | |
513 | 520 | /** |
514 | 521 | * Return the next in a sequence, save the value for retrieval via insertId() |
| 522 | + * @return |
515 | 523 | */ |
516 | 524 | function nextSequenceValue( $seqName ) { |
517 | 525 | if ( !$this->tableExists( 'sequence_' . $seqName ) ) { |
— | — | @@ -527,6 +535,7 @@ |
528 | 536 | |
529 | 537 | /** |
530 | 538 | * Return the current value of a sequence. Assumes it has ben nextval'ed in this session. |
| 539 | + * @return |
531 | 540 | */ |
532 | 541 | function currentSequenceValue( $seqName ) { |
533 | 542 | $ret = sqlsrv_query( $this->mConn, "SELECT TOP 1 id FROM [sequence_$seqName] ORDER BY id DESC" ); |
— | — | @@ -559,6 +568,7 @@ |
560 | 569 | * $sql string SQL query we will append the limit too |
561 | 570 | * $limit integer the SQL limit |
562 | 571 | * $offset integer the SQL offset (default false) |
| 572 | + * @return mixed|string |
563 | 573 | */ |
564 | 574 | function limitResult( $sql, $limit, $offset = false ) { |
565 | 575 | if ( $offset === false || $offset == 0 ) { |
— | — | @@ -647,6 +657,7 @@ |
648 | 658 | |
649 | 659 | /** |
650 | 660 | * Query whether a given column exists in the mediawiki schema |
| 661 | + * @return bool |
651 | 662 | */ |
652 | 663 | function fieldExists( $table, $field, $fname = 'DatabaseMssql::fieldExists' ) { |
653 | 664 | $table = $this->tableName( $table ); |
— | — | @@ -707,6 +718,7 @@ |
708 | 719 | * Escapes a identifier for use inm SQL. |
709 | 720 | * Throws an exception if it is invalid. |
710 | 721 | * Reference: http://msdn.microsoft.com/en-us/library/aa224033%28v=SQL.80%29.aspx |
| 722 | + * @return string |
711 | 723 | */ |
712 | 724 | private function escapeIdentifier( $identifier ) { |
713 | 725 | if ( strlen( $identifier ) == 0 ) { |
— | — | @@ -795,6 +807,7 @@ |
796 | 808 | |
797 | 809 | /** |
798 | 810 | * @private |
| 811 | + * @return string |
799 | 812 | */ |
800 | 813 | function tableNamesWithUseIndexOrJOIN( $tables, $use_index = array(), $join_conds = array() ) { |
801 | 814 | $ret = array(); |
— | — | @@ -893,6 +906,7 @@ |
894 | 907 | |
895 | 908 | /** |
896 | 909 | * Get the type of the DBMS, as it appears in $wgDBtype. |
| 910 | + * @return string |
897 | 911 | */ |
898 | 912 | function getType(){ |
899 | 913 | return 'mssql'; |
— | — | @@ -909,6 +923,7 @@ |
910 | 924 | /** |
911 | 925 | * Since MSSQL doesn't recognize the infinity keyword, set date manually. |
912 | 926 | * @todo Remove magic date |
| 927 | + * @return string |
913 | 928 | */ |
914 | 929 | public function getInfinity() { |
915 | 930 | return '3000-01-31 00:00:00.000'; |
Index: trunk/phase3/includes/db/DatabaseSqlite.php |
— | — | @@ -497,6 +497,7 @@ |
498 | 498 | |
499 | 499 | /** |
500 | 500 | * Based on generic method (parent) with some prior SQLite-sepcific adjustments |
| 501 | + * @return bool |
501 | 502 | */ |
502 | 503 | function insert( $table, $a, $fname = 'DatabaseSqlite::insert', $options = array() ) { |
503 | 504 | if ( !count( $a ) ) { |
— | — | @@ -723,6 +724,7 @@ |
724 | 725 | |
725 | 726 | /** |
726 | 727 | * No-op version of deadlockLoop |
| 728 | + * @return mixed |
727 | 729 | */ |
728 | 730 | public function deadlockLoop( /*...*/ ) { |
729 | 731 | $args = func_get_args(); |
Index: trunk/phase3/includes/db/DatabaseOracle.php |
— | — | @@ -226,6 +226,7 @@ |
227 | 227 | |
228 | 228 | /** |
229 | 229 | * Usually aborts on failure |
| 230 | + * @return DatabaseBase|null |
230 | 231 | */ |
231 | 232 | function open( $server, $user, $password, $dbName ) { |
232 | 233 | if ( !function_exists( 'oci_connect' ) ) { |
— | — | @@ -285,6 +286,7 @@ |
286 | 287 | /** |
287 | 288 | * Closes a database connection, if it is open |
288 | 289 | * Returns success, true if already closed |
| 290 | + * @return bool |
289 | 291 | */ |
290 | 292 | function close() { |
291 | 293 | $this->mOpened = false; |
— | — | @@ -401,6 +403,7 @@ |
402 | 404 | |
403 | 405 | /** |
404 | 406 | * This must be called after nextSequenceVal |
| 407 | + * @return null |
405 | 408 | */ |
406 | 409 | function insertId() { |
407 | 410 | return $this->mInsertId; |
— | — | @@ -439,6 +442,7 @@ |
440 | 443 | /** |
441 | 444 | * Returns information about an index |
442 | 445 | * If errors are explicitly ignored, returns NULL on failure |
| 446 | + * @return bool |
443 | 447 | */ |
444 | 448 | function indexInfo( $table, $index, $fname = 'DatabaseOracle::indexExists' ) { |
445 | 449 | return false; |
— | — | @@ -679,6 +683,7 @@ |
680 | 684 | } |
681 | 685 | /** |
682 | 686 | * Return the next in a sequence, save the value for retrieval via insertId() |
| 687 | + * @return null |
683 | 688 | */ |
684 | 689 | function nextSequenceValue( $seqName ) { |
685 | 690 | $res = $this->query( "SELECT $seqName.nextval FROM dual" ); |
— | — | @@ -689,6 +694,7 @@ |
690 | 695 | |
691 | 696 | /** |
692 | 697 | * Return sequence_name if table has a sequence |
| 698 | + * @return bool |
693 | 699 | */ |
694 | 700 | private function getSequenceData( $table ) { |
695 | 701 | if ( $this->sequenceData == null ) { |
— | — | @@ -836,6 +842,7 @@ |
837 | 843 | |
838 | 844 | /** |
839 | 845 | * Query whether a given index exists |
| 846 | + * @return bool |
840 | 847 | */ |
841 | 848 | function indexExists( $table, $index, $fname = 'DatabaseOracle::indexExists' ) { |
842 | 849 | $table = $this->tableName( $table ); |
— | — | @@ -855,6 +862,7 @@ |
856 | 863 | |
857 | 864 | /** |
858 | 865 | * Query whether a given table exists (in the given schema, or the default mw one if not given) |
| 866 | + * @return int |
859 | 867 | */ |
860 | 868 | function tableExists( $table, $fname = __METHOD__ ) { |
861 | 869 | $table = $this->tableName( $table ); |
Index: trunk/phase3/includes/db/DatabasePostgres.php |
— | — | @@ -145,6 +145,7 @@ |
146 | 146 | |
147 | 147 | /** |
148 | 148 | * Usually aborts on failure |
| 149 | + * @return DatabaseBase|null |
149 | 150 | */ |
150 | 151 | function open( $server, $user, $password, $dbName ) { |
151 | 152 | # Test for Postgres support, to avoid suppressed fatal error |
— | — | @@ -237,6 +238,7 @@ |
238 | 239 | /** |
239 | 240 | * Closes a database connection, if it is open |
240 | 241 | * Returns success, true if already closed |
| 242 | + * @return bool |
241 | 243 | */ |
242 | 244 | function close() { |
243 | 245 | $this->mOpened = false; |
— | — | @@ -331,6 +333,7 @@ |
332 | 334 | |
333 | 335 | /** |
334 | 336 | * This must be called after nextSequenceVal |
| 337 | + * @return null |
335 | 338 | */ |
336 | 339 | function insertId() { |
337 | 340 | return $this->mInsertId; |
— | — | @@ -371,6 +374,7 @@ |
372 | 375 | * This is not necessarily an accurate estimate, so use sparingly |
373 | 376 | * Returns -1 if count cannot be found |
374 | 377 | * Takes same arguments as Database::select() |
| 378 | + * @return int |
375 | 379 | */ |
376 | 380 | function estimateRowCount( $table, $vars = '*', $conds='', $fname = 'DatabasePostgres::estimateRowCount', $options = array() ) { |
377 | 381 | $options['EXPLAIN'] = true; |
— | — | @@ -389,6 +393,7 @@ |
390 | 394 | /** |
391 | 395 | * Returns information about an index |
392 | 396 | * If errors are explicitly ignored, returns NULL on failure |
| 397 | + * @return bool|null |
393 | 398 | */ |
394 | 399 | function indexInfo( $table, $index, $fname = 'DatabasePostgres::indexInfo' ) { |
395 | 400 | $sql = "SELECT indexname FROM pg_indexes WHERE tablename='$table'"; |
— | — | @@ -555,6 +560,7 @@ |
556 | 561 | * $conds may be "*" to copy the whole table |
557 | 562 | * srcTable may be an array of tables. |
558 | 563 | * @todo FIXME: Implement this a little better (seperate select/insert)? |
| 564 | + * @return bool |
559 | 565 | */ |
560 | 566 | function insertSelect( $destTable, $srcTable, $varMap, $conds, $fname = 'DatabasePostgres::insertSelect', |
561 | 567 | $insertOptions = array(), $selectOptions = array() ) |
— | — | @@ -637,6 +643,7 @@ |
638 | 644 | |
639 | 645 | /** |
640 | 646 | * Return the next in a sequence, save the value for retrieval via insertId() |
| 647 | + * @return null |
641 | 648 | */ |
642 | 649 | function nextSequenceValue( $seqName ) { |
643 | 650 | $safeseq = str_replace( "'", "''", $seqName ); |
— | — | @@ -648,6 +655,7 @@ |
649 | 656 | |
650 | 657 | /** |
651 | 658 | * Return the current value of a sequence. Assumes it has been nextval'ed in this session. |
| 659 | + * @return |
652 | 660 | */ |
653 | 661 | function currentSequenceValue( $seqName ) { |
654 | 662 | $safeseq = str_replace( "'", "''", $seqName ); |
— | — | @@ -747,6 +755,7 @@ |
748 | 756 | /** |
749 | 757 | * Query whether a given relation exists (in the given schema, or the |
750 | 758 | * default mw one if not given) |
| 759 | + * @return bool |
751 | 760 | */ |
752 | 761 | function relationExists( $table, $types, $schema = false ) { |
753 | 762 | global $wgDBmwschema; |
— | — | @@ -770,6 +779,7 @@ |
771 | 780 | /** |
772 | 781 | * For backward compatibility, this function checks both tables and |
773 | 782 | * views. |
| 783 | + * @return bool |
774 | 784 | */ |
775 | 785 | function tableExists( $table, $fname = __METHOD__, $schema = false ) { |
776 | 786 | return $this->relationExists( $table, array( 'r', 'v' ), $schema ); |
— | — | @@ -833,6 +843,7 @@ |
834 | 844 | |
835 | 845 | /** |
836 | 846 | * Query whether a given schema exists. Returns true if it does, false if it doesn't. |
| 847 | + * @return bool |
837 | 848 | */ |
838 | 849 | function schemaExists( $schema ) { |
839 | 850 | $exists = $this->selectField( '"pg_catalog"."pg_namespace"', 1, |
— | — | @@ -842,6 +853,7 @@ |
843 | 854 | |
844 | 855 | /** |
845 | 856 | * Returns true if a given role (i.e. user) exists, false otherwise. |
| 857 | + * @return bool |
846 | 858 | */ |
847 | 859 | function roleExists( $roleName ) { |
848 | 860 | $exists = $this->selectField( '"pg_catalog"."pg_roles"', 1, |
— | — | @@ -855,6 +867,7 @@ |
856 | 868 | |
857 | 869 | /** |
858 | 870 | * pg_field_type() wrapper |
| 871 | + * @return string |
859 | 872 | */ |
860 | 873 | function fieldType( $res, $index ) { |
861 | 874 | if ( $res instanceof ResultWrapper ) { |
Index: trunk/phase3/includes/debug/Debug.php |
— | — | @@ -87,6 +87,7 @@ |
88 | 88 | |
89 | 89 | /** |
90 | 90 | * Returns internal log array |
| 91 | + * @return array |
91 | 92 | */ |
92 | 93 | public static function getLog() { |
93 | 94 | return self::$log; |
Index: trunk/phase3/includes/ChangesList.php |
— | — | @@ -364,6 +364,7 @@ |
365 | 365 | * Insert a formatted action |
366 | 366 | * |
367 | 367 | * @param $rc RecentChange |
| 368 | + * @return string |
368 | 369 | */ |
369 | 370 | public function insertLogEntry( $rc ) { |
370 | 371 | $formatter = LogFormatter::newFromRow( $rc->mAttribs ); |
— | — | @@ -375,6 +376,7 @@ |
376 | 377 | /** |
377 | 378 | * Insert a formatted comment |
378 | 379 | * @param $rc RecentChange |
| 380 | + * @return string |
379 | 381 | */ |
380 | 382 | public function insertComment( $rc ) { |
381 | 383 | if( $rc->mAttribs['rc_type'] != RC_MOVE && $rc->mAttribs['rc_type'] != RC_MOVE_OVER_REDIRECT ) { |
— | — | @@ -397,6 +399,7 @@ |
398 | 400 | |
399 | 401 | /** |
400 | 402 | * Returns the string which indicates the number of watching users |
| 403 | + * @return string |
401 | 404 | */ |
402 | 405 | protected function numberofWatchingusers( $count ) { |
403 | 406 | static $cache = array(); |
— | — | @@ -514,6 +517,7 @@ |
515 | 518 | * Format a line using the old system (aka without any javascript). |
516 | 519 | * |
517 | 520 | * @param $rc RecentChange |
| 521 | + * @return string |
518 | 522 | */ |
519 | 523 | public function recentChangesLine( &$rc, $watched = false, $linenumber = null ) { |
520 | 524 | global $wgRCShowChangedSize; |
— | — | @@ -779,6 +783,7 @@ |
780 | 784 | |
781 | 785 | /** |
782 | 786 | * Enhanced RC group |
| 787 | + * @return string |
783 | 788 | */ |
784 | 789 | protected function recentChangesBlockGroup( $block ) { |
785 | 790 | global $wgRCShowChangedSize; |