diff options
author | Joas Schilling <coding@schilljs.com> | 2017-04-10 16:10:34 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2017-04-13 12:58:52 +0200 |
commit | 2fcf334c6aeafaf13f3f1eee6479db93cec2e576 (patch) | |
tree | e69ab421c4359788eea8f1711e27fba9024dec2b /lib/private/Share20 | |
parent | 5df727d4ad3a735d35a5b13502c93791c84fa948 (diff) | |
download | nextcloud-server-2fcf334c6aeafaf13f3f1eee6479db93cec2e576.tar.gz nextcloud-server-2fcf334c6aeafaf13f3f1eee6479db93cec2e576.zip |
Fix tests for ShareHelper
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Share20')
-rw-r--r-- | lib/private/Share20/ShareHelper.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/private/Share20/ShareHelper.php b/lib/private/Share20/ShareHelper.php index ba3f64dbc1a..90992005017 100644 --- a/lib/private/Share20/ShareHelper.php +++ b/lib/private/Share20/ShareHelper.php @@ -56,6 +56,11 @@ class ShareHelper implements IShareHelper { return $result; } + /** + * @param Node $node + * @param array[] $users + * @return array + */ protected function getPathsForUsers(Node $node, array $users) { $byId = $results = []; foreach ($users as $uid => $info) { @@ -79,6 +84,7 @@ class ShareHelper implements IShareHelper { $item = $node; $appendix = '/' . $node->getName(); while (!empty($byId)) { + /** @var Node $item */ $item = $item->getParent(); if (!empty($byId[$item->getId()])) { @@ -94,6 +100,11 @@ class ShareHelper implements IShareHelper { return $results; } + /** + * @param Node $node + * @param array[] $remotes + * @return array + */ protected function getPathsForRemotes(Node $node, array $remotes) { $byId = $results = []; foreach ($remotes as $cloudId => $info) { @@ -121,6 +132,10 @@ class ShareHelper implements IShareHelper { return $results; } + /** + * @param Node $node + * @return string + */ protected function getMountedPath(Node $node) { $path = $node->getPath(); $sections = explode('/', $path, 4); |