@@ -230,6 +230,9 @@ |
||
| 230 | 230 | return false; |
| 231 | 231 | } |
| 232 | 232 | |
| 233 | + /** |
|
| 234 | + * @param string $path |
|
| 235 | + */ |
|
| 233 | 236 | private function batchDelete ($path = null) { |
| 234 | 237 | $params = array( |
| 235 | 238 | 'Bucket' => $this->bucket |
@@ -244,6 +244,7 @@ discard block |
||
| 244 | 244 | * |
| 245 | 245 | * @param string $class backend class name |
| 246 | 246 | * @param array $options backend configuration options |
| 247 | + * @param boolean $isPersonal |
|
| 247 | 248 | * @return int see self::STATUS_* |
| 248 | 249 | */ |
| 249 | 250 | public static function getBackendStatus($class, $options, $isPersonal) { |
@@ -356,7 +357,7 @@ discard block |
||
| 356 | 357 | * @param \OCP\IL10N $l |
| 357 | 358 | * @param string $module |
| 358 | 359 | * @param string $backend |
| 359 | - * @return string |
|
| 360 | + * @return OC_L10N_String |
|
| 360 | 361 | */ |
| 361 | 362 | private static function getSingleDependencyMessage(\OCP\IL10N $l, $module, $backend) { |
| 362 | 363 | switch (strtolower($module)) { |
@@ -32,7 +32,6 @@ |
||
| 32 | 32 | use OCA\Files_external\Service\UserStoragesService; |
| 33 | 33 | use OCA\Files_External\Service\UserGlobalStoragesService; |
| 34 | 34 | use OCA\Files_External\Lib\StorageConfig; |
| 35 | -use OCP\Files\StorageNotAvailableException; |
|
| 36 | 35 | use OCA\Files_External\Lib\FailedStorage; |
| 37 | 36 | |
| 38 | 37 | /** |
@@ -195,7 +195,7 @@ |
||
| 195 | 195 | } |
| 196 | 196 | |
| 197 | 197 | /** |
| 198 | - * @return bool|string |
|
| 198 | + * @return string|false |
|
| 199 | 199 | */ |
| 200 | 200 | private function hostKeysPath() { |
| 201 | 201 | try { |
@@ -31,7 +31,6 @@ |
||
| 31 | 31 | */ |
| 32 | 32 | namespace OC\Files\Storage; |
| 33 | 33 | use Icewind\Streams\IteratorDirectory; |
| 34 | - |
|
| 35 | 34 | use phpseclib\Net\SFTP\Stream; |
| 36 | 35 | |
| 37 | 36 | /** |
@@ -394,7 +394,7 @@ |
||
| 394 | 394 | /** |
| 395 | 395 | * Add new storage to the configuration |
| 396 | 396 | * |
| 397 | - * @param array $newStorage storage attributes |
|
| 397 | + * @param StorageConfig $newStorage storage attributes |
|
| 398 | 398 | * |
| 399 | 399 | * @return StorageConfig storage config, with added id |
| 400 | 400 | */ |
@@ -123,6 +123,9 @@ |
||
| 123 | 123 | return $storages; |
| 124 | 124 | } |
| 125 | 125 | |
| 126 | + /** |
|
| 127 | + * @param string $id |
|
| 128 | + */ |
|
| 126 | 129 | public function deleteStorage($id) { |
| 127 | 130 | $stmt = \OC::$server->getDatabaseConnection()->prepare( |
| 128 | 131 | 'DELETE FROM `*PREFIX*storages` WHERE `id` = ?' |
@@ -48,6 +48,9 @@ discard block |
||
| 48 | 48 | \OC_Mount_Config::$skipTest = false; |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | + /** |
|
| 52 | + * @return \OCA\Files_External\Lib\Backend\Backend |
|
| 53 | + */ |
|
| 51 | 54 | protected function getBackendMock($class = '\OCA\Files_External\Lib\Backend\SMB', $storageClass = '\OC\Files\Storage\SMB') { |
| 52 | 55 | $backend = $this->getMockBuilder('\OCA\Files_External\Lib\Backend\Backend') |
| 53 | 56 | ->disableOriginalConstructor() |
@@ -59,6 +62,9 @@ discard block |
||
| 59 | 62 | return $backend; |
| 60 | 63 | } |
| 61 | 64 | |
| 65 | + /** |
|
| 66 | + * @return \OCA\Files_External\Lib\Auth\AuthMechanism |
|
| 67 | + */ |
|
| 62 | 68 | protected function getAuthMechMock($scheme = 'null', $class = '\OCA\Files_External\Lib\Auth\NullMechanism') { |
| 63 | 69 | $authMech = $this->getMockBuilder('\OCA\Files_External\Lib\Auth\AuthMechanism') |
| 64 | 70 | ->disableOriginalConstructor() |
@@ -35,6 +35,11 @@ |
||
| 35 | 35 | $this->l10n = $this->getMock('\OCP\IL10N'); |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | + /** |
|
| 39 | + * @param string $class |
|
| 40 | + * |
|
| 41 | + * @return \OCA\Files_External\Lib\Backend\Backend |
|
| 42 | + */ |
|
| 38 | 43 | protected function getBackendMock($class) { |
| 39 | 44 | $backend = $this->getMockBuilder('\OCA\Files_External\Lib\Backend\Backend') |
| 40 | 45 | ->disableOriginalConstructor() |
@@ -246,7 +246,7 @@ |
||
| 246 | 246 | * |
| 247 | 247 | * @param int $id |
| 248 | 248 | * @param string $token |
| 249 | - * @return array |
|
| 249 | + * @return string |
|
| 250 | 250 | */ |
| 251 | 251 | private function getShare($id, $token) { |
| 252 | 252 | $query = \OCP\DB::prepare('SELECT * FROM `*PREFIX*share` WHERE `id` = ? AND `token` = ? AND `share_type` = ?'); |