diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2014-02-06 16:30:58 +0100 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2014-02-06 17:02:21 +0100 |
commit | 2a6a9a8cefcf68f48d95e124db0c1b7edc9fe356 (patch) | |
tree | 66d682a22c3d12d1838822fc52cdd48fa765f5df /lib/public/share.php | |
parent | 0d94da7e9ef9550c8ae0244b203ca84e5ee007b0 (diff) | |
download | nextcloud-server-2a6a9a8cefcf68f48d95e124db0c1b7edc9fe356.tar.gz nextcloud-server-2a6a9a8cefcf68f48d95e124db0c1b7edc9fe356.zip |
polish documentation based on scrutinizer patches
Diffstat (limited to 'lib/public/share.php')
-rw-r--r-- | lib/public/share.php | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/lib/public/share.php b/lib/public/share.php index f832d04a70f..bc8a54bc350 100644 --- a/lib/public/share.php +++ b/lib/public/share.php @@ -78,7 +78,7 @@ class Share { * @param string Backend class * @param string (optional) Depends on item type * @param array (optional) List of supported file extensions if this item type depends on files - * @return Returns true if backend is registered or false if error + * @return boolean true if backend is registered or false if error */ public static function registerBackend($itemType, $class, $collectionOf = null, $supportedFileExtensions = null) { if (self::isEnabled()) { @@ -104,7 +104,7 @@ class Share { /** * Check if the Share API is enabled - * @return Returns true if enabled or false + * @return boolean true if enabled or false * * The Share API is enabled by default if not configured */ @@ -135,7 +135,7 @@ class Share { /** * Find which users can access a shared item - * @param $path to the file + * @param string $path to the file * @param $user owner of the file * @param include owner to the list of users with access to the file * @return array @@ -247,6 +247,7 @@ class Share { * @param mixed Parameters (optional) * @param int Number of items to return (optional) Returns all by default * @param bool include collections (optional) + * @param string $itemType * @return Return depends on format */ public static function getItemsSharedWith($itemType, $format = self::FORMAT_NONE, @@ -262,7 +263,7 @@ class Share { * @param int $format (optional) Format type must be defined by the backend * @param mixed Parameters (optional) * @param bool include collections (optional) - * @return Return depends on format + * @return string depends on format */ public static function getItemSharedWith($itemType, $itemTarget, $format = self::FORMAT_NONE, $parameters = null, $includeCollections = false) { @@ -646,7 +647,7 @@ class Share { * @param string Item source * @param int SHARE_TYPE_USER, SHARE_TYPE_GROUP, or SHARE_TYPE_LINK * @param string User or group the item is being shared with - * @return Returns true on success or false on failure + * @return boolean true on success or false on failure */ public static function unshare($itemType, $itemSource, $shareType, $shareWith) { if ($item = self::getItems($itemType, $itemSource, $shareType, $shareWith, \OC_User::getUser(), @@ -661,7 +662,7 @@ class Share { * Unshare an item from all users, groups, and remove all links * @param string Item type * @param string Item source - * @return Returns true on success or false on failure + * @return boolean true on success or false on failure */ public static function unshareAll($itemType, $itemSource) { // Get all of the owners of shares of this item. @@ -693,7 +694,7 @@ class Share { * Unshare an item shared with the current user * @param string Item type * @param string Item target - * @return Returns true on success or false on failure + * @return boolean true on success or false on failure * * Unsharing from self is not allowed for items inside collections */ @@ -754,7 +755,8 @@ class Share { * @param int SHARE_TYPE_USER, SHARE_TYPE_GROUP, or SHARE_TYPE_LINK * @param string User or group the item is being shared with * @param int CRUDS permissions - * @return Returns true on success or false on failure + * @param integer|null $permissions + * @return boolean true on success or false on failure */ public static function setPermissions($itemType, $itemSource, $shareType, $shareWith, $permissions) { if ($item = self::getItems($itemType, $itemSource, $shareType, $shareWith, @@ -836,7 +838,7 @@ class Share { * @param string $itemType * @param string $itemSource * @param string $date expiration date - * @return Share_Backend + * @return boolean */ public static function setExpirationDate($itemType, $itemSource, $date) { if ($items = self::getItems($itemType, $itemSource, null, null, \OC_User::getUser(), @@ -930,7 +932,7 @@ class Share { /** * Check if resharing is allowed - * @return Returns true if allowed or false + * @return boolean true if allowed or false * * Resharing is allowed by default if not configured */ @@ -1389,6 +1391,11 @@ class Share { * @param bool|array Parent folder target (optional) * @param string token (optional) * @param string name of the source item (optional) + * @param string $itemType + * @param string $itemSource + * @param integer $shareType + * @param integer $permissions + * @param string $itemSourceName * @return bool Returns true on success or false on failure */ private static function put($itemType, $itemSource, $shareType, $shareWith, $uidOwner, @@ -1936,7 +1943,7 @@ interface Share_Backend { * Get the source of the item to be stored in the database * @param string Item source * @param string Owner of the item - * @return mixed|array|false Source + * @return boolean Source * * Return an array if the item is file dependent, the array needs two keys: 'item' and 'file' * Return false if the item does not exist for the user @@ -1961,6 +1968,7 @@ interface Share_Backend { * Converts the shared item sources back into the item in the specified format * @param array Shared items * @param int Format + * @param integer $format * @return TODO * * The items array is a 3-dimensional array with the item_source as the @@ -1992,6 +2000,7 @@ interface Share_Backend_File_Dependent extends Share_Backend { * Get the file path of the item * @param string Item source * @param string User that is the owner of shared item + * @return boolean */ public function getFilePath($itemSource, $uidOwner); |