summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-05-08 09:30:50 +0200
committerVincent Petry <pvince81@owncloud.com>2014-05-08 09:30:50 +0200
commit390549c286d974426299c197d5764d6b7fb56335 (patch)
tree4e6d800031b7d941e580c0a126026e05fec25c42 /apps
parent4da6645a943746b8f2b8a2671962e50452a8436d (diff)
parent9f88141bcd52517b676de7603499bbb606180438 (diff)
downloadnextcloud-server-390549c286d974426299c197d5764d6b7fb56335.tar.gz
nextcloud-server-390549c286d974426299c197d5764d6b7fb56335.zip
Merge pull request #8221 from owncloud/type-hinting-sharing
Type hinting fixes for sharing
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/lib/cache.php6
-rw-r--r--apps/files_sharing/lib/helper.php2
-rw-r--r--apps/files_sharing/lib/share/file.php7
3 files changed, 13 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/cache.php b/apps/files_sharing/lib/cache.php
index 1f316301c47..f74315c85f9 100644
--- a/apps/files_sharing/lib/cache.php
+++ b/apps/files_sharing/lib/cache.php
@@ -442,6 +442,9 @@ class Shared_Cache extends Cache {
}
}
+ /**
+ * @param integer $id
+ */
private function getShareById($id) {
$item = \OCP\Share::getItemSharedWithBySource('file', $id);
if ($item) {
@@ -454,6 +457,9 @@ class Shared_Cache extends Cache {
return null;
}
+ /**
+ * @param integer $id
+ */
private function getParentInfo($id) {
$sql = 'SELECT `parent`, `name` FROM `*PREFIX*filecache` WHERE `fileid` = ?';
$query = \OC_DB::prepare($sql);
diff --git a/apps/files_sharing/lib/helper.php b/apps/files_sharing/lib/helper.php
index 7a5b859826c..dd4056b48f1 100644
--- a/apps/files_sharing/lib/helper.php
+++ b/apps/files_sharing/lib/helper.php
@@ -79,7 +79,7 @@ class Helper {
* @param array $linkItem link item array
* @param string $password optional password
*
- * @return true if authorized, false otherwise
+ * @return boolean true if authorized, false otherwise
*/
public static function authenticate($linkItem, $password) {
if ($password !== null) {
diff --git a/apps/files_sharing/lib/share/file.php b/apps/files_sharing/lib/share/file.php
index c0c9e0c107e..2c59bd3bf92 100644
--- a/apps/files_sharing/lib/share/file.php
+++ b/apps/files_sharing/lib/share/file.php
@@ -181,8 +181,13 @@ class OC_Share_Backend_File implements OCP\Share_Backend_File_Dependent {
return $source;
}
+ /**
+ * @param string $target
+ * @param string $mountPoint
+ * @param string $itemType
+ * @return array|false source item
+ */
public static function getSource($target, $mountPoint, $itemType) {
-
if ($itemType === 'folder') {
$source = \OCP\Share::getItemSharedWith('folder', $mountPoint, \OC_Share_Backend_File::FORMAT_SHARED_STORAGE);
if ($source && $target !== '') {