summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorScrutinizer Auto-Fixer <auto-fixer@scrutinizer-ci.com>2014-02-19 09:31:54 +0100
committerScrutinizer <auto-fixer@scrutinizer-ci.com>2014-02-19 09:31:54 +0100
commitadaee6a5a19a4b0050d189736bd4e6183fee9cf0 (patch)
treea553fc57c2ff8c99081f8e15fbee7dff2c00adbf /apps
parent1e321406ee2d973e937637ab090cbd83a6eb40cf (diff)
downloadnextcloud-server-adaee6a5a19a4b0050d189736bd4e6183fee9cf0.tar.gz
nextcloud-server-adaee6a5a19a4b0050d189736bd4e6183fee9cf0.zip
Scrutinizer Auto-Fixes
This patch was automatically generated as part of the following inspection: https://scrutinizer-ci.com/g/owncloud/core/inspections/cdfecc4e-a37e-4233-8025-f0d7252a8720 Enabled analysis tools: - PHP Analyzer - JSHint - PHP Copy/Paste Detector - PHP PDepend
Diffstat (limited to 'apps')
-rwxr-xr-xapps/files_encryption/lib/helper.php2
-rw-r--r--apps/files_external/lib/google.php2
-rw-r--r--apps/files_external/lib/streamwrapper.php1
-rw-r--r--apps/files_external/lib/webdav.php3
-rw-r--r--apps/files_sharing/lib/cache.php2
-rw-r--r--apps/files_sharing/lib/sharedstorage.php1
-rw-r--r--apps/files_versions/lib/versions.php4
-rw-r--r--apps/user_ldap/lib/access.php12
-rw-r--r--apps/user_ldap/lib/connection.php3
-rw-r--r--apps/user_ldap/lib/proxy.php8
-rw-r--r--apps/user_ldap/lib/wizard.php8
-rw-r--r--apps/user_ldap/user_ldap.php3
12 files changed, 36 insertions, 13 deletions
diff --git a/apps/files_encryption/lib/helper.php b/apps/files_encryption/lib/helper.php
index 5ec09629d62..ef3775875f0 100755
--- a/apps/files_encryption/lib/helper.php
+++ b/apps/files_encryption/lib/helper.php
@@ -425,7 +425,7 @@ class Helper {
/**
* @brief glob uses different pattern than regular expressions, escape glob pattern only
* @param string $path unescaped path
- * @return escaped path
+ * @return string path
*/
public static function escapeGlobPattern($path) {
return preg_replace('/(\*|\?|\[)/', '[$1]', $path);
diff --git a/apps/files_external/lib/google.php b/apps/files_external/lib/google.php
index 064c1e20a93..35457f68528 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|false
+ * @return string
*/
private function getDriveFile($path) {
// Remove leading and trailing slashes
diff --git a/apps/files_external/lib/streamwrapper.php b/apps/files_external/lib/streamwrapper.php
index 3e3dc3e3af5..44bd9a0161a 100644
--- a/apps/files_external/lib/streamwrapper.php
+++ b/apps/files_external/lib/streamwrapper.php
@@ -11,6 +11,7 @@ namespace OC\Files\Storage;
abstract class StreamWrapper extends Common {
/**
+ * @param string $path
* @return string|null
*/
abstract public function constructUrl($path);
diff --git a/apps/files_external/lib/webdav.php b/apps/files_external/lib/webdav.php
index c64b2d8b73a..7611316a26a 100644
--- a/apps/files_external/lib/webdav.php
+++ b/apps/files_external/lib/webdav.php
@@ -336,6 +336,9 @@ class DAV extends \OC\Files\Storage\Common{
}
}
+ /**
+ * @param string $path
+ */
public function cleanPath($path) {
$path = \OC\Files\Filesystem::normalizePath($path);
// remove leading slash
diff --git a/apps/files_sharing/lib/cache.php b/apps/files_sharing/lib/cache.php
index 7d63e7a4fe3..aadc54e4a7f 100644
--- a/apps/files_sharing/lib/cache.php
+++ b/apps/files_sharing/lib/cache.php
@@ -396,7 +396,7 @@ class Shared_Cache extends Cache {
* use the one with the highest id gives the best result with the background scanner, since that is most
* likely the folder where we stopped scanning previously
*
- * @return string|bool the path of the folder or false when no folder matched
+ * @return boolean the path of the folder or false when no folder matched
*/
public function getIncomplete() {
return false;
diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php
index ebd16f081ba..b922654e5ec 100644
--- a/apps/files_sharing/lib/sharedstorage.php
+++ b/apps/files_sharing/lib/sharedstorage.php
@@ -41,6 +41,7 @@ class Shared extends \OC\Files\Storage\Common {
/**
* @brief Get the source file path, permissions, and owner for a shared file
* @param string Shared target file path
+ * @param string $target
* @return Returns array with the keys path, permissions, and owner or false if not found
*/
public function getFile($target) {
diff --git a/apps/files_versions/lib/versions.php b/apps/files_versions/lib/versions.php
index fc0bf3bfad0..2bd9c15bae4 100644
--- a/apps/files_versions/lib/versions.php
+++ b/apps/files_versions/lib/versions.php
@@ -336,7 +336,7 @@ class Storage {
* @brief deletes used space for files versions in db if user was deleted
*
* @param type $uid id of deleted user
- * @return result of db delete operation
+ * @return \OC_DB_StatementWrapper of db delete operation
*/
public static function deleteUser($uid) {
$query = \OC_DB::prepare('DELETE FROM `*PREFIX*files_versions` WHERE `user`=?');
@@ -420,8 +420,8 @@ class Storage {
/**
* @brief get list of files we want to expire
- * @param integer $currentTime timestamp of current time
* @param array $versions list of versions
+ * @param integer $time
* @return array containing the list of to deleted versions and the size of them
*/
protected static function getExpireList($time, $versions) {
diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php
index 8a8d8aa5e3a..6795aecafee 100644
--- a/apps/user_ldap/lib/access.php
+++ b/apps/user_ldap/lib/access.php
@@ -164,6 +164,7 @@ class Access extends LDAPUtility {
/**
* gives back the database table for the query
+ * @param boolean $isUser
*/
private function getMapTable($isUser) {
if($isUser) {
@@ -644,6 +645,8 @@ class Access extends LDAPUtility {
* @brief executes an LDAP search, optimized for Users
* @param $filter the LDAP filter for the search
* @param $attr optional, when a certain attribute shall be filtered out
+ * @param integer $limit
+ * @param integer $offset
* @returns array with the search result
*
* Executes an LDAP search
@@ -661,8 +664,10 @@ class Access extends LDAPUtility {
/**
* @brief executes an LDAP search, optimized for Groups
- * @param $filter the LDAP filter for the search
+ * @param string $filter the LDAP filter for the search
* @param $attr optional, when a certain attribute shall be filtered out
+ * @param integer $limit
+ * @param integer $offset
* @returns array with the search result
*
* Executes an LDAP search
@@ -757,7 +762,7 @@ class Access extends LDAPUtility {
/**
* @brief executes an LDAP search, but counts the results only
- * @param $filter the LDAP filter for the search
+ * @param string $filter the LDAP filter for the search
* @param $base an array containing the LDAP subtree(s) that shall be searched
* @param $attr optional, array, one or more attributes that shall be
* retrieved. Results will according to the order in the array.
@@ -1006,6 +1011,9 @@ class Access extends LDAPUtility {
return $this->combineFilterWithOr($filter);
}
+ /**
+ * @param string $password
+ */
public function areCredentialsValid($name, $password) {
$name = $this->DNasBaseParameter($name);
$testConnection = clone $this->connection;
diff --git a/apps/user_ldap/lib/connection.php b/apps/user_ldap/lib/connection.php
index 19870550163..b2075748a3b 100644
--- a/apps/user_ldap/lib/connection.php
+++ b/apps/user_ldap/lib/connection.php
@@ -159,6 +159,9 @@ class Connection extends LDAPUtility {
return unserialize(base64_decode($this->cache->get($key)));
}
+ /**
+ * @param string $key
+ */
public function isCached($key) {
if(!$this->configured) {
$this->readConfiguration();
diff --git a/apps/user_ldap/lib/proxy.php b/apps/user_ldap/lib/proxy.php
index b68910ff97f..b27233bcd19 100644
--- a/apps/user_ldap/lib/proxy.php
+++ b/apps/user_ldap/lib/proxy.php
@@ -56,8 +56,13 @@ abstract class Proxy {
/**
* @param boolean $passOnWhen
+ * @param string $method
*/
abstract protected function callOnLastSeenOn($id, $method, $parameters, $passOnWhen);
+
+ /**
+ * @param string $method
+ */
abstract protected function walkBackends($id, $method, $parameters);
/**
@@ -95,6 +100,9 @@ abstract class Proxy {
return unserialize(base64_decode($this->cache->get($key)));
}
+ /**
+ * @param string $key
+ */
public function isCached($key) {
$key = $this->getCacheKey($key);
return $this->cache->hasKey($key);
diff --git a/apps/user_ldap/lib/wizard.php b/apps/user_ldap/lib/wizard.php
index 5079642d954..e79090febc1 100644
--- a/apps/user_ldap/lib/wizard.php
+++ b/apps/user_ldap/lib/wizard.php
@@ -865,8 +865,8 @@ class Wizard extends LDAPUtility {
/**
* @brief does a cumulativeSearch on LDAP to get different values of a
* specified attribute
- * @param $filters array, the filters that shall be used in the search
- * @param $attr the attribute of which a list of values shall be returned
+ * @param string[] $filters array, the filters that shall be used in the search
+ * @param string $attr the attribute of which a list of values shall be returned
* @param $lfw bool, whether the last filter is a wildcard which shall not
* be processed if there were already findings, defaults to true
* @param string $maxF string. if not null, this variable will have the filter that
@@ -933,8 +933,8 @@ class Wizard extends LDAPUtility {
* @brief determines if and which $attr are available on the LDAP server
* @param string[] $objectclasses the objectclasses to use as search filter
* @param string $attr the attribute to look for
- * @param $dbkey the dbkey of the setting the feature is connected to
- * @param $confkey the confkey counterpart for the $dbkey as used in the
+ * @param string $dbkey the dbkey of the setting the feature is connected to
+ * @param string $confkey the confkey counterpart for the $dbkey as used in the
* Configuration class
* @param $po boolean, whether the objectClass with most result entries
* shall be pre-selected via the result
diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php
index 1088dafab71..4a147cf9884 100644
--- a/apps/user_ldap/user_ldap.php
+++ b/apps/user_ldap/user_ldap.php
@@ -25,7 +25,6 @@
namespace OCA\user_ldap;
-use OCA\user_ldap\lib\ILDAPWrapper;
use OCA\user_ldap\lib\BackendUtility;
class USER_LDAP extends BackendUtility implements \OCP\UserInterface {
@@ -139,7 +138,7 @@ class USER_LDAP extends BackendUtility implements \OCP\UserInterface {
* @brief reads the image from LDAP that shall be used as Avatar
* @param $uid string, the ownCloud user name
* @param $dn string, the user DN
- * @return image data (provided by LDAP) | false
+ * @return string data (provided by LDAP) | false
*/
private function getAvatarImage($uid, $dn) {
$attributes = array('jpegPhoto', 'thumbnailPhoto');