More fixes to the docs

This commit is contained in:
Joas Schilling 2015-12-08 09:11:50 +01:00
parent 0f1be1b601
commit 5453daab03
3 changed files with 20 additions and 6 deletions

View File

@ -51,6 +51,7 @@ class SharedMount extends MountPoint implements MoveableMount {
/**
* @param string $storage
* @param string $mountpoint
* @param array|null $arguments
* @param \OCP\Files\Storage\IStorageFactory $loader
*/
public function __construct($storage, $mountpoint, $arguments = null, $loader = null) {
@ -64,6 +65,9 @@ class SharedMount extends MountPoint implements MoveableMount {
/**
* check if the parent folder exists otherwise move the mount point up
*
* @param array $share
* @return string
*/
private function verifyMountPoint(&$share) {
@ -126,6 +130,7 @@ class SharedMount extends MountPoint implements MoveableMount {
*
* @param string $path the absolute path
* @return string e.g. turns '/admin/files/test.txt' into '/test.txt'
* @throws \OCA\Files_Sharing\Exceptions\BrokenPath
*/
protected function stripUserFilesPath($path) {
$trimmed = ltrim($path, '/');
@ -188,7 +193,7 @@ class SharedMount extends MountPoint implements MoveableMount {
*/
public function removeMount() {
$mountManager = \OC\Files\Filesystem::getMountManager();
/** @var \OC\Files\Storage\Shared */
/** @var $storage \OC\Files\Storage\Shared */
$storage = $this->getStorage();
$result = $storage->unshareStorage();
$mountManager->removeMount($this->mountPoint);
@ -196,7 +201,12 @@ class SharedMount extends MountPoint implements MoveableMount {
return $result;
}
/**
* @return array
*/
public function getShare() {
return $this->getStorage()->getShare();
/** @var $storage \OC\Files\Storage\Shared */
$storage = $this->getStorage();
return $storage->getShare();
}
}

View File

@ -91,6 +91,7 @@ class ShareesTest extends TestCase {
/**
* @param string $uid
* @param string $displayName
* @return \OCP\IUser|\PHPUnit_Framework_MockObject_MockObject
*/
protected function getUserMock($uid, $displayName) {
$user = $this->getMockBuilder('OCP\IUser')
@ -110,6 +111,7 @@ class ShareesTest extends TestCase {
/**
* @param string $gid
* @return \OCP\IGroup|\PHPUnit_Framework_MockObject_MockObject
*/
protected function getGroupMock($gid) {
$group = $this->getMockBuilder('OCP\IGroup')

View File

@ -30,13 +30,13 @@ use OCP\IUserSession;
use OCP\IRequest;
class GroupsTest extends \Test\TestCase {
/** @var IGroupManager */
/** @var IGroupManager|\PHPUnit_Framework_MockObject_MockObject */
protected $groupManager;
/** @var IUserSession */
/** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */
protected $userSession;
/** @var IRequest */
/** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
protected $request;
/** @var \OC\SubAdmin */
/** @var \OC\SubAdmin|\PHPUnit_Framework_MockObject_MockObject */
protected $subAdminManager;
/** @var \OCA\Provisioning_API\Groups */
protected $api;
@ -60,6 +60,7 @@ class GroupsTest extends \Test\TestCase {
/**
* @param string $gid
* @return \OCP\IGroup|\PHPUnit_Framework_MockObject_MockObject
*/
private function createGroup($gid) {
$group = $this->getMock('OCP\IGroup');
@ -71,6 +72,7 @@ class GroupsTest extends \Test\TestCase {
/**
* @param string $uid
* @return \OCP\IUser|\PHPUnit_Framework_MockObject_MockObject
*/
private function createUser($uid) {
$user = $this->getMock('OCP\IUser');