summaryrefslogtreecommitdiffstats
path: root/lib/private/share20
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@owncloud.com>2015-11-24 09:58:37 +0100
committerRoeland Jago Douma <rullzer@owncloud.com>2015-11-24 10:26:36 +0100
commit85976b72937eae0e99d974551baf3aa96fa8d041 (patch)
tree5092838f120535a200caa0ac13f84b1236bf5168 /lib/private/share20
parentab02b5c36e949c17433d11b3b5ca082739c42732 (diff)
downloadnextcloud-server-85976b72937eae0e99d974551baf3aa96fa8d041.tar.gz
nextcloud-server-85976b72937eae0e99d974551baf3aa96fa8d041.zip
[Sharing 2.0] Fix phpdoc etc
Diffstat (limited to 'lib/private/share20')
-rw-r--r--lib/private/share20/defaultshareprovider.php53
-rw-r--r--lib/private/share20/ishare.php2
-rw-r--r--lib/private/share20/ishareprovider.php12
-rw-r--r--lib/private/share20/manager.php16
-rw-r--r--lib/private/share20/share.php4
5 files changed, 47 insertions, 40 deletions
diff --git a/lib/private/share20/defaultshareprovider.php b/lib/private/share20/defaultshareprovider.php
index 15add93ce64..bc3bc0ce9ed 100644
--- a/lib/private/share20/defaultshareprovider.php
+++ b/lib/private/share20/defaultshareprovider.php
@@ -23,25 +23,39 @@ namespace OC\Share20;
use OC\Share20\Exception\ShareNotFound;
use OC\Share20\Exception\BackendError;
use OCP\IUser;
+use OCP\IGroupManager;
+use OCP\IUserManager;
+use OCP\Files\IRootFolder;
+use OCP\IDBConnection;
+use OCP\Files\Node;
class DefaultShareProvider implements IShareProvider {
- /** @var \OCP\IDBConnection */
+ /** @var IDBConnection */
private $dbConn;
- /** @var \OCP\IUserManager */
+ /** @var IUserManager */
private $userManager;
- /** @var \OCP\IGroupManager */
+ /** @var IGroupManager */
private $groupManager;
- /** @var \OCP\Files\IRootFolder */
+ /** @var IRootFolder */
private $rootFolder;
- public function __construct(\OCP\IDBConnection $connection,
- \OCP\IUserManager $userManager,
- \OCP\IGroupManager $groupManager,
- \OCP\Files\IRootFolder $rootFolder) {
+ /**
+ * DefaultShareProvider constructor.
+ *
+ * @param IDBConnection $connection
+ * @param IUserManager $userManager
+ * @param IGroupManager $groupManager
+ * @param IRootFolder $rootFolder
+ */
+ public function __construct(
+ IDBConnection $connection,
+ IUserManager $userManager,
+ IGroupManager $groupManager,
+ IRootFolder $rootFolder) {
$this->dbConn = $connection;
$this->userManager = $userManager;
$this->groupManager = $groupManager;
@@ -51,21 +65,19 @@ class DefaultShareProvider implements IShareProvider {
/**
* Share a path
*
- * @param Share $share
- * @return Share The share object
+ * @param IShare $share
+ * @return IShare The share object
*/
- public function create(Share $share) {
- throw new \Exception();
+ public function create(IShare $share) {
}
/**
* Update a share
*
- * @param Share $share
- * @return Share The share object
+ * @param IShare $share
+ * @return IShare The share object
*/
- public function update(Share $share) {
- throw new \Exception();
+ public function update(IShare $share) {
}
/**
@@ -125,7 +137,6 @@ class DefaultShareProvider implements IShareProvider {
* @return Share[]
*/
public function getShares(IUser $user, $shareType, $offset, $limit) {
- throw new \Exception();
}
/**
@@ -163,8 +174,7 @@ class DefaultShareProvider implements IShareProvider {
* @param \OCP\Files\Node $path
* @return IShare[]
*/
- public function getSharesByPath(\OCP\IUser $user, \OCP\Files\Node $path) {
- throw new \Exception();
+ public function getSharesByPath(IUser $user, Node $path) {
}
/**
@@ -175,7 +185,6 @@ class DefaultShareProvider implements IShareProvider {
* @param Share
*/
public function getSharedWithMe(IUser $user, $shareType = null) {
- throw new \Exception();
}
/**
@@ -186,7 +195,6 @@ class DefaultShareProvider implements IShareProvider {
* @param Share
*/
public function getShareByToken($token, $password = null) {
- throw new \Exception();
}
/**
@@ -235,5 +243,4 @@ class DefaultShareProvider implements IShareProvider {
return $share;
}
-
-}
+} \ No newline at end of file
diff --git a/lib/private/share20/ishare.php b/lib/private/share20/ishare.php
index a80abebd71c..2e54da7a029 100644
--- a/lib/private/share20/ishare.php
+++ b/lib/private/share20/ishare.php
@@ -38,7 +38,7 @@ interface IShare {
/**
* Set the path of this share
*
- * @param File|Folder $path
+ * @param Node $path
* @return Share The modified object
*/
public function setPath(Node $path);
diff --git a/lib/private/share20/ishareprovider.php b/lib/private/share20/ishareprovider.php
index 833de1b58f6..56a550acf71 100644
--- a/lib/private/share20/ishareprovider.php
+++ b/lib/private/share20/ishareprovider.php
@@ -29,18 +29,18 @@ interface IShareProvider {
/**
* Share a path
*
- * @param Share $share
- * @return Share The share object
+ * @param IShare $share
+ * @return IShare The share object
*/
- public function create(Share $share);
+ public function create(IShare $share);
/**
* Update a share
*
- * @param Share $share
- * @return Share The share object
+ * @param IShare $share
+ * @return IShare The share object
*/
- public function update(Share $share);
+ public function update(IShare $share);
/**
* Delete a share
diff --git a/lib/private/share20/manager.php b/lib/private/share20/manager.php
index e58110b40d2..882b281c490 100644
--- a/lib/private/share20/manager.php
+++ b/lib/private/share20/manager.php
@@ -42,6 +42,13 @@ class Manager {
/** @var IAppConfig */
private $appConfig;
+ /**
+ * Manager constructor.
+ *
+ * @param ILogger $logger
+ * @param IAppConfig $appConfig
+ * @param IShareProvider $defaultProvider
+ */
public function __construct(
ILogger $logger,
IAppConfig $appConfig,
@@ -56,12 +63,11 @@ class Manager {
/**
* Share a path
- *
+ *
* @param Share $share
* @return Share The share object
*/
public function createShare(Share $share) {
- throw new \Exception();
}
/**
@@ -71,7 +77,6 @@ class Manager {
* @return Share The share object
*/
public function updateShare(Share $share) {
- throw new \Exception();
}
/**
@@ -163,7 +168,6 @@ class Manager {
* @return Share[]
*/
public function getShares($page=0, $perPage=50) {
- throw new \Exception();
}
/**
@@ -194,7 +198,6 @@ class Manager {
* @return Share[]
*/
public function getSharesByPath(\OCP\Files\Node $path, $page=0, $perPage=50) {
- throw new \Exception();
}
/**
@@ -207,7 +210,6 @@ class Manager {
* @return Share[]
*/
public function getSharedWithMe($shareType = null, $page=0, $perPage=50) {
- throw new \Exception();
}
/**
@@ -221,7 +223,6 @@ class Manager {
* @throws ShareNotFound
*/
public function getShareByToken($token, $password=null) {
- throw new \Exception();
}
/**
@@ -249,6 +250,5 @@ class Manager {
* @param \OCP\Files\Node $path
*/
public function getAccessList(\OCP\Files\Node $path) {
- throw new \Exception();
}
}
diff --git a/lib/private/share20/share.php b/lib/private/share20/share.php
index 4200816799e..b7ce38ac61d 100644
--- a/lib/private/share20/share.php
+++ b/lib/private/share20/share.php
@@ -58,7 +58,7 @@ class Share implements IShare {
/**
* Set the id of the share
*
- * @param int id
+ * @param string $id
* @return Share The modified object
*/
public function setId($id) {
@@ -292,7 +292,7 @@ class Share implements IShare {
/**
* Set the target of this share
*
- * @param string target
+ * @param string $target
* @return Share The modified object
*/
public function setTarget($target) {