diff options
Diffstat (limited to 'lib/private/files')
-rw-r--r-- | lib/private/files/cache/backgroundwatcher.php | 3 | ||||
-rw-r--r-- | lib/private/files/cache/cache.php | 2 | ||||
-rw-r--r-- | lib/private/files/cache/homecache.php | 3 | ||||
-rw-r--r-- | lib/private/files/cache/legacy.php | 5 | ||||
-rw-r--r-- | lib/private/files/cache/storage.php | 6 | ||||
-rw-r--r-- | lib/private/files/cache/updater.php | 2 | ||||
-rw-r--r-- | lib/private/files/filesystem.php | 6 | ||||
-rw-r--r-- | lib/private/files/mapper.php | 18 | ||||
-rw-r--r-- | lib/private/files/mount/manager.php | 2 | ||||
-rw-r--r-- | lib/private/files/node/node.php | 2 | ||||
-rw-r--r-- | lib/private/files/node/root.php | 4 | ||||
-rw-r--r-- | lib/private/files/storage/common.php | 10 | ||||
-rw-r--r-- | lib/private/files/storage/loader.php | 4 | ||||
-rw-r--r-- | lib/private/files/storage/local.php | 9 | ||||
-rw-r--r-- | lib/private/files/storage/mappedlocal.php | 13 | ||||
-rw-r--r-- | lib/private/files/storage/wrapper/quota.php | 3 | ||||
-rw-r--r-- | lib/private/files/stream/close.php | 3 | ||||
-rw-r--r-- | lib/private/files/stream/dir.php | 3 | ||||
-rw-r--r-- | lib/private/files/utils/scanner.php | 3 | ||||
-rw-r--r-- | lib/private/files/view.php | 8 |
20 files changed, 97 insertions, 12 deletions
diff --git a/lib/private/files/cache/backgroundwatcher.php b/lib/private/files/cache/backgroundwatcher.php index 923804f48d0..2194651233d 100644 --- a/lib/private/files/cache/backgroundwatcher.php +++ b/lib/private/files/cache/backgroundwatcher.php @@ -24,6 +24,9 @@ class BackgroundWatcher { return $row['id']; } + /** + * @param integer $id + */ static private function checkUpdate($id) { $cacheItem = Cache::getById($id); if (is_null($cacheItem)) { diff --git a/lib/private/files/cache/cache.php b/lib/private/files/cache/cache.php index 1e7936ca26d..4cab4619149 100644 --- a/lib/private/files/cache/cache.php +++ b/lib/private/files/cache/cache.php @@ -487,7 +487,7 @@ class Cache { /** * update the folder size and the size of all parent folders * - * @param $path + * @param string|boolean $path */ public function correctFolderSize($path) { $this->calculateFolderSize($path); diff --git a/lib/private/files/cache/homecache.php b/lib/private/files/cache/homecache.php index 71bb944da71..a7c310a3782 100644 --- a/lib/private/files/cache/homecache.php +++ b/lib/private/files/cache/homecache.php @@ -38,6 +38,9 @@ class HomeCache extends Cache { return $totalSize; } + /** + * @param string $path + */ public function get($path) { $data = parent::get($path); if ($path === '' or $path === '/') { diff --git a/lib/private/files/cache/legacy.php b/lib/private/files/cache/legacy.php index 8eed1f67a5d..4d5f58741e9 100644 --- a/lib/private/files/cache/legacy.php +++ b/lib/private/files/cache/legacy.php @@ -16,6 +16,9 @@ class Legacy { private $cacheHasItems = null; + /** + * @param string $user + */ public function __construct($user) { $this->user = $user; } @@ -69,7 +72,7 @@ class Legacy { /** * get an item from the legacy cache * - * @param string|int $path + * @param string $path * @return array */ function get($path) { diff --git a/lib/private/files/cache/storage.php b/lib/private/files/cache/storage.php index 5b1b30176e8..6b6b0bce9d7 100644 --- a/lib/private/files/cache/storage.php +++ b/lib/private/files/cache/storage.php @@ -47,6 +47,9 @@ class Storage { return $this->numericId; } + /** + * @return string + */ public static function getStorageId($numericId) { $sql = 'SELECT `id` FROM `*PREFIX*storages` WHERE `numeric_id` = ?'; @@ -58,6 +61,9 @@ class Storage { } } + /** + * @param string $storageId + */ public static function exists($storageId) { if (strlen($storageId) > 64) { $storageId = md5($storageId); diff --git a/lib/private/files/cache/updater.php b/lib/private/files/cache/updater.php index 73bc30e538f..e4114e572fe 100644 --- a/lib/private/files/cache/updater.php +++ b/lib/private/files/cache/updater.php @@ -112,7 +112,7 @@ class Updater { /** * @brief get file owner and path * @param string $filename - * @return array with the oweners uid and the owners path + * @return string[] with the oweners uid and the owners path */ private static function getUidAndFilename($filename) { diff --git a/lib/private/files/filesystem.php b/lib/private/files/filesystem.php index a83e9aa86d2..d1ebad3490c 100644 --- a/lib/private/files/filesystem.php +++ b/lib/private/files/filesystem.php @@ -614,6 +614,9 @@ class Filesystem { return self::$defaultInstance->touch($path, $mtime); } + /** + * @return string + */ static public function file_get_contents($path) { return self::$defaultInstance->file_get_contents($path); } @@ -638,6 +641,9 @@ class Filesystem { return self::$defaultInstance->fopen($path, $mode); } + /** + * @return string + */ static public function toTmpFile($path) { return self::$defaultInstance->toTmpFile($path); } diff --git a/lib/private/files/mapper.php b/lib/private/files/mapper.php index 47abd4e52fe..833d4bd8d1c 100644 --- a/lib/private/files/mapper.php +++ b/lib/private/files/mapper.php @@ -44,7 +44,7 @@ class Mapper /** * @param string $path * @param bool $isLogicPath indicates if $path is logical or physical - * @param $recursive + * @param boolean $recursive * @return void */ public function removePath($path, $isLogicPath, $recursive) { @@ -60,8 +60,8 @@ class Mapper } /** - * @param $path1 - * @param $path2 + * @param string $path1 + * @param string $path2 * @throws \Exception */ public function copy($path1, $path2) @@ -99,7 +99,7 @@ class Mapper /** * @param $path * @param $root - * @return bool|string + * @return false|string */ public function stripRootFolder($path, $root) { if (strpos($path, $root) !== 0) { @@ -120,6 +120,9 @@ class Mapper return $path; } + /** + * @param string $logicPath + */ private function resolveLogicPath($logicPath) { $logicPath = $this->stripLast($logicPath); $sql = 'SELECT * FROM `*PREFIX*file_map` WHERE `logic_path_hash` = ?'; @@ -141,6 +144,10 @@ class Mapper return $result['logic_path']; } + /** + * @param string $logicPath + * @param boolean $store + */ private function create($logicPath, $store) { $logicPath = $this->stripLast($logicPath); $index = 0; @@ -167,6 +174,9 @@ class Mapper \OC_DB::executeAudited($sql, array($logicPath, $physicalPath, md5($logicPath), md5($physicalPath))); } + /** + * @param integer $index + */ public function slugifyPath($path, $index=null) { $path = $this->stripRootFolder($path, $this->unchangedPhysicalRoot); diff --git a/lib/private/files/mount/manager.php b/lib/private/files/mount/manager.php index 4c432dcf724..ff4a336f347 100644 --- a/lib/private/files/mount/manager.php +++ b/lib/private/files/mount/manager.php @@ -106,7 +106,7 @@ class Manager { * Find mounts by numeric storage id * * @param string $id - * @return Mount + * @return Mount[] */ public function findByNumericId($id) { $storageId = \OC\Files\Cache\Storage::getStorageId($id); diff --git a/lib/private/files/node/node.php b/lib/private/files/node/node.php index 063e2424a64..643a587dfc2 100644 --- a/lib/private/files/node/node.php +++ b/lib/private/files/node/node.php @@ -31,7 +31,7 @@ class Node implements \OCP\Files\Node { /** * @param \OC\Files\View $view - * @param \OC\Files\Node\Root Root $root + * @param \OC\Files\Node\Root $root * @param string $path */ public function __construct($root, $view, $path) { diff --git a/lib/private/files/node/root.php b/lib/private/files/node/root.php index e3d58476e9c..a22a2aaf4e9 100644 --- a/lib/private/files/node/root.php +++ b/lib/private/files/node/root.php @@ -95,7 +95,7 @@ class Root extends Folder implements Emitter { /** * @param string $scope * @param string $method - * @param array $arguments + * @param Node[] $arguments */ public function emit($scope, $method, $arguments = array()) { $this->emitter->emit($scope, $method, $arguments); @@ -154,7 +154,7 @@ class Root extends Folder implements Emitter { * @param string $path * @throws \OCP\Files\NotFoundException * @throws \OCP\Files\NotPermittedException - * @return Node + * @return string */ public function get($path) { $path = $this->normalizePath($path); diff --git a/lib/private/files/storage/common.php b/lib/private/files/storage/common.php index 55b1471593d..d4dca780ff3 100644 --- a/lib/private/files/storage/common.php +++ b/lib/private/files/storage/common.php @@ -202,6 +202,9 @@ abstract class Common implements \OC\Files\Storage\Storage { return $this->toTmpFile($path); } + /** + * @param string $path + */ private function toTmpFile($path) { //no longer in the storage api, still useful here $source = $this->fopen($path, 'r'); if (!$source) { @@ -224,6 +227,10 @@ abstract class Common implements \OC\Files\Storage\Storage { return $baseDir; } + /** + * @param string $path + * @param string $target + */ private function addLocalFolder($path, $target) { $dh = $this->opendir($path); if (is_resource($dh)) { @@ -241,6 +248,9 @@ abstract class Common implements \OC\Files\Storage\Storage { } } + /** + * @param string $query + */ protected function searchInDir($query, $dir = '') { $files = array(); $dh = $this->opendir($dir); diff --git a/lib/private/files/storage/loader.php b/lib/private/files/storage/loader.php index 2572ef443bc..734131261c8 100644 --- a/lib/private/files/storage/loader.php +++ b/lib/private/files/storage/loader.php @@ -25,6 +25,10 @@ class Loader { $this->storageWrappers[] = $callback; } + /** + * @param string|boolean $mountPoint + * @param string $class + */ public function load($mountPoint, $class, $arguments) { return $this->wrap($mountPoint, new $class($arguments)); } diff --git a/lib/private/files/storage/local.php b/lib/private/files/storage/local.php index fa0788f2377..a62230bdba5 100644 --- a/lib/private/files/storage/local.php +++ b/lib/private/files/storage/local.php @@ -203,6 +203,9 @@ if (\OC_Util::runningOnWindows()) { return $return; } + /** + * @param string $dir + */ private function delTree($dir) { $dirRelative = $dir; $dir = $this->datadir . $dir; @@ -224,6 +227,9 @@ if (\OC_Util::runningOnWindows()) { return $return; } + /** + * @param string $fullPath + */ private static function getFileSizeFromOS($fullPath) { $name = strtolower(php_uname('s')); // Windows OS: we use COM to access the filesystem @@ -274,6 +280,9 @@ if (\OC_Util::runningOnWindows()) { return $this->datadir . $path; } + /** + * @param string $query + */ protected function searchInDir($query, $dir = '') { $files = array(); foreach (scandir($this->datadir . $dir) as $item) { diff --git a/lib/private/files/storage/mappedlocal.php b/lib/private/files/storage/mappedlocal.php index 6c37d445867..c8b22cfb39f 100644 --- a/lib/private/files/storage/mappedlocal.php +++ b/lib/private/files/storage/mappedlocal.php @@ -210,6 +210,9 @@ class MappedLocal extends \OC\Files\Storage\Common{ return $return; } + /** + * @param string $dir + */ private function delTree($dir, $isLogicPath=true) { $dirRelative=$dir; if ($isLogicPath) { @@ -244,6 +247,9 @@ class MappedLocal extends \OC\Files\Storage\Common{ return $return; } + /** + * @param string $fullPath + */ private static function getFileSizeFromOS($fullPath) { $name = strtolower(php_uname('s')); // Windows OS: we use COM to access the filesystem @@ -288,6 +294,9 @@ class MappedLocal extends \OC\Files\Storage\Common{ return $this->buildPath($path); } + /** + * @param string $query + */ protected function searchInDir($query, $dir='') { $files=array(); $physicalDir = $this->buildPath($dir); @@ -331,6 +340,10 @@ class MappedLocal extends \OC\Files\Storage\Common{ $this->mapper->removePath($fullPath, $isLogicPath, $recursive); } + /** + * @param string $path1 + * @param string $path2 + */ private function copyMapping($path1, $path2) { $path1 = $this->stripLeading($path1); $path2 = $this->stripLeading($path2); diff --git a/lib/private/files/storage/wrapper/quota.php b/lib/private/files/storage/wrapper/quota.php index a430e3e4617..1bcdca7f47a 100644 --- a/lib/private/files/storage/wrapper/quota.php +++ b/lib/private/files/storage/wrapper/quota.php @@ -23,6 +23,9 @@ class Quota extends Wrapper { $this->quota = $parameters['quota']; } + /** + * @param string $path + */ protected function getSize($path) { $cache = $this->getCache(); $data = $cache->get($path); diff --git a/lib/private/files/stream/close.php b/lib/private/files/stream/close.php index 80de3497c36..0e1f088fcf9 100644 --- a/lib/private/files/stream/close.php +++ b/lib/private/files/stream/close.php @@ -94,6 +94,9 @@ class Close { return unlink($path); } + /** + * @param string $path + */ public static function registerCallback($path, $callback) { self::$callBacks[$path] = $callback; } diff --git a/lib/private/files/stream/dir.php b/lib/private/files/stream/dir.php index 6ca884fc994..2483385c1d8 100644 --- a/lib/private/files/stream/dir.php +++ b/lib/private/files/stream/dir.php @@ -41,6 +41,9 @@ class Dir { return true; } + /** + * @param string $path + */ public static function register($path, $content) { self::$dirs[$path] = $content; } diff --git a/lib/private/files/utils/scanner.php b/lib/private/files/utils/scanner.php index 2cad7dd77bd..558bc60cf06 100644 --- a/lib/private/files/utils/scanner.php +++ b/lib/private/files/utils/scanner.php @@ -81,6 +81,9 @@ class Scanner extends PublicEmitter { } } + /** + * @param string $dir + */ public function scan($dir) { $mounts = $this->getMounts($dir); foreach ($mounts as $mount) { diff --git a/lib/private/files/view.php b/lib/private/files/view.php index 6fc534757b2..530aa8f7514 100644 --- a/lib/private/files/view.php +++ b/lib/private/files/view.php @@ -48,7 +48,7 @@ class View { * change the root to a fake root * * @param string $fakeRoot - * @return bool + * @return boolean|null */ public function chroot($fakeRoot) { if (!$fakeRoot == '') { @@ -352,6 +352,9 @@ class View { return $this->basicOperation('unlink', $path, array('delete')); } + /** + * @param string $directory + */ public function deleteAll($directory, $empty = false) { return $this->rmdir($directory); } @@ -735,6 +738,9 @@ class View { return (strlen($this->fakeRoot) > strlen($defaultRoot)) && (substr($this->fakeRoot, 0, strlen($defaultRoot) + 1) === $defaultRoot . '/'); } + /** + * @param string $path + */ private function runHooks($hooks, $path, $post = false) { $path = $this->getHookPath($path); $prefix = ($post) ? 'post_' : ''; |