Merge pull request #22271 from nextcloud/phpdoc/22063/add-interface-method-and-phpdoc

Properly add new methods to interface and document in PHPDoc for getR…
This commit is contained in:
Roeland Jago Douma 2020-08-17 19:34:56 +02:00 committed by GitHub
commit 6675528804
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 2 deletions

View File

@ -207,6 +207,12 @@ class MountProviderCollection implements IMountProviderCollection, Emitter {
$this->rootProviders[] = $provider; $this->rootProviders[] = $provider;
} }
/**
* Get all root mountpoints
*
* @return \OCP\Files\Mount\IMountPoint[]
* @since 20.0.0
*/
public function getRootMounts(): array { public function getRootMounts(): array {
$loader = $this->loader; $loader = $this->loader;
$mounts = array_map(function (IRootMountProvider $provider) use ($loader) { $mounts = array_map(function (IRootMountProvider $provider) use ($loader) {

View File

@ -299,7 +299,6 @@ class OC_Util {
/** @var \OCP\Files\Config\IMountProviderCollection $mountProviderCollection */ /** @var \OCP\Files\Config\IMountProviderCollection $mountProviderCollection */
$mountProviderCollection = \OC::$server->query(\OCP\Files\Config\IMountProviderCollection::class); $mountProviderCollection = \OC::$server->query(\OCP\Files\Config\IMountProviderCollection::class);
/** @var \OCP\Files\Mount\IMountPoint[] $rootMountProviders */
$rootMountProviders = $mountProviderCollection->getRootMounts(); $rootMountProviders = $mountProviderCollection->getRootMounts();
/** @var \OC\Files\Mount\Manager $mountManager */ /** @var \OC\Files\Mount\Manager $mountManager */

View File

@ -79,4 +79,12 @@ interface IMountProviderCollection {
* @since 9.0.0 * @since 9.0.0
*/ */
public function getMountCache(); public function getMountCache();
/**
* Get all root mountpoints
*
* @return \OCP\Files\Mount\IMountPoint[]
* @since 20.0.0
*/
public function getRootMounts(): array;
} }

View File

@ -32,7 +32,7 @@ use OCP\Files\Storage\IStorageFactory;
*/ */
interface IRootMountProvider { interface IRootMountProvider {
/** /**
* Get all root mountpoints * Get all root mountpoints of this provider
* *
* @return \OCP\Files\Mount\IMountPoint[] * @return \OCP\Files\Mount\IMountPoint[]
* @since 20.0.0 * @since 20.0.0