aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2014-02-06 16:30:58 +0100
committerJörn Friedrich Dreyer <jfd@butonic.de>2014-02-06 17:02:21 +0100
commit2a6a9a8cefcf68f48d95e124db0c1b7edc9fe356 (patch)
tree66d682a22c3d12d1838822fc52cdd48fa765f5df /apps/files_external
parent0d94da7e9ef9550c8ae0244b203ca84e5ee007b0 (diff)
downloadnextcloud-server-2a6a9a8cefcf68f48d95e124db0c1b7edc9fe356.tar.gz
nextcloud-server-2a6a9a8cefcf68f48d95e124db0c1b7edc9fe356.zip
polish documentation based on scrutinizer patches
Diffstat (limited to 'apps/files_external')
-rw-r--r--apps/files_external/lib/amazons3.php3
-rwxr-xr-xapps/files_external/lib/config.php8
-rwxr-xr-xapps/files_external/lib/dropbox.php5
-rw-r--r--apps/files_external/lib/google.php2
-rw-r--r--apps/files_external/lib/irods.php1
-rw-r--r--apps/files_external/lib/sftp.php6
-rw-r--r--apps/files_external/lib/streamwrapper.php11
-rw-r--r--apps/files_external/lib/swift.php6
-rw-r--r--apps/files_external/lib/webdav.php9
9 files changed, 48 insertions, 3 deletions
diff --git a/apps/files_external/lib/amazons3.php b/apps/files_external/lib/amazons3.php
index 00baacd488c..06ccd5d16fa 100644
--- a/apps/files_external/lib/amazons3.php
+++ b/apps/files_external/lib/amazons3.php
@@ -54,6 +54,9 @@ class AmazonS3 extends \OC\Files\Storage\Common {
*/
private $timeout = 15;
+ /**
+ * @param string $path
+ */
private function normalizePath($path) {
$path = trim($path, '/');
diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php
index 01d588b3721..76b8b5fa9fb 100755
--- a/apps/files_external/lib/config.php
+++ b/apps/files_external/lib/config.php
@@ -35,7 +35,7 @@ class OC_Mount_Config {
* If the configuration parameter is a boolean, add a '!' to the beginning of the value
* If the configuration parameter is optional, add a '&' to the beginning of the value
* If the configuration parameter is hidden, add a '#' to the beginning of the value
- * @return array
+ * @return string
*/
public static function getBackends() {
@@ -269,6 +269,10 @@ class OC_Mount_Config {
* @param string MOUNT_TYPE_GROUP | MOUNT_TYPE_USER
* @param string User or group to apply mount to
* @param bool Personal or system mount point i.e. is this being called from the personal or admin page
+ * @param string $mountPoint
+ * @param string $class
+ * @param string $mountType
+ * @param string $applicable
* @return bool
*/
public static function addMountPoint($mountPoint,
@@ -344,6 +348,7 @@ class OC_Mount_Config {
/**
* Read the mount points in the config file into an array
* @param bool Personal or system config file
+ * @param boolean $isPersonal
* @return array
*/
private static function readData($isPersonal) {
@@ -374,6 +379,7 @@ class OC_Mount_Config {
* Write the mount points to the config file
* @param bool Personal or system config file
* @param array Mount points
+ * @param boolean $isPersonal
*/
private static function writeData($isPersonal, $data) {
if ($isPersonal) {
diff --git a/apps/files_external/lib/dropbox.php b/apps/files_external/lib/dropbox.php
index f7d8d98cf03..0214e18020c 100755
--- a/apps/files_external/lib/dropbox.php
+++ b/apps/files_external/lib/dropbox.php
@@ -50,6 +50,9 @@ class Dropbox extends \OC\Files\Storage\Common {
}
}
+ /**
+ * @param string $path
+ */
private function deleteMetaData($path) {
$path = $this->root.$path;
if (isset($this->metaData[$path])) {
@@ -61,7 +64,7 @@ class Dropbox extends \OC\Files\Storage\Common {
/**
* @brief Returns the path's metadata
- * @param $path path for which to return the metadata
+ * @param string $path path for which to return the metadata
* @param $list if true, also return the directory's contents
* @return directory contents if $list is true, file metadata if $list is
* false, null if the file doesn't exist or "false" if the operation failed
diff --git a/apps/files_external/lib/google.php b/apps/files_external/lib/google.php
index 426caf008ec..436469236ba 100644
--- a/apps/files_external/lib/google.php
+++ b/apps/files_external/lib/google.php
@@ -67,7 +67,7 @@ class Google extends \OC\Files\Storage\Common {
/**
* Get the Google_DriveFile object for the specified path
* @param string $path
- * @return Google_DriveFile
+ * @return Google_DriveFile|false
*/
private function getDriveFile($path) {
// Remove leading and trailing slashes
diff --git a/apps/files_external/lib/irods.php b/apps/files_external/lib/irods.php
index 6d4f66e856e..7a7e900fbf0 100644
--- a/apps/files_external/lib/irods.php
+++ b/apps/files_external/lib/irods.php
@@ -134,6 +134,7 @@ class iRODS extends \OC\Files\Storage\StreamWrapper{
/**
* get the best guess for the modification time of an iRODS collection
+ * @param string $path
*/
private function collectionMTime($path) {
$dh = $this->opendir($path);
diff --git a/apps/files_external/lib/sftp.php b/apps/files_external/lib/sftp.php
index cd8a0e78864..a0816e2870d 100644
--- a/apps/files_external/lib/sftp.php
+++ b/apps/files_external/lib/sftp.php
@@ -75,6 +75,9 @@ class SFTP extends \OC\Files\Storage\Common {
return 'sftp::' . $this->user . '@' . $this->host . '/' . $this->root;
}
+ /**
+ * @param string $path
+ */
private function absPath($path) {
return $this->root . $this->cleanPath($path);
}
@@ -277,6 +280,9 @@ class SFTP extends \OC\Files\Storage\Common {
}
}
+ /**
+ * @param string $path
+ */
public function constructUrl($path) {
$url = 'sftp://'.$this->user.':'.$this->password.'@'.$this->host.$this->root.$path;
return $url;
diff --git a/apps/files_external/lib/streamwrapper.php b/apps/files_external/lib/streamwrapper.php
index e484325e2fb..3e3dc3e3af5 100644
--- a/apps/files_external/lib/streamwrapper.php
+++ b/apps/files_external/lib/streamwrapper.php
@@ -9,6 +9,10 @@
namespace OC\Files\Storage;
abstract class StreamWrapper extends Common {
+
+ /**
+ * @return string|null
+ */
abstract public function constructUrl($path);
public function mkdir($path) {
@@ -76,10 +80,17 @@ abstract class StreamWrapper extends Common {
}
}
+ /**
+ * @param string $path
+ * @param string $target
+ */
public function getFile($path, $target) {
return copy($this->constructUrl($path), $target);
}
+ /**
+ * @param string $target
+ */
public function uploadFile($path, $target) {
return copy($path, $this->constructUrl($target));
}
diff --git a/apps/files_external/lib/swift.php b/apps/files_external/lib/swift.php
index b615d24ce76..7a56fcfc8b7 100644
--- a/apps/files_external/lib/swift.php
+++ b/apps/files_external/lib/swift.php
@@ -52,6 +52,9 @@ class Swift extends \OC\Files\Storage\Common {
*/
private static $tmpFiles = array();
+ /**
+ * @param string $path
+ */
private function normalizePath($path) {
$path = trim($path, '/');
@@ -62,6 +65,9 @@ class Swift extends \OC\Files\Storage\Common {
return $path;
}
+ /**
+ * @param string $path
+ */
private function doesObjectExist($path) {
try {
$object = $this->container->DataObject($path);
diff --git a/apps/files_external/lib/webdav.php b/apps/files_external/lib/webdav.php
index f6f4cb16e87..c64b2d8b73a 100644
--- a/apps/files_external/lib/webdav.php
+++ b/apps/files_external/lib/webdav.php
@@ -247,6 +247,10 @@ class DAV extends \OC\Files\Storage\Common{
return true;
}
+ /**
+ * @param string $path
+ * @param string $target
+ */
public function getFile($path, $target) {
$this->init();
$source=$this->fopen($path, 'r');
@@ -338,6 +342,11 @@ class DAV extends \OC\Files\Storage\Common{
return substr($path, 1);
}
+ /**
+ * @param string $method
+ * @param string $path
+ * @param integer $expected
+ */
private function simpleResponse($method, $path, $body, $expected) {
$path=$this->cleanPath($path);
try {