From a379dbf9db583930ecba22678278d86cf556311e Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Tue, 11 Jun 2013 15:09:46 -0700 Subject: [PATCH] Removed redundant documentation for some methods. Change-Id: Iad422716f6796cc4b69405182f4a74daa0c93663 --- includes/filebackend/FSFileBackend.php | 70 ----------------- includes/filebackend/FileBackendStore.php | 91 ----------------------- includes/filebackend/SwiftFileBackend.php | 72 ------------------ 3 files changed, 233 deletions(-) diff --git a/includes/filebackend/FSFileBackend.php b/includes/filebackend/FSFileBackend.php index 11a5ac961a..52c466bfbd 100644 --- a/includes/filebackend/FSFileBackend.php +++ b/includes/filebackend/FSFileBackend.php @@ -82,12 +82,6 @@ class FSFileBackend extends FileBackendStore { } } - /** - * @see FileBackendStore::resolveContainerPath() - * @param $container string - * @param $relStoragePath string - * @return null|string - */ protected function resolveContainerPath( $container, $relStoragePath ) { // Check that container has a root directory if ( isset( $this->containerPaths[$container] ) || isset( $this->basePath ) ) { @@ -153,10 +147,6 @@ class FSFileBackend extends FileBackendStore { return $fsPath; } - /** - * @see FileBackendStore::isPathUsableInternal() - * @return bool - */ public function isPathUsableInternal( $storagePath ) { $fsPath = $this->resolveToFSPath( $storagePath ); if ( $fsPath === null ) { @@ -178,10 +168,6 @@ class FSFileBackend extends FileBackendStore { return $ok; } - /** - * @see FileBackendStore::doCreateInternal() - * @return Status - */ protected function doCreateInternal( array $params ) { $status = Status::newGood(); @@ -235,10 +221,6 @@ class FSFileBackend extends FileBackendStore { } } - /** - * @see FileBackendStore::doStoreInternal() - * @return Status - */ protected function doStoreInternal( array $params ) { $status = Status::newGood(); @@ -284,10 +266,6 @@ class FSFileBackend extends FileBackendStore { } } - /** - * @see FileBackendStore::doCopyInternal() - * @return Status - */ protected function doCopyInternal( array $params ) { $status = Status::newGood(); @@ -348,10 +326,6 @@ class FSFileBackend extends FileBackendStore { } } - /** - * @see FileBackendStore::doMoveInternal() - * @return Status - */ protected function doMoveInternal( array $params ) { $status = Status::newGood(); @@ -405,10 +379,6 @@ class FSFileBackend extends FileBackendStore { } } - /** - * @see FileBackendStore::doDeleteInternal() - * @return Status - */ protected function doDeleteInternal( array $params ) { $status = Status::newGood(); @@ -454,10 +424,6 @@ class FSFileBackend extends FileBackendStore { } } - /** - * @see FileBackendStore::doPrepareInternal() - * @return Status - */ protected function doPrepareInternal( $fullCont, $dirRel, array $params ) { $status = Status::newGood(); list( , $shortCont, ) = FileBackend::splitStoragePath( $params['dir'] ); @@ -481,10 +447,6 @@ class FSFileBackend extends FileBackendStore { return $status; } - /** - * @see FileBackendStore::doSecureInternal() - * @return Status - */ protected function doSecureInternal( $fullCont, $dirRel, array $params ) { $status = Status::newGood(); list( , $shortCont, ) = FileBackend::splitStoragePath( $params['dir'] ); @@ -512,10 +474,6 @@ class FSFileBackend extends FileBackendStore { return $status; } - /** - * @see FileBackendStore::doPublishInternal() - * @return Status - */ protected function doPublishInternal( $fullCont, $dirRel, array $params ) { $status = Status::newGood(); list( , $shortCont, ) = FileBackend::splitStoragePath( $params['dir'] ); @@ -543,10 +501,6 @@ class FSFileBackend extends FileBackendStore { return $status; } - /** - * @see FileBackendStore::doCleanInternal() - * @return Status - */ protected function doCleanInternal( $fullCont, $dirRel, array $params ) { $status = Status::newGood(); list( , $shortCont, ) = FileBackend::splitStoragePath( $params['dir'] ); @@ -560,10 +514,6 @@ class FSFileBackend extends FileBackendStore { return $status; } - /** - * @see FileBackendStore::doFileExists() - * @return array|bool|null - */ protected function doGetFileStat( array $params ) { $source = $this->resolveToFSPath( $params['src'] ); if ( $source === null ) { @@ -593,10 +543,6 @@ class FSFileBackend extends FileBackendStore { clearstatcache(); // clear the PHP file stat cache } - /** - * @see FileBackendStore::doDirectoryExists() - * @return bool|null - */ protected function doDirectoryExists( $fullCont, $dirRel, array $params ) { list( , $shortCont, ) = FileBackend::splitStoragePath( $params['dir'] ); $contRoot = $this->containerFSRoot( $shortCont, $fullCont ); // must be valid @@ -647,10 +593,6 @@ class FSFileBackend extends FileBackendStore { return new FSFileBackendFileList( $dir, $params ); } - /** - * @see FileBackendStore::doGetLocalReferenceMulti() - * @return Array - */ protected function doGetLocalReferenceMulti( array $params ) { $fsFiles = array(); // (path => FSFile) @@ -666,10 +608,6 @@ class FSFileBackend extends FileBackendStore { return $fsFiles; } - /** - * @see FileBackendStore::doGetLocalCopyMulti() - * @return Array - */ protected function doGetLocalCopyMulti( array $params ) { $tmpFiles = array(); // (path => TempFSFile) @@ -702,18 +640,10 @@ class FSFileBackend extends FileBackendStore { return $tmpFiles; } - /** - * @see FileBackendStore::directoriesAreVirtual() - * @return bool - */ protected function directoriesAreVirtual() { return false; } - /** - * @see FileBackendStore::doExecuteOpHandlesInternal() - * @return Array List of corresponding Status objects - */ protected function doExecuteOpHandlesInternal( array $fileOpHandles ) { $statuses = array(); diff --git a/includes/filebackend/FileBackendStore.php b/includes/filebackend/FileBackendStore.php index 8b365b520d..0c1c4a9606 100644 --- a/includes/filebackend/FileBackendStore.php +++ b/includes/filebackend/FileBackendStore.php @@ -338,10 +338,6 @@ abstract class FileBackendStore extends FileBackend { return Status::newGood(); } - /** - * @see FileBackend::concatenate() - * @return Status - */ final public function concatenate( array $params ) { wfProfileIn( __METHOD__ ); wfProfileIn( __METHOD__ . '-' . $this->name ); @@ -431,10 +427,6 @@ abstract class FileBackendStore extends FileBackend { return $status; } - /** - * @see FileBackend::doPrepare() - * @return Status - */ final protected function doPrepare( array $params ) { wfProfileIn( __METHOD__ ); wfProfileIn( __METHOD__ . '-' . $this->name ); @@ -471,10 +463,6 @@ abstract class FileBackendStore extends FileBackend { return Status::newGood(); } - /** - * @see FileBackend::doSecure() - * @return Status - */ final protected function doSecure( array $params ) { wfProfileIn( __METHOD__ ); wfProfileIn( __METHOD__ . '-' . $this->name ); @@ -511,10 +499,6 @@ abstract class FileBackendStore extends FileBackend { return Status::newGood(); } - /** - * @see FileBackend::doPublish() - * @return Status - */ final protected function doPublish( array $params ) { wfProfileIn( __METHOD__ ); wfProfileIn( __METHOD__ . '-' . $this->name ); @@ -551,10 +535,6 @@ abstract class FileBackendStore extends FileBackend { return Status::newGood(); } - /** - * @see FileBackend::doClean() - * @return Status - */ final protected function doClean( array $params ) { wfProfileIn( __METHOD__ ); wfProfileIn( __METHOD__ . '-' . $this->name ); @@ -614,10 +594,6 @@ abstract class FileBackendStore extends FileBackend { return Status::newGood(); } - /** - * @see FileBackend::fileExists() - * @return bool|null - */ final public function fileExists( array $params ) { wfProfileIn( __METHOD__ ); wfProfileIn( __METHOD__ . '-' . $this->name ); @@ -627,10 +603,6 @@ abstract class FileBackendStore extends FileBackend { return ( $stat === null ) ? null : (bool)$stat; // null => failure } - /** - * @see FileBackend::getFileTimestamp() - * @return bool - */ final public function getFileTimestamp( array $params ) { wfProfileIn( __METHOD__ ); wfProfileIn( __METHOD__ . '-' . $this->name ); @@ -640,10 +612,6 @@ abstract class FileBackendStore extends FileBackend { return $stat ? $stat['mtime'] : false; } - /** - * @see FileBackend::getFileSize() - * @return bool - */ final public function getFileSize( array $params ) { wfProfileIn( __METHOD__ ); wfProfileIn( __METHOD__ . '-' . $this->name ); @@ -653,10 +621,6 @@ abstract class FileBackendStore extends FileBackend { return $stat ? $stat['size'] : false; } - /** - * @see FileBackend::getFileStat() - * @return bool - */ final public function getFileStat( array $params ) { $path = self::normalizeStoragePath( $params['src'] ); if ( $path === null ) { @@ -717,10 +681,6 @@ abstract class FileBackendStore extends FileBackend { */ abstract protected function doGetFileStat( array $params ); - /** - * @see FileBackend::getFileContentsMulti() - * @return Array - */ public function getFileContentsMulti( array $params ) { wfProfileIn( __METHOD__ ); wfProfileIn( __METHOD__ . '-' . $this->name ); @@ -747,10 +707,6 @@ abstract class FileBackendStore extends FileBackend { return $contents; } - /** - * @see FileBackend::getFileSha1Base36() - * @return bool|string - */ final public function getFileSha1Base36( array $params ) { $path = self::normalizeStoragePath( $params['src'] ); if ( $path === null ) { @@ -793,10 +749,6 @@ abstract class FileBackendStore extends FileBackend { } } - /** - * @see FileBackend::getFileProps() - * @return Array - */ final public function getFileProps( array $params ) { wfProfileIn( __METHOD__ ); wfProfileIn( __METHOD__ . '-' . $this->name ); @@ -807,10 +759,6 @@ abstract class FileBackendStore extends FileBackend { return $props; } - /** - * @see FileBackend::getLocalReferenceMulti() - * @return Array - */ final public function getLocalReferenceMulti( array $params ) { wfProfileIn( __METHOD__ ); wfProfileIn( __METHOD__ . '-' . $this->name ); @@ -856,10 +804,6 @@ abstract class FileBackendStore extends FileBackend { return $this->doGetLocalCopyMulti( $params ); } - /** - * @see FileBackend::getLocalCopyMulti() - * @return Array - */ final public function getLocalCopyMulti( array $params ) { wfProfileIn( __METHOD__ ); wfProfileIn( __METHOD__ . '-' . $this->name ); @@ -886,10 +830,6 @@ abstract class FileBackendStore extends FileBackend { return null; // not supported } - /** - * @see FileBackend::streamFile() - * @return Status - */ final public function streamFile( array $params ) { wfProfileIn( __METHOD__ ); wfProfileIn( __METHOD__ . '-' . $this->name ); @@ -945,10 +885,6 @@ abstract class FileBackendStore extends FileBackend { return $status; } - /** - * @see FileBackend::directoryExists() - * @return bool|null - */ final public function directoryExists( array $params ) { list( $fullCont, $dir, $shard ) = $this->resolveStoragePath( $params['dir'] ); if ( $dir === null ) { @@ -983,10 +919,6 @@ abstract class FileBackendStore extends FileBackend { */ abstract protected function doDirectoryExists( $container, $dir, array $params ); - /** - * @see FileBackend::getDirectoryList() - * @return Traversable|Array|null Returns null on failure - */ final public function getDirectoryList( array $params ) { list( $fullCont, $dir, $shard ) = $this->resolveStoragePath( $params['dir'] ); if ( $dir === null ) { // invalid storage path @@ -1016,10 +948,6 @@ abstract class FileBackendStore extends FileBackend { */ abstract public function getDirectoryListInternal( $container, $dir, array $params ); - /** - * @see FileBackend::getFileList() - * @return Traversable|Array|null Returns null on failure - */ final public function getFileList( array $params ) { list( $fullCont, $dir, $shard ) = $this->resolveStoragePath( $params['dir'] ); if ( $dir === null ) { // invalid storage path @@ -1113,10 +1041,6 @@ abstract class FileBackendStore extends FileBackend { return $paths; } - /** - * @see FileBackend::getScopedLocksForOps() - * @return Array - */ public function getScopedLocksForOps( array $ops, Status $status ) { $paths = $this->getPathsToLockForOpsInternal( $this->getOperationsInternal( $ops ) ); return array( @@ -1125,10 +1049,6 @@ abstract class FileBackendStore extends FileBackend { ); } - /** - * @see FileBackend::doOperationsInternal() - * @return Status - */ final protected function doOperationsInternal( array $ops, array $opts ) { wfProfileIn( __METHOD__ ); wfProfileIn( __METHOD__ . '-' . $this->name ); @@ -1176,11 +1096,6 @@ abstract class FileBackendStore extends FileBackend { return $status; } - /** - * @see FileBackend::doQuickOperationsInternal() - * @return Status - * @throws MWException - */ final protected function doQuickOperationsInternal( array $ops ) { wfProfileIn( __METHOD__ ); wfProfileIn( __METHOD__ . '-' . $this->name ); @@ -1312,9 +1227,6 @@ abstract class FileBackendStore extends FileBackend { return $op; } - /** - * @see FileBackend::preloadCache() - */ final public function preloadCache( array $paths ) { $fullConts = array(); // full container names foreach ( $paths as $path ) { @@ -1326,9 +1238,6 @@ abstract class FileBackendStore extends FileBackend { $this->primeFileCache( $paths ); } - /** - * @see FileBackend::clearCache() - */ final public function clearCache( array $paths = null ) { if ( is_array( $paths ) ) { $paths = array_map( 'FileBackend::normalizeStoragePath', $paths ); diff --git a/includes/filebackend/SwiftFileBackend.php b/includes/filebackend/SwiftFileBackend.php index 54a90d32f5..fe82e80f0f 100644 --- a/includes/filebackend/SwiftFileBackend.php +++ b/includes/filebackend/SwiftFileBackend.php @@ -172,10 +172,6 @@ class SwiftFileBackend extends FileBackendStore { return $relStoragePath; } - /** - * @see FileBackendStore::isPathUsableInternal() - * @return bool - */ public function isPathUsableInternal( $storagePath ) { list( $container, $rel ) = $this->resolveStoragePathReal( $storagePath ); if ( $rel === null ) { @@ -223,10 +219,6 @@ class SwiftFileBackend extends FileBackendStore { return $res; } - /** - * @see FileBackendStore::doCreateInternal() - * @return Status - */ protected function doCreateInternal( array $params ) { $status = Status::newGood(); @@ -298,10 +290,6 @@ class SwiftFileBackend extends FileBackendStore { } } - /** - * @see FileBackendStore::doStoreInternal() - * @return Status - */ protected function doStoreInternal( array $params ) { $status = Status::newGood(); @@ -391,10 +379,6 @@ class SwiftFileBackend extends FileBackendStore { } } - /** - * @see FileBackendStore::doCopyInternal() - * @return Status - */ protected function doCopyInternal( array $params ) { $status = Status::newGood(); @@ -464,10 +448,6 @@ class SwiftFileBackend extends FileBackendStore { } } - /** - * @see FileBackendStore::doMoveInternal() - * @return Status - */ protected function doMoveInternal( array $params ) { $status = Status::newGood(); @@ -540,10 +520,6 @@ class SwiftFileBackend extends FileBackendStore { } } - /** - * @see FileBackendStore::doDeleteInternal() - * @return Status - */ protected function doDeleteInternal( array $params ) { $status = Status::newGood(); @@ -596,10 +572,6 @@ class SwiftFileBackend extends FileBackendStore { } } - /** - * @see FileBackendStore::doDescribeInternal() - * @return Status - */ protected function doDescribeInternal( array $params ) { $status = Status::newGood(); @@ -633,10 +605,6 @@ class SwiftFileBackend extends FileBackendStore { return $status; } - /** - * @see FileBackendStore::doPrepareInternal() - * @return Status - */ protected function doPrepareInternal( $fullCont, $dir, array $params ) { $status = Status::newGood(); @@ -750,10 +718,6 @@ class SwiftFileBackend extends FileBackendStore { return $status; } - /** - * @see FileBackendStore::doCleanInternal() - * @return Status - */ protected function doCleanInternal( $fullCont, $dir, array $params ) { $status = Status::newGood(); @@ -789,10 +753,6 @@ class SwiftFileBackend extends FileBackendStore { return $status; } - /** - * @see FileBackendStore::doFileExists() - * @return array|bool|null - */ protected function doGetFileStat( array $params ) { list( $srcCont, $srcRel ) = $this->resolveStoragePathReal( $params['src'] ); if ( $srcRel === null ) { @@ -854,10 +814,6 @@ class SwiftFileBackend extends FileBackendStore { return false; // failed } - /** - * @see FileBackendStore::doGetFileContentsMulti() - * @return Array - */ protected function doGetFileContentsMulti( array $params ) { $contents = array(); @@ -1129,10 +1085,6 @@ class SwiftFileBackend extends FileBackendStore { return array_reverse( $names ); // keep the paths in original order } - /** - * @see FileBackendStore::doGetFileSha1base36() - * @return bool - */ protected function doGetFileSha1base36( array $params ) { $stat = $this->getFileStat( $params ); if ( $stat ) { @@ -1147,10 +1099,6 @@ class SwiftFileBackend extends FileBackendStore { } } - /** - * @see FileBackendStore::doStreamFile() - * @return Status - */ protected function doStreamFile( array $params ) { $status = Status::newGood(); @@ -1182,10 +1130,6 @@ class SwiftFileBackend extends FileBackendStore { return $status; } - /** - * @see FileBackendStore::doGetLocalCopyMulti() - * @return null|TempFSFile - */ protected function doGetLocalCopyMulti( array $params ) { $tmpFiles = array(); @@ -1255,10 +1199,6 @@ class SwiftFileBackend extends FileBackendStore { return $tmpFiles; } - /** - * @see FileBackendStore::getFileHttpUrl() - * @return string|null - */ public function getFileHttpUrl( array $params ) { if ( $this->swiftTempUrlKey != '' || ( $this->rgwS3AccessKey != '' && $this->rgwS3SecretKey != '' ) ) @@ -1304,10 +1244,6 @@ class SwiftFileBackend extends FileBackendStore { return null; } - /** - * @see FileBackendStore::directoriesAreVirtual() - * @return bool - */ protected function directoriesAreVirtual() { return true; } @@ -1328,10 +1264,6 @@ class SwiftFileBackend extends FileBackendStore { return $hdrs; } - /** - * @see FileBackendStore::doExecuteOpHandlesInternal() - * @return Array List of corresponding Status objects - */ protected function doExecuteOpHandlesInternal( array $fileOpHandles ) { $statuses = array(); @@ -1550,10 +1482,6 @@ class SwiftFileBackend extends FileBackendStore { $conn->delete_container( $container ); } - /** - * @see FileBackendStore::doPrimeContainerCache() - * @return void - */ protected function doPrimeContainerCache( array $containerInfo ) { try { $conn = $this->getConnection(); // Swift proxy connection -- 2.20.1