r64177 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r64176‎ | r64177 | r64178 >
Date:20:12, 25 March 2010
Author:ialex
Status:ok
Tags:
Comment:
Fixed some doxygen warnings
Modified paths:
  • /trunk/phase3/includes/filerepo/File.php (modified) (history)
  • /trunk/phase3/includes/filerepo/LocalFile.php (modified) (history)
  • /trunk/phase3/includes/filerepo/OldLocalFile.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/OldLocalFile.php
@@ -70,10 +70,10 @@
7171 }
7272
7373 /**
74 - * @param Title $title
75 - * @param FileRepo $repo
76 - * @param string $time Timestamp or null to load by archive name
77 - * @param string $archiveName Archive name or null to load by timestamp
 74+ * @param $title Title
 75+ * @param $repo FileRepo
 76+ * @param $time String: timestamp or null to load by archive name
 77+ * @param $archiveNameString: archive name or null to load by timestamp
7878 */
7979 function __construct( $title, $repo, $time, $archiveName ) {
8080 parent::__construct( $title, $repo );
@@ -172,8 +172,8 @@
173173 }
174174
175175 /**
176 - * int $field one of DELETED_* bitfield constants
177 - * for file or revision rows
 176+ * @param $field Integer: one of DELETED_* bitfield constants
 177+ * for file or revision rows
178178 * @return bool
179179 */
180180 function isDeleted( $field ) {
@@ -193,7 +193,8 @@
194194 /**
195195 * Determine if the current user is allowed to view a particular
196196 * field of this image file, if it's marked as deleted.
197 - * @param int $field
 197+ *
 198+ * @param $field Integer
198199 * @return bool
199200 */
200201 function userCan( $field ) {
Index: trunk/phase3/includes/filerepo/LocalFile.php
@@ -739,13 +739,14 @@
740740
741741 /**
742742 * Upload a file and record it in the DB
743 - * @param string $srcPath Source path or virtual URL
744 - * @param string $comment Upload description
745 - * @param string $pageText Text to use for the new description page, if a new description page is created
746 - * @param integer $flags Flags for publish()
747 - * @param array $props File properties, if known. This can be used to reduce the
748 - * upload time when uploading virtual URLs for which the file info
749 - * is already known
 743+ * @param $srcPath String: source path or virtual URL
 744+ * @param $comment String: upload description
 745+ * @param $pageText String: text to use for the new description page,
 746+ * if a new description page is created
 747+ * @param $flags Integer: flags for publish()
 748+ * @param $props Array: File properties, if known. This can be used to reduce the
 749+ * upload time when uploading virtual URLs for which the file info
 750+ * is already known
750751 * @param string $timestamp Timestamp for img_timestamp, or false to use the current time
751752 *
752753 * @return FileRepoStatus object. On success, the value member contains the
@@ -953,8 +954,8 @@
954955 * The archive name should be passed through to recordUpload for database
955956 * registration.
956957 *
957 - * @param string $sourcePath Local filesystem path to the source image
958 - * @param integer $flags A bitwise combination of:
 958+ * @param $sourcePath String: local filesystem path to the source image
 959+ * @param $flags Integer: a bitwise combination of:
959960 * File::DELETE_SOURCE Delete the source file, i.e. move
960961 * rather than copy
961962 * @return FileRepoStatus object. On success, the value member contains the
@@ -1064,8 +1065,9 @@
10651066 *
10661067 * Cache purging is done; logging is caller's responsibility.
10671068 *
1068 - * @param $reason
1069 - * @param $suppress
 1069+ * @param $archiveName String
 1070+ * @param $reason String
 1071+ * @param $suppress Boolean
10701072 * @throws MWException or FSException on database or file store failure
10711073 * @return FileRepoStatus object.
10721074 */
@@ -1090,7 +1092,7 @@
10911093 *
10921094 * @param $versions set of record ids of deleted items to restore,
10931095 * or empty to restore all revisions.
1094 - * @param $unuppress
 1096+ * @param $unsuppress Boolean
10951097 * @return FileRepoStatus
10961098 */
10971099 function restore( $versions = array(), $unsuppress = false ) {
Index: trunk/phase3/includes/filerepo/File.php
@@ -177,7 +177,8 @@
178178 * Return a fully-qualified URL to the file.
179179 * Upload URL paths _may or may not_ be fully qualified, so
180180 * we check. Local paths are assumed to belong on $wgServer.
181 - * @return string
 181+ *
 182+ * @return String
182183 */
183184 public function getFullUrl() {
184185 return wfExpandUrl( $this->getUrl() );
@@ -456,7 +457,7 @@
457458 /**
458459 * Return the file name of a thumbnail with the specified parameters
459460 *
460 - * @param array $params Handler-specific parameters
 461+ * @param $params Array: handler-specific parameters
461462 * @private -ish
462463 */
463464 function thumbName( $params ) {
@@ -484,8 +485,8 @@
485486 * specified, the generated image will be no bigger than width x height,
486487 * and will also have correct aspect ratio.
487488 *
488 - * @param integer $width maximum width of the generated thumbnail
489 - * @param integer $height maximum height of the image (optional)
 489+ * @param $width Integer: maximum width of the generated thumbnail
 490+ * @param $height Integer: maximum height of the image (optional)
490491 */
491492 public function createThumb( $width, $height = -1 ) {
492493 $params = array( 'width' => $width );
@@ -504,9 +505,9 @@
505506 *
506507 * For non-image formats, this may return a filetype-specific icon.
507508 *
508 - * @param integer $width maximum width of the generated thumbnail
509 - * @param integer $height maximum height of the image (optional)
510 - * @param boolean $render Deprecated
 509+ * @param $width Integer: maximum width of the generated thumbnail
 510+ * @param $height Integer: maximum height of the image (optional)
 511+ * @param $render Integer: Deprecated
511512 *
512513 * @return ThumbnailImage or null on failure
513514 *
@@ -523,9 +524,9 @@
524525 /**
525526 * Transform a media file
526527 *
527 - * @param array $params An associative array of handler-specific parameters. Typical
528 - * keys are width, height and page.
529 - * @param integer $flags A bitfield, may contain self::RENDER_NOW to force rendering
 528+ * @param $params Array: an associative array of handler-specific parameters.
 529+ * Typical keys are width, height and page.
 530+ * @param $flags Integer: a bitfield, may contain self::RENDER_NOW to force rendering
530531 * @return MediaTransformOutput
531532 */
532533 function transform( $params, $flags = 0 ) {
@@ -849,8 +850,8 @@
850851 * The archive name should be passed through to recordUpload for database
851852 * registration.
852853 *
853 - * @param string $sourcePath Local filesystem path to the source image
854 - * @param integer $flags A bitwise combination of:
 854+ * @param $sourcePath String: local filesystem path to the source image
 855+ * @param $flags Integer: a bitwise combination of:
855856 * File::DELETE_SOURCE Delete the source file, i.e. move
856857 * rather than copy
857858 * @return The archive name on success or an empty string if it was a new
@@ -992,8 +993,8 @@
993994 *
994995 * Cache purging is done; logging is caller's responsibility.
995996 *
996 - * @param $reason
997 - * @param $suppress, hide content from sysops?
 997+ * @param $reason String
 998+ * @param $suppress Boolean: hide content from sysops?
998999 * @return true on success, false on some kind of failure
9991000 * STUB
10001001 * Overridden by LocalFile
@@ -1010,7 +1011,7 @@
10111012 *
10121013 * @param $versions set of record ids of deleted items to restore,
10131014 * or empty to restore all revisions.
1014 - * @param $unsuppress, remove restrictions on content upon restoration?
 1015+ * @param $unsuppress remove restrictions on content upon restoration?
10151016 * @return the number of file revisions restored if successful,
10161017 * or false on failure
10171018 * STUB
@@ -1062,8 +1063,8 @@
10631064 * Get an image size array like that returned by getimagesize(), or false if it
10641065 * can't be determined.
10651066 *
1066 - * @param string $fileName The filename
1067 - * @return array
 1067+ * @param $fileName String: The filename
 1068+ * @return Array
10681069 */
10691070 function getImageSize( $fileName ) {
10701071 if ( !$this->getHandler() ) {
@@ -1156,8 +1157,8 @@
11571158 * Determine if the current user is allowed to view a particular
11581159 * field of this file, if it's marked as deleted.
11591160 * STUB
1160 - * @param int $field
1161 - * @return bool
 1161+ * @param $field Integer
 1162+ * @return Boolean
11621163 */
11631164 function userCan( $field ) {
11641165 return true;
@@ -1166,9 +1167,9 @@
11671168 /**
11681169 * Get an associative array containing information about a file in the local filesystem.
11691170 *
1170 - * @param string $path Absolute local filesystem path
1171 - * @param mixed $ext The file extension, or true to extract it from the filename.
1172 - * Set it to false to ignore the extension.
 1171+ * @param $path String: absolute local filesystem path
 1172+ * @param $ext Mixed: the file extension, or true to extract it from the filename.
 1173+ * Set it to false to ignore the extension.
11731174 */
11741175 static function getPropsFromPath( $path, $ext = true ) {
11751176 wfProfileIn( __METHOD__ );

Status & tagging log