r99334 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99333‎ | r99334 | r99335 >
Date:05:19, 9 October 2011
Author:aaron
Status:ok
Tags:
Comment:
Document return types
Modified paths:
  • /trunk/phase3/includes/filerepo/FSRepo.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/FSRepo.php
@@ -44,6 +44,7 @@
4545
4646 /**
4747 * Get the public root directory of the repository.
 48+ * @return string
4849 */
4950 function getRootDirectory() {
5051 return $this->directory;
@@ -51,6 +52,7 @@
5253
5354 /**
5455 * Get the public root URL of the repository
 56+ * @return string
5557 */
5658 function getRootUrl() {
5759 return $this->url;
@@ -58,6 +60,7 @@
5961
6062 /**
6163 * Returns true if the repository uses a multi-level directory structure
 64+ * @return string
6265 */
6366 function isHashed() {
6467 return (bool)$this->hashLevels;
@@ -90,7 +93,7 @@
9194 *
9295 * @param $zone string
9396 *
94 - * @return url
 97+ * @return string url
9598 */
9699 function getZoneUrl( $zone ) {
97100 switch ( $zone ) {
@@ -160,6 +163,7 @@
161164 * self::OVERWRITE Overwrite an existing destination file instead of failing
162165 * self::OVERWRITE_SAME Overwrite the file if the destination exists and has the
163166 * same contents as the source
 167+ * @return Status
164168 */
165169 function storeBatch( $triplets, $flags = 0 ) {
166170 wfDebug( __METHOD__ . ': Storing ' . count( $triplets ) .
@@ -283,6 +287,7 @@
284288 * ignores any errors that may occur
285289 *
286290 * @param $pairs array List of files to delete
 291+ * @return void
287292 */
288293 function cleanupBatch( $files ) {
289294 foreach ( $files as $file ) {
@@ -307,6 +312,9 @@
308313 }
309314 }
310315
 316+ /**
 317+ * @return Status
 318+ */
311319 function append( $srcPath, $toAppendPath, $flags = 0 ) {
312320 $status = $this->newGood();
313321
@@ -377,6 +385,7 @@
378386 /**
379387 * Take all available measures to prevent web accessibility of new deleted
380388 * directories, in case the user has not configured offline storage
 389+ * @return void
381390 */
382391 protected function initDeletedDir( $dir ) {
383392 // Add a .htaccess file to the root of the deleted zone
@@ -429,6 +438,7 @@
430439 * @param $triplets Array: (source,dest,archive) triplets as per publish()
431440 * @param $flags Integer: bitfield, may be FileRepo::DELETE_SOURCE to indicate
432441 * that the source files should be deleted if possible
 442+ * @return Status
433443 */
434444 function publishBatch( $triplets, $flags = 0 ) {
435445 // Perform initial checks
@@ -620,6 +630,7 @@
621631 /**
622632 * Get a relative path for a deletion archive key,
623633 * e.g. s/z/a/ for sza251lrxrc1jad41h5mgilp8nysje52.jpg
 634+ * @return string
624635 */
625636 function getDeletedHashPath( $key ) {
626637 $path = '';
@@ -632,6 +643,7 @@
633644 /**
634645 * Call a callback function for every file in the repository.
635646 * Uses the filesystem even in child classes.
 647+ * @return void
636648 */
637649 function enumFilesInFS( $callback ) {
638650 $numDirs = 1 << ( $this->hashLevels * 4 );
@@ -657,6 +669,7 @@
658670 /**
659671 * Call a callback function for every file in the repository
660672 * May use either the database or the filesystem
 673+ * @return void
661674 */
662675 function enumFiles( $callback ) {
663676 $this->enumFilesInFS( $callback );
@@ -665,6 +678,7 @@
666679 /**
667680 * Get properties of a file with a given virtual URL
668681 * The virtual URL must refer to this repo
 682+ * @return array
669683 */
670684 function getFileProps( $virtualUrl ) {
671685 $path = $this->resolveVirtualUrl( $virtualUrl );
@@ -706,6 +720,7 @@
707721 /**
708722 * Chmod a file, supressing the warnings.
709723 * @param $path String: the path to change
 724+ * @return void
710725 */
711726 protected function chmod( $path ) {
712727 wfSuppressWarnings();

Status & tagging log