summaryrefslogtreecommitdiffstats
path: root/apps/files_external/service
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-03-17 11:42:52 +0100
committerVincent Petry <pvince81@owncloud.com>2015-03-17 11:42:52 +0100
commite5e30924b14c22cc68b2fe0c47144f06c4a997aa (patch)
tree49587b067c21416edd230b69e27f77ede30c6b85 /apps/files_external/service
parent847880803e9bdbaae332762e197ac13ffe552233 (diff)
downloadnextcloud-server-e5e30924b14c22cc68b2fe0c47144f06c4a997aa.tar.gz
nextcloud-server-e5e30924b14c22cc68b2fe0c47144f06c4a997aa.zip
Fix PHPDoc in files_external, add missing tag
Fix various PHPDoc issues in external storage app. Added missing NoAdminRequired tag
Diffstat (limited to 'apps/files_external/service')
-rw-r--r--apps/files_external/service/globalstoragesservice.php5
-rw-r--r--apps/files_external/service/storagesservice.php17
-rw-r--r--apps/files_external/service/userstoragesservice.php8
3 files changed, 22 insertions, 8 deletions
diff --git a/apps/files_external/service/globalstoragesservice.php b/apps/files_external/service/globalstoragesservice.php
index 257c9bd4679..b024824c469 100644
--- a/apps/files_external/service/globalstoragesservice.php
+++ b/apps/files_external/service/globalstoragesservice.php
@@ -22,7 +22,6 @@ class GlobalStoragesService extends StoragesService {
/**
* Write the storages to the configuration.
*
- * @param string $user user or null for global config
* @param array $storages map of storage id to storage config
*/
public function writeConfig($storages) {
@@ -121,8 +120,8 @@ class GlobalStoragesService extends StoragesService {
* accomodate for additions/deletions in applicableUsers
* and applicableGroups fields.
*
- * @param StorageConfig $oldStorage old storage data
- * @param StorageConfig $newStorage new storage data
+ * @param StorageConfig $oldStorage old storage config
+ * @param StorageConfig $newStorage new storage config
*/
protected function triggerChangeHooks(StorageConfig $oldStorage, StorageConfig $newStorage) {
// if mount point changed, it's like a deletion + creation
diff --git a/apps/files_external/service/storagesservice.php b/apps/files_external/service/storagesservice.php
index 73a0ae76475..6800474126f 100644
--- a/apps/files_external/service/storagesservice.php
+++ b/apps/files_external/service/storagesservice.php
@@ -36,9 +36,15 @@ abstract class StoragesService {
* @param string $mountType mount type
* @param string $applicable applicable user or group
* @param array $storageOptions legacy storage options
+ *
* @return StorageConfig populated storage config
*/
- protected function populateStorageConfigWithLegacyOptions(&$storageConfig, $mountType, $applicable, $storageOptions) {
+ protected function populateStorageConfigWithLegacyOptions(
+ &$storageConfig,
+ $mountType,
+ $applicable,
+ $storageOptions
+ ) {
$storageConfig->setBackendClass($storageOptions['class']);
$storageConfig->setBackendOptions($storageOptions['options']);
if (isset($storageOptions['mountOptions'])) {
@@ -225,9 +231,10 @@ abstract class StoragesService {
/**
* Get a storage with status
*
- * @param int $id
+ * @param int $id storage id
*
* @return StorageConfig
+ * @throws NotFoundException if the storage with the given id was not found
*/
public function getStorage($id) {
$allStorages = $this->readConfig();
@@ -319,7 +326,7 @@ abstract class StoragesService {
* @param StorageConfig $updatedStorage storage attributes
*
* @return StorageConfig storage config
- * @throws NotFoundException
+ * @throws NotFoundException if the given storage does not exist in the config
*/
public function updateStorage(StorageConfig $updatedStorage) {
$allStorages = $this->readConfig();
@@ -344,7 +351,7 @@ abstract class StoragesService {
*
* @param int $id storage id
*
- * @throws NotFoundException
+ * @throws NotFoundException if no storage was found with the given id
*/
public function removeStorage($id) {
$allStorages = $this->readConfig();
@@ -376,7 +383,7 @@ abstract class StoragesService {
// but so did the mount.json. This horribly hack
// will disappear once we move to DB tables to
// store the config
- return max(array_keys($allStorages)) + 1;
+ return (max(array_keys($allStorages)) + 1);
}
}
diff --git a/apps/files_external/service/userstoragesservice.php b/apps/files_external/service/userstoragesservice.php
index fcf579c5d43..df452a48126 100644
--- a/apps/files_external/service/userstoragesservice.php
+++ b/apps/files_external/service/userstoragesservice.php
@@ -19,11 +19,19 @@ use \OCA\Files_external\NotFoundException;
* (aka personal storages)
*/
class UserStoragesService extends StoragesService {
+
/**
+ * User session
+ *
* @var IUserSession
*/
private $userSession;
+ /**
+ * Create a user storages service
+ *
+ * @param IUserSession $userSession user session
+ */
public function __construct(
IUserSession $userSession
) {