[Sharing 2.0] Fix phpdoc etc

This commit is contained in:
Roeland Jago Douma 2015-11-24 09:58:37 +01:00
parent ab02b5c36e
commit 85976b7293
6 changed files with 53 additions and 46 deletions

View File

@ -54,12 +54,12 @@ class Share20OCS {
public function __construct(
\OC\Share20\Manager $shareManager,
\OCP\IGroupManager $groupManager,
\OCP\IUserManager $userManager,
\OCP\IRequest $request,
\OCP\Files\Folder $userFolder,
\OCP\IURLGenerator $urlGenerator,
\OCP\IUser $currentUser
IGroupManager $groupManager,
IUserManager $userManager,
IRequest $request,
Folder $userFolder,
IURLGenerator $urlGenerator,
IUser $currentUser
) {
$this->shareManager = $shareManager;
$this->userManager = $userManager;

View File

@ -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;
}
}
}

View File

@ -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);

View File

@ -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

View File

@ -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();
}
}

View File

@ -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) {