r64227 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r64226‎ | r64227 | r64228 >
Date:21:55, 26 March 2010
Author:ialex
Status:ok (Comments)
Tags:
Comment:
Fixed some doxygen warnings
Modified paths:
  • /trunk/phase3/includes/filerepo/FSRepo.php (modified) (history)
  • /trunk/phase3/includes/filerepo/File.php (modified) (history)
  • /trunk/phase3/includes/filerepo/FileRepo.php (modified) (history)
  • /trunk/phase3/includes/filerepo/ForeignDBRepo.php (modified) (history)
  • /trunk/phase3/includes/filerepo/Image.php (modified) (history)
  • /trunk/phase3/includes/filerepo/LocalFile.php (modified) (history)
  • /trunk/phase3/includes/filerepo/LocalRepo.php (modified) (history)
  • /trunk/phase3/includes/filerepo/OldLocalFile.php (modified) (history)
  • /trunk/phase3/includes/filerepo/RepoGroup.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/OldLocalFile.php
@@ -73,7 +73,7 @@
7474 * @param $title Title
7575 * @param $repo FileRepo
7676 * @param $time String: timestamp or null to load by archive name
77 - * @param $archiveNameString: archive name or null to load by timestamp
 77+ * @param $archiveName String: archive name or null to load by timestamp
7878 */
7979 function __construct( $title, $repo, $time, $archiveName ) {
8080 parent::__construct( $title, $repo );
Index: trunk/phase3/includes/filerepo/LocalFile.php
@@ -747,7 +747,8 @@
748748 * @param $props Array: File properties, if known. This can be used to reduce the
749749 * upload time when uploading virtual URLs for which the file info
750750 * is already known
751 - * @param string $timestamp Timestamp for img_timestamp, or false to use the current time
 751+ * @param $timestamp String: timestamp for img_timestamp, or false to use the current time
 752+ * @param $user Mixed: User object or null to use $wgUser
752753 *
753754 * @return FileRepoStatus object. On success, the value member contains the
754755 * archive name, or an empty string if it was a new file.
@@ -954,7 +955,7 @@
955956 * The archive name should be passed through to recordUpload for database
956957 * registration.
957958 *
958 - * @param $sourcePath String: local filesystem path to the source image
 959+ * @param $srcPath String: local filesystem path to the source image
959960 * @param $flags Integer: a bitwise combination of:
960961 * File::DELETE_SOURCE Delete the source file, i.e. move
961962 * rather than copy
Index: trunk/phase3/includes/filerepo/FSRepo.php
@@ -132,8 +132,8 @@
133133 /**
134134 * Store a batch of files
135135 *
136 - * @param array $triplets (src,zone,dest) triplets as per store()
137 - * @param integer $flags Bitwise combination of the following flags:
 136+ * @param $triplets Array: (src,zone,dest) triplets as per store()
 137+ * @param $flags Integer: bitwise combination of the following flags:
138138 * self::DELETE_SOURCE Delete the source file after upload
139139 * self::OVERWRITE Overwrite an existing destination file instead of failing
140140 * self::OVERWRITE_SAME Overwrite the file if the destination exists and has the
@@ -267,8 +267,8 @@
268268 /**
269269 * Checks existence of specified array of files.
270270 *
271 - * @param array $files URLs of files to check
272 - * @param integer $flags Bitwise combination of the following flags:
 271+ * @param $files Array: URLs of files to check
 272+ * @param $flags Integer: bitwise combination of the following flags:
273273 * self::FILES_ONLY Mark file as existing only if it is a file (not directory)
274274 * @return Either array of files and existence flags, or false
275275 */
@@ -307,9 +307,9 @@
308308
309309 /**
310310 * Pick a random name in the temp zone and store a file to it.
311 - * @param string $originalName The base name of the file as specified
 311+ * @param $originalName String: the base name of the file as specified
312312 * by the user. The file extension will be maintained.
313 - * @param string $srcPath The current location of the file.
 313+ * @param $srcPath String: the current location of the file.
314314 * @return FileRepoStatus object with the URL in the value.
315315 */
316316 function storeTemp( $originalName, $srcPath ) {
@@ -325,8 +325,8 @@
326326
327327 /**
328328 * Remove a temporary file or mark it for garbage collection
329 - * @param string $virtualUrl The virtual URL returned by storeTemp
330 - * @return boolean True on success, false on failure
 329+ * @param $virtualUrl String: the virtual URL returned by storeTemp
 330+ * @return Boolean: true on success, false on failure
331331 */
332332 function freeTemp( $virtualUrl ) {
333333 $temp = "mwrepo://{$this->name}/temp";
@@ -343,8 +343,8 @@
344344
345345 /**
346346 * Publish a batch of files
347 - * @param array $triplets (source,dest,archive) triplets as per publish()
348 - * @param integer $flags Bitfield, may be FileRepo::DELETE_SOURCE to indicate
 347+ * @param $triplets Array: (source,dest,archive) triplets as per publish()
 348+ * @param $flags Integer: bitfield, may be FileRepo::DELETE_SOURCE to indicate
349349 * that the source files should be deleted if possible
350350 */
351351 function publishBatch( $triplets, $flags = 0 ) {
@@ -454,7 +454,7 @@
455455 * If no valid deletion archive is configured, this may either delete the
456456 * file or throw an exception, depending on the preference of the repository.
457457 *
458 - * @param array $sourceDestPairs Array of source/destination pairs. Each element
 458+ * @param $sourceDestPairs Array of source/destination pairs. Each element
459459 * is a two-element array containing the source file path relative to the
460460 * public root in the first element, and the archive file path relative
461461 * to the deleted zone root in the second element.
@@ -615,7 +615,7 @@
616616
617617 /**
618618 * Chmod a file, supressing the warnings.
619 - * @param String $path The path to change
 619+ * @param $path String: the path to change
620620 */
621621 protected function chmod( $path ) {
622622 wfSuppressWarnings();
Index: trunk/phase3/includes/filerepo/FileRepo.php
@@ -49,12 +49,13 @@
5050
5151 /**
5252 * Create a new File object from the local repository
53 - * @param mixed $title Title object or string
54 - * @param mixed $time Time at which the image was uploaded.
55 - * If this is specified, the returned object will be an
56 - * instance of the repository's old file class instead of
57 - * a current file. Repositories not supporting version
58 - * control should return false if this parameter is set.
 53+ *
 54+ * @param $title Mixed: Title object or string
 55+ * @param $time Mixed: Time at which the image was uploaded.
 56+ * If this is specified, the returned object will be an
 57+ * instance of the repository's old file class instead of a
 58+ * current file. Repositories not supporting version control
 59+ * should return false if this parameter is set.
5960 */
6061 function newFile( $title, $time = false ) {
6162 if ( !($title instanceof Title) ) {
@@ -79,7 +80,7 @@
8081 * Returns false if the file does not exist. Repositories not supporting
8182 * version control should return false if the time is specified.
8283 *
83 - * @param mixed $title Title object or string
 84+ * @param $title Mixed: Title object or string
8485 * @param $options Associative array of options:
8586 * time: requested time for an archived image, or false for the
8687 * current version. An image object will be returned which was
@@ -144,7 +145,7 @@
145146
146147 /*
147148 * Find many files at once.
148 - * @param array $items, an array of titles, or an array of findFile() options with
 149+ * @param $items An array of titles, or an array of findFile() options with
149150 * the "title" option giving the title. Example:
150151 *
151152 * $findItem = array( 'title' => $title, 'private' => true );
@@ -171,12 +172,12 @@
172173
173174 /**
174175 * Create a new File object from the local repository
175 - * @param mixed $sha1 SHA-1 key
176 - * @param mixed $time Time at which the image was uploaded.
177 - * If this is specified, the returned object will be an
178 - * instance of the repository's old file class instead of
179 - * a current file. Repositories not supporting version
180 - * control should return false if this parameter is set.
 176+ * @param $sha1 Mixed: SHA-1 key
 177+ * @param $time Mixed: time at which the image was uploaded.
 178+ * If this is specified, the returned object will be an
 179+ * of the repository's old file class instead of a current
 180+ * file. Repositories not supporting version control should
 181+ * return false if this parameter is set.
181182 */
182183 function newFileFromKey( $sha1, $time = false ) {
183184 if ( $time ) {
@@ -195,8 +196,8 @@
196197 * Returns false if the file does not exist. Repositories not supporting
197198 * version control should return false if the time is specified.
198199 *
199 - * @param string $sha1 string
200 - * @param array $options Option array, same as findFile().
 200+ * @param $sha1 String
 201+ * @param $options Option array, same as findFile().
201202 */
202203 function findFileFromKey( $sha1, $options = array() ) {
203204 if ( !is_array( $options ) ) {
@@ -237,7 +238,7 @@
238239
239240 /**
240241 * Get the URL corresponding to one of the four basic zones
241 - * @param String $zone One of: public, deleted, temp, thumb
 242+ * @param $zone String: one of: public, deleted, temp, thumb
242243 * @return String or false
243244 */
244245 function getZoneUrl( $zone ) {
@@ -336,8 +337,8 @@
337338 * MediaWiki this means action=render. This should only be called by the
338339 * repository's file class, since it may return invalid results. User code
339340 * should use File::getDescriptionText().
340 - * @param string $name Name of image to fetch
341 - * @param string $lang Language to fetch it in, if any.
 341+ * @param $name String: name of image to fetch
 342+ * @param $lang String: language to fetch it in, if any.
342343 */
343344 function getDescriptionRenderUrl( $name, $lang = null ) {
344345 $query = 'action=render';
@@ -361,10 +362,10 @@
362363 /**
363364 * Store a file to a given destination.
364365 *
365 - * @param string $srcPath Source path or virtual URL
366 - * @param string $dstZone Destination zone
367 - * @param string $dstRel Destination relative path
368 - * @param integer $flags Bitwise combination of the following flags:
 366+ * @param $srcPath String: source path or virtual URL
 367+ * @param $dstZone String: destination zone
 368+ * @param $dstRel String: destination relative path
 369+ * @param $flags Integer: bitwise combination of the following flags:
369370 * self::DELETE_SOURCE Delete the source file after upload
370371 * self::OVERWRITE Overwrite an existing destination file instead of failing
371372 * self::OVERWRITE_SAME Overwrite the file if the destination exists and has the
@@ -382,8 +383,8 @@
383384 /**
384385 * Store a batch of files
385386 *
386 - * @param array $triplets (src,zone,dest) triplets as per store()
387 - * @param integer $flags Flags as per store
 387+ * @param $triplets Array: (src,zone,dest) triplets as per store()
 388+ * @param $flags Integer: flags as per store
388389 */
389390 abstract function storeBatch( $triplets, $flags = 0 );
390391
@@ -391,18 +392,18 @@
392393 * Pick a random name in the temp zone and store a file to it.
393394 * Returns a FileRepoStatus object with the URL in the value.
394395 *
395 - * @param string $originalName The base name of the file as specified
 396+ * @param $originalName String: the base name of the file as specified
396397 * by the user. The file extension will be maintained.
397 - * @param string $srcPath The current location of the file.
 398+ * @param $srcPath String: the current location of the file.
398399 */
399400 abstract function storeTemp( $originalName, $srcPath );
400401
401402
402403 /**
403404 * Append the contents of the source path to the given file.
404 - * @param $srcPath string location of the source file
405 - * @param $toAppendPath string path to append to.
406 - * @param $flags Bitfield, may be FileRepo::DELETE_SOURCE to indicate
 405+ * @param $srcPath String: location of the source file
 406+ * @param $toAppendPath String: path to append to.
 407+ * @param $flags Integer: bitfield, may be FileRepo::DELETE_SOURCE to indicate
407408 * that the source file should be deleted if possible
408409 * @return mixed Status or false
409410 */
@@ -410,8 +411,8 @@
411412
412413 /**
413414 * Remove a temporary file or mark it for garbage collection
414 - * @param string $virtualUrl The virtual URL returned by storeTemp
415 - * @return boolean True on success, false on failure
 415+ * @param $virtualUrl String: the virtual URL returned by storeTemp
 416+ * @return Boolean: true on success, false on failure
416417 * STUB
417418 */
418419 function freeTemp( $virtualUrl ) {
@@ -425,11 +426,11 @@
426427 * Returns a FileRepoStatus object. On success, the value contains "new" or
427428 * "archived", to indicate whether the file was new with that name.
428429 *
429 - * @param string $srcPath The source path or URL
430 - * @param string $dstRel The destination relative path
431 - * @param string $archiveRel The relative path where the existing file is to
 430+ * @param $srcPath String: the source path or URL
 431+ * @param $dstRel String: the destination relative path
 432+ * @param $archiveRel String: rhe relative path where the existing file is to
432433 * be archived, if there is one. Relative to the public zone root.
433 - * @param integer $flags Bitfield, may be FileRepo::DELETE_SOURCE to indicate
 434+ * @param $flags Integer: bitfield, may be FileRepo::DELETE_SOURCE to indicate
434435 * that the source file should be deleted if possible
435436 */
436437 function publish( $srcPath, $dstRel, $archiveRel, $flags = 0 ) {
@@ -447,8 +448,8 @@
448449
449450 /**
450451 * Publish a batch of files
451 - * @param array $triplets (source,dest,archive) triplets as per publish()
452 - * @param integer $flags Bitfield, may be FileRepo::DELETE_SOURCE to indicate
 452+ * @param $triplets Array: (source,dest,archive) triplets as per publish()
 453+ * @param $flags Integer: bitfield, may be FileRepo::DELETE_SOURCE to indicate
453454 * that the source files should be deleted if possible
454455 */
455456 abstract function publishBatch( $triplets, $flags = 0 );
@@ -461,8 +462,8 @@
462463 /**
463464 * Checks existence of an array of files.
464465 *
465 - * @param array $files URLs (or paths) of files to check
466 - * @param integer $flags Bitwise combination of the following flags:
 466+ * @param $files Array: URLs (or paths) of files to check
 467+ * @param $flags Integer: bitwise combination of the following flags:
467468 * self::FILES_ONLY Mark file as existing only if it is a file (not directory)
468469 * @return Either array of files and existence flags, or false
469470 */
@@ -478,7 +479,7 @@
479480 * assumes a naming scheme in the deleted zone based on content hash, as
480481 * opposed to the public zone which is assumed to be unique.
481482 *
482 - * @param array $sourceDestPairs Array of source/destination pairs. Each element
 483+ * @param $sourceDestPairs Array of source/destination pairs. Each element
483484 * is a two-element array containing the source file path relative to the
484485 * public root in the first element, and the archive file path relative
485486 * to the deleted zone root in the second element.
@@ -490,8 +491,8 @@
491492 * Move a file to the deletion archive.
492493 * If no valid deletion archive exists, this may either delete the file
493494 * or throw an exception, depending on the preference of the repository
494 - * @param mixed $srcRel Relative path for the file to be deleted
495 - * @param mixed $archiveRel Relative path for the archive location.
 495+ * @param $srcRel Mixed: relative path for the file to be deleted
 496+ * @param $archiveRel Mixed: relative path for the archive location.
496497 * Relative to a private archive directory.
497498 * @return WikiError object (wikitext-formatted), or true for success
498499 */
@@ -589,7 +590,7 @@
590591 * title object. If not, return false.
591592 * STUB
592593 *
593 - * @param Title $title Title of image
 594+ * @param $title Title of image
594595 */
595596 function checkRedirect( $title ) {
596597 return false;
@@ -600,7 +601,7 @@
601602 * Doesn't do anything for repositories that don't support image redirects.
602603 *
603604 * STUB
604 - * @param Title $title Title of image
 605+ * @param $title Title of image
605606 */
606607 function invalidateImageRedirect( $title ) {}
607608
Index: trunk/phase3/includes/filerepo/File.php
@@ -501,7 +501,7 @@
502502 /**
503503 * As createThumb, but returns a ThumbnailImage object. This can
504504 * provide access to the actual file, the real size of the thumb,
505 - * and can produce a convenient <img> tag for you.
 505+ * and can produce a convenient \<img\> tag for you.
506506 *
507507 * For non-image formats, this may return a filetype-specific icon.
508508 *
@@ -850,7 +850,7 @@
851851 * The archive name should be passed through to recordUpload for database
852852 * registration.
853853 *
854 - * @param $sourcePath String: local filesystem path to the source image
 854+ * @param $srcPath String: local filesystem path to the source image
855855 * @param $flags Integer: a bitwise combination of:
856856 * File::DELETE_SOURCE Delete the source file, i.e. move
857857 * rather than copy
Index: trunk/phase3/includes/filerepo/LocalRepo.php
@@ -71,7 +71,7 @@
7272 /**
7373 * Checks if there is a redirect named as $title
7474 *
75 - * @param Title $title Title of image
 75+ * @param $title Title of file
7676 */
7777 function checkRedirect( $title ) {
7878 global $wgMemc;
@@ -189,8 +189,8 @@
190190 /**
191191 * Invalidates image redirect cache related to that image
192192 *
193 - * @param Title $title Title of image
194 - */
 193+ * @param $title Title of page
 194+ */
195195 function invalidateImageRedirect( $title ) {
196196 global $wgMemc;
197197 $memcKey = $this->getSharedCacheKey( 'image_redirect', md5( $title->getDBkey() ) );
Index: trunk/phase3/includes/filerepo/RepoGroup.php
@@ -48,7 +48,9 @@
4949
5050 /**
5151 * Construct a group of file repositories.
52 - * @param array $data Array of repository info arrays.
 52+ *
 53+ * @param $localInfo Associative array for local repo's info
 54+ * @param $foreignInfo Array of repository info arrays.
5355 * Each info array is an associative array with the 'class' member
5456 * giving the class name. The entire array is passed to the repository
5557 * constructor as the first parameter.
@@ -62,7 +64,8 @@
6365 /**
6466 * Search repositories for an image.
6567 * You can also use wfFindFile() to do this.
66 - * @param mixed $title Title object or string
 68+ *
 69+ * @param $title Mixed: Title object or string
6770 * @param $options Associative array of options:
6871 * time: requested time for an archived image, or false for the
6972 * current version. An image object will be returned which was
@@ -243,8 +246,8 @@
244247 * Call a function for each foreign repo, with the repo object as the
245248 * first parameter.
246249 *
247 - * @param $callback callback The function to call
248 - * @param $params array Optional additional parameters to pass to the function
 250+ * @param $callback Callback: the function to call
 251+ * @param $params Array: optional additional parameters to pass to the function
249252 */
250253 function forEachForeignRepo( $callback, $params = array() ) {
251254 foreach( $this->foreignRepos as $repo ) {
@@ -258,7 +261,7 @@
259262
260263 /**
261264 * Does the installation have any foreign repos set up?
262 - * @return bool
 265+ * @return Boolean
263266 */
264267 function hasForeignRepos() {
265268 return (bool)$this->foreignRepos;
Index: trunk/phase3/includes/filerepo/Image.php
@@ -30,7 +30,7 @@
3131 * Wrapper for wfFindFile(), for backwards-compatibility only.
3232 * Do not use in core code.
3333 *
34 - * @param string $name name of the image, used to create a title object using Title::makeTitleSafe
 34+ * @param $name String: name of the image, used to create a title object using Title::makeTitleSafe
3535 * @return image object or null if invalid title
3636 * @deprecated
3737 */
@@ -55,8 +55,8 @@
5656 * Note that fromSharedDirectory will only use the shared path for files
5757 * that actually exist there now, and will return local paths otherwise.
5858 *
59 - * @param string $name Name of the image, without the leading "Image:"
60 - * @param boolean $fromSharedDirectory Should this be in $wgSharedUploadPath?
 59+ * @param $name String: name of the image, without the leading "Image:"
 60+ * @param $fromSharedDirectory Boolean: Should this be in $wgSharedUploadPath?
6161 * @return string URL of $name image
6262 * @deprecated
6363 */
Index: trunk/phase3/includes/filerepo/ForeignDBRepo.php
@@ -65,7 +65,7 @@
6666 function publish( $srcPath, $dstRel, $archiveRel, $flags = 0 ) {
6767 throw new MWException( get_class($this) . ': write operations are not supported' );
6868 }
69 - function deleteBatch( $fileMap ) {
 69+ function deleteBatch( $sourceDestPairs ) {
7070 throw new MWException( get_class($this) . ': write operations are not supported' );
7171 }
7272 }

Comments

#Comment by Bryan (talk | contribs)   22:34, 26 March 2010

The usage of a colon is not consistent in this commit.

Status & tagging log