summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/files_encryption/hooks/hooks.php4
-rwxr-xr-xapps/files_encryption/lib/crypt.php18
-rwxr-xr-xapps/files_encryption/lib/helper.php8
-rwxr-xr-xapps/files_encryption/lib/keymanager.php6
-rw-r--r--apps/files_encryption/lib/session.php2
-rw-r--r--apps/files_encryption/lib/util.php5
-rwxr-xr-xapps/files_encryption/tests/crypt.php2
-rw-r--r--apps/files_encryption/tests/keymanager.php4
-rwxr-xr-xapps/files_encryption/tests/util.php2
-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
-rw-r--r--apps/files_sharing/lib/cache.php3
-rw-r--r--apps/files_sharing/lib/permissions.php4
-rw-r--r--apps/files_sharing/lib/sharedstorage.php1
-rw-r--r--apps/files_sharing/tests/watcher.php1
-rw-r--r--apps/files_trashbin/lib/trashbin.php33
-rw-r--r--apps/files_versions/lib/versions.php4
-rw-r--r--apps/files_versions/tests/versions.php3
-rw-r--r--apps/user_ldap/lib/access.php37
-rw-r--r--apps/user_ldap/lib/configuration.php5
-rw-r--r--apps/user_ldap/lib/connection.php8
-rw-r--r--apps/user_ldap/lib/ildapwrapper.php18
-rw-r--r--apps/user_ldap/lib/ldap.php9
-rw-r--r--apps/user_ldap/lib/proxy.php11
-rw-r--r--apps/user_ldap/lib/wizard.php17
-rw-r--r--apps/user_ldap/user_ldap.php6
33 files changed, 193 insertions, 69 deletions
diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php
index 4c4b3f2040f..d599665644b 100644
--- a/apps/files_encryption/hooks/hooks.php
+++ b/apps/files_encryption/hooks/hooks.php
@@ -635,7 +635,7 @@ class Hooks {
/**
* @brief if the file was really deleted we remove the encryption keys
* @param array $params
- * @return boolean
+ * @return boolean|null
*/
public static function postDelete($params) {
@@ -675,7 +675,7 @@ class Hooks {
/**
* @brief remember the file which should be deleted and it's owner
* @param array $params
- * @return boolean
+ * @return boolean|null
*/
public static function preDelete($params) {
$path = $params[\OC\Files\Filesystem::signal_param_path];
diff --git a/apps/files_encryption/lib/crypt.php b/apps/files_encryption/lib/crypt.php
index 9155d238c77..caca13acece 100755
--- a/apps/files_encryption/lib/crypt.php
+++ b/apps/files_encryption/lib/crypt.php
@@ -182,6 +182,7 @@ class Crypt {
* @param $data
* @param string $relPath The path of the file, relative to user/data;
* e.g. filename or /Docs/filename, NOT admin/files/filename
+ * @param boolean $isCatFileContent
* @return boolean
*/
public static function isLegacyEncryptedContent($isCatFileContent, $relPath) {
@@ -209,8 +210,8 @@ class Crypt {
/**
* @brief Symmetrically encrypt a string
- * @param $plainContent
- * @param $iv
+ * @param string $plainContent
+ * @param string $iv
* @param string $passphrase
* @return string encrypted file content
*/
@@ -229,9 +230,9 @@ class Crypt {
/**
* @brief Symmetrically decrypt a string
- * @param $encryptedContent
- * @param $iv
- * @param $passphrase
+ * @param string $encryptedContent
+ * @param string $iv
+ * @param string $passphrase
* @throws \Exception
* @return string decrypted file content
*/
@@ -292,8 +293,7 @@ class Crypt {
* @brief Symmetrically encrypts a string and returns keyfile content
* @param string $plainContent content to be encrypted in keyfile
* @param string $passphrase
- * @return bool|string
- * @return string encrypted content combined with IV
+ * @return false|string encrypted content combined with IV
* @note IV need not be specified, as it will be stored in the returned keyfile
* and remain accessible therein.
*/
@@ -326,7 +326,7 @@ class Crypt {
* @param $keyfileContent
* @param string $passphrase
* @throws \Exception
- * @return bool|string
+ * @return string|false
* @internal param string $source
* @internal param string $target
* @internal param string $key the decryption key
@@ -438,7 +438,7 @@ class Crypt {
* @param $encryptedContent
* @param $shareKey
* @param $privateKey
- * @return bool
+ * @return false|string
* @internal param string $plainContent content to be encrypted
* @returns string $plainContent decrypted string
* @note symmetricDecryptFileContent() can be used to decrypt files created using this method
diff --git a/apps/files_encryption/lib/helper.php b/apps/files_encryption/lib/helper.php
index bb06a57c714..0ab32020d69 100755
--- a/apps/files_encryption/lib/helper.php
+++ b/apps/files_encryption/lib/helper.php
@@ -103,7 +103,7 @@ class Helper {
* @brief enable recovery
*
* @param $recoveryKeyId
- * @param $recoveryPassword
+ * @param string $recoveryPassword
* @internal param \OCA\Encryption\Util $util
* @internal param string $password
* @return bool
@@ -209,7 +209,7 @@ class Helper {
/**
* @brief disable recovery
*
- * @param $recoveryPassword
+ * @param string $recoveryPassword
* @return bool
*/
public static function adminDisableRecovery($recoveryPassword) {
@@ -344,6 +344,7 @@ class Helper {
/**
* @brief redirect to a error page
+ * @param Session $session
*/
public static function redirectToErrorPage($session, $errorCode = null) {
@@ -423,6 +424,7 @@ class Helper {
/**
* @brief glob uses different pattern than regular expressions, escape glob pattern only
* @param unescaped path
+ * @param string $path
* @return escaped path
*/
public static function escapeGlobPattern($path) {
@@ -441,7 +443,7 @@ class Helper {
/**
* @brief get the path of the original file
* @param string $tmpFile path of the tmp file
- * @return mixed path of the original file or false
+ * @return string|false path of the original file or false
*/
public static function getPathFromTmpFile($tmpFile) {
if (isset(self::$tmpFileMapping[$tmpFile])) {
diff --git a/apps/files_encryption/lib/keymanager.php b/apps/files_encryption/lib/keymanager.php
index 7abc565f609..cb9f5e64af3 100755
--- a/apps/files_encryption/lib/keymanager.php
+++ b/apps/files_encryption/lib/keymanager.php
@@ -170,7 +170,7 @@ class Keymanager {
* @brief retrieve keyfile for an encrypted file
* @param \OC_FilesystemView $view
* @param \OCA\Encryption\Util $util
- * @param $filePath
+ * @param string|false $filePath
* @internal param \OCA\Encryption\file $string name
* @return string file key or false
* @note The keyfile returned is asymmetrically encrypted. Decryption
@@ -513,6 +513,8 @@ class Keymanager {
/**
* @brief Make preparations to vars and filesystem for saving a keyfile
+ * @param string|boolean $path
+ * @param string $basePath
*/
public static function keySetPreparation(\OC_FilesystemView $view, $path, $basePath, $userId) {
@@ -542,7 +544,7 @@ class Keymanager {
/**
* @brief extract filename from share key name
* @param string $shareKey (filename.userid.sharekey)
- * @return mixed filename or false
+ * @return string|false filename or false
*/
protected static function getFilenameFromShareKey($shareKey) {
$parts = explode('.', $shareKey);
diff --git a/apps/files_encryption/lib/session.php b/apps/files_encryption/lib/session.php
index 25f2198181f..ca36fa6e6d5 100644
--- a/apps/files_encryption/lib/session.php
+++ b/apps/files_encryption/lib/session.php
@@ -195,7 +195,7 @@ class Session {
/**
* @brief Sets user legacy key to session
- * @param $legacyKey
+ * @param string $legacyKey
* @return bool
*/
public function setLegacyKey($legacyKey) {
diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php
index ae3e2a2e15a..47f020ed29c 100644
--- a/apps/files_encryption/lib/util.php
+++ b/apps/files_encryption/lib/util.php
@@ -563,7 +563,7 @@ class Util {
/**
- * @param $path
+ * @param string $path
* @return bool
*/
public function isSharedPath($path) {
@@ -1031,7 +1031,7 @@ class Util {
* @brief Decrypt a keyfile
* @param string $filePath
* @param string $privateKey
- * @return bool|string
+ * @return false|string
*/
private function decryptKeyfile($filePath, $privateKey) {
@@ -1110,6 +1110,7 @@ class Util {
/**
* @brief Find, sanitise and format users sharing a file
* @note This wraps other methods into a portable bundle
+ * @param boolean $sharingEnabled
*/
public function getSharingUsersArray($sharingEnabled, $filePath, $currentUserId = false) {
diff --git a/apps/files_encryption/tests/crypt.php b/apps/files_encryption/tests/crypt.php
index 388980ad4fd..123943ea26a 100755
--- a/apps/files_encryption/tests/crypt.php
+++ b/apps/files_encryption/tests/crypt.php
@@ -661,7 +661,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase {
/**
* @brief encryption using legacy blowfish method
- * @param $data string data to encrypt
+ * @param string $data data to encrypt
* @param $passwd string password
* @return string
*/
diff --git a/apps/files_encryption/tests/keymanager.php b/apps/files_encryption/tests/keymanager.php
index 6f32c50743c..0caf12e91a3 100644
--- a/apps/files_encryption/tests/keymanager.php
+++ b/apps/files_encryption/tests/keymanager.php
@@ -250,6 +250,10 @@ class Test_Encryption_Keymanager extends \PHPUnit_Framework_TestCase {
* dummy class to access protected methods of \OCA\Encryption\Keymanager for testing
*/
class TestProtectedKeymanagerMethods extends \OCA\Encryption\Keymanager {
+
+ /**
+ * @param string $sharekey
+ */
public static function testGetFilenameFromShareKey($sharekey) {
return self::getFilenameFromShareKey($sharekey);
}
diff --git a/apps/files_encryption/tests/util.php b/apps/files_encryption/tests/util.php
index 97e3c518dac..9eaff79d850 100755
--- a/apps/files_encryption/tests/util.php
+++ b/apps/files_encryption/tests/util.php
@@ -461,7 +461,7 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase {
* helper function to set migration status to the right value
* to be able to test the migration path
*
- * @param $status needed migration status for test
+ * @param integer $status needed migration status for test
* @param $user for which user the status should be set
* @return boolean
*/
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 {
diff --git a/apps/files_sharing/lib/cache.php b/apps/files_sharing/lib/cache.php
index 86e324409fe..cf89f3ea629 100644
--- a/apps/files_sharing/lib/cache.php
+++ b/apps/files_sharing/lib/cache.php
@@ -32,6 +32,9 @@ class Shared_Cache extends Cache {
private $storage;
private $files = array();
+ /**
+ * @param \OC\Files\Storage\Shared $storage
+ */
public function __construct($storage) {
$this->storage = $storage;
}
diff --git a/apps/files_sharing/lib/permissions.php b/apps/files_sharing/lib/permissions.php
index 1dc53428a7f..31b7ac361ae 100644
--- a/apps/files_sharing/lib/permissions.php
+++ b/apps/files_sharing/lib/permissions.php
@@ -42,6 +42,10 @@ class Shared_Permissions extends Permissions {
}
}
+ /**
+ * @param integer $fileId
+ * @param string $user
+ */
private function getFile($fileId, $user) {
if ($fileId == -1) {
return \OCP\PERMISSION_READ;
diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php
index afe5dffdebd..ebd16f081ba 100644
--- a/apps/files_sharing/lib/sharedstorage.php
+++ b/apps/files_sharing/lib/sharedstorage.php
@@ -64,6 +64,7 @@ class Shared extends \OC\Files\Storage\Common {
/**
* @brief Get the source file path for a shared file
* @param string Shared target file path
+ * @param string $target
* @return string source file path or false if not found
*/
public function getSourcePath($target) {
diff --git a/apps/files_sharing/tests/watcher.php b/apps/files_sharing/tests/watcher.php
index 1a9a54cbcf8..5ab716e829f 100644
--- a/apps/files_sharing/tests/watcher.php
+++ b/apps/files_sharing/tests/watcher.php
@@ -145,6 +145,7 @@ class Test_Files_Sharing_Watcher extends Test_Files_Sharing_Base {
/**
* Returns the sizes of the path and its parent dirs in a hash
* where the key is the path and the value is the size.
+ * @param string $path
*/
function getOwnerDirSizes($path) {
$result = array();
diff --git a/apps/files_trashbin/lib/trashbin.php b/apps/files_trashbin/lib/trashbin.php
index 7544980e071..6d2d3f08112 100644
--- a/apps/files_trashbin/lib/trashbin.php
+++ b/apps/files_trashbin/lib/trashbin.php
@@ -61,6 +61,11 @@ class Trashbin {
}
+ /**
+ * @param string $owner
+ * @param integer $timestamp
+ * @param string $type
+ */
private static function copyFilesToOwner($sourcePath, $owner, $ownerPath, $timestamp, $type, $mime) {
self::setUpTrash($owner);
@@ -169,7 +174,7 @@ class Trashbin {
*
* @param $file_path path to original file
* @param $filename of deleted file
- * @param $timestamp when the file was deleted
+ * @param integer $timestamp when the file was deleted
*
* @return size of stored versions
*/
@@ -214,7 +219,7 @@ class Trashbin {
*
* @param $file_path path to original file
* @param $filename of deleted file
- * @param $timestamp when the file was deleted
+ * @param integer $timestamp when the file was deleted
*
* @return size of encryption keys
*/
@@ -406,7 +411,7 @@ class Trashbin {
* @param \OC\Files\View $view file view
* @param $file complete path to file
* @param $filename name of file once it was deleted
- * @param $uniqueFilename new file name to restore the file without overwriting existing files
+ * @param string $uniqueFilename new file name to restore the file without overwriting existing files
* @param $location location if file
* @param $timestamp deleteion time
*
@@ -460,7 +465,7 @@ class Trashbin {
* @param \OC\Files\View $view
* @param $file complete path to file
* @param $filename name of file
- * @param $uniqueFilename new file name to restore the file without overwriting existing files
+ * @param string $uniqueFilename new file name to restore the file without overwriting existing files
* @param $location location of file
* @param $timestamp deleteion time
*
@@ -621,6 +626,9 @@ class Trashbin {
return $size;
}
+ /**
+ * @param \OC\Files\View $view
+ */
private static function deleteVersions($view, $file, $filename, $timestamp) {
$size = 0;
if (\OCP\App::isEnabled('files_versions')) {
@@ -643,6 +651,9 @@ class Trashbin {
return $size;
}
+ /**
+ * @param \OC\Files\View $view
+ */
private static function deleteEncryptionKeys($view, $file, $filename, $timestamp) {
$size = 0;
if (\OCP\App::isEnabled('files_encryption')) {
@@ -713,7 +724,7 @@ class Trashbin {
/**
* calculate remaining free space for trash bin
*
- * @param $trashbinSize current size of the trash bin
+ * @param integer $trashbinSize current size of the trash bin
* @return available free space for trash bin
*/
private static function calculateFreeSpace($trashbinSize) {
@@ -826,9 +837,9 @@ class Trashbin {
/**
* recursive copy to copy a whole directory
*
- * @param $source source path, relative to the users files directory
- * @param $destination destination path relative to the users root directoy
- * @param $view file view for the users root directory
+ * @param string $source source path, relative to the users files directory
+ * @param string $destination destination path relative to the users root directoy
+ * @param \OC\Files\View $view file view for the users root directory
*/
private static function copy_recursive($source, $destination, $view) {
$size = 0;
@@ -887,7 +898,7 @@ class Trashbin {
* find unique extension for restored file if a file with the same name already exists
* @param $location where the file should be restored
* @param $filename name of the file
- * @param $view filesystem view relative to users root directory
+ * @param \OC\Files\View $view filesystem view relative to users root directory
* @return string with unique extension
*/
private static function getUniqueFilename($location, $filename, $view) {
@@ -916,8 +927,8 @@ class Trashbin {
/**
* @brief get the size from a given root folder
- * @param $view file view on the root folder
- * @return size of the folder
+ * @param \OC\Files\View $view file view on the root folder
+ * @return integer size of the folder
*/
private static function calculateSize($view) {
$root = \OCP\Config::getSystemValue('datadirectory') . $view->getAbsolutePath('');
diff --git a/apps/files_versions/lib/versions.php b/apps/files_versions/lib/versions.php
index 328ed4305f4..6eb39d21cf3 100644
--- a/apps/files_versions/lib/versions.php
+++ b/apps/files_versions/lib/versions.php
@@ -372,7 +372,7 @@ class Storage {
/**
* @brief returns all stored file versions from a given user
- * @param $uid id to the user
+ * @param string $uid id of the user
* @return array with contains two arrays 'all' which contains all versions sorted by age and 'by_file' which contains all versions sorted by filename
*/
private static function getAllVersions($uid) {
@@ -420,7 +420,7 @@ class Storage {
/**
* @brief get list of files we want to expire
- * @param int $currentTime timestamp of current time
+ * @param integer $currentTime timestamp of current time
* @param array $versions list of versions
* @return array containing the list of to deleted versions and the size of them
*/
diff --git a/apps/files_versions/tests/versions.php b/apps/files_versions/tests/versions.php
index 25490aa1a04..9f15b86d981 100644
--- a/apps/files_versions/tests/versions.php
+++ b/apps/files_versions/tests/versions.php
@@ -181,6 +181,9 @@ class Test_Files_Versioning extends \PHPUnit_Framework_TestCase {
// extend the original class to make it possible to test protected methods
class VersionStorageToTest extends \OCA\Files_Versions\Storage {
+ /**
+ * @param integer $time
+ */
public function callProtectedGetExpireList($time, $versions) {
return self::getExpireList($time, $versions);
diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php
index 72f9c740921..579aedeefc3 100644
--- a/apps/user_ldap/lib/access.php
+++ b/apps/user_ldap/lib/access.php
@@ -107,8 +107,8 @@ class Access extends LDAPUtility {
/**
* @brief checks wether the given attribute`s valua is probably a DN
- * @param $attr the attribute in question
- * @return if so true, otherwise false
+ * @param string $attr the attribute in question
+ * @return boolean if so true, otherwise false
*/
private function resemblesDN($attr) {
$resemblingAttributes = array(
@@ -175,7 +175,7 @@ class Access extends LDAPUtility {
/**
* @brief returns the LDAP DN for the given internal ownCloud name of the group
- * @param $name the ownCloud name in question
+ * @param string $name the ownCloud name in question
* @returns string with the LDAP DN on success, otherwise false
*
* returns the LDAP DN for the given internal ownCloud name of the group
@@ -211,7 +211,7 @@ class Access extends LDAPUtility {
/**
* @brief returns the LDAP DN for the given internal ownCloud name
* @param $name the ownCloud name in question
- * @param $isUser is it a user? otherwise group
+ * @param boolean $isUser is it a user? otherwise group
* @returns string with the LDAP DN on success, otherwise false
*
* returns the LDAP DN for the given internal ownCloud name
@@ -417,6 +417,9 @@ class Access extends LDAPUtility {
}
+ /**
+ * @param boolean $isUsers
+ */
private function ldap2ownCloudNames($ldapObjects, $isUsers) {
if($isUsers) {
$nameAttribute = $this->connection->ldapUserDisplayName;
@@ -509,7 +512,7 @@ class Access extends LDAPUtility {
/**
* @brief creates a unique name for internal ownCloud use.
* @param $name the display name of the object
- * @param $isUser boolean, whether name should be created for a user (true) or a group (false)
+ * @param boolean $isUser whether name should be created for a user (true) or a group (false)
* @returns string with with the name to use in ownCloud or false if unsuccessful
*/
private function createAltInternalOwnCloudName($name, $isUser) {
@@ -545,6 +548,9 @@ class Access extends LDAPUtility {
return $this->mappedComponents(true);
}
+ /**
+ * @param boolean $isUsers
+ */
private function mappedComponents($isUsers) {
$table = $this->getMapTable($isUsers);
@@ -601,14 +607,26 @@ class Access extends LDAPUtility {
return true;
}
+ /**
+ * @param integer $limit
+ * @param integer $offset
+ */
public function fetchListOfUsers($filter, $attr, $limit = null, $offset = null) {
return $this->fetchList($this->searchUsers($filter, $attr, $limit, $offset), (count($attr) > 1));
}
+ /**
+ * @param string $filter
+ * @param integer $limit
+ * @param integer $offset
+ */
public function fetchListOfGroups($filter, $attr, $limit = null, $offset = null) {
return $this->fetchList($this->searchGroups($filter, $attr, $limit, $offset), (count($attr) > 1));
}
+ /**
+ * @param boolean $manyAttributes
+ */
private function fetchList($list, $manyAttributes) {
if(is_array($list)) {
if($manyAttributes) {
@@ -634,6 +652,9 @@ class Access extends LDAPUtility {
return $this->search($filter, $this->connection->ldapBaseUsers, $attr, $limit, $offset);
}
+ /**
+ * @param string $filter
+ */
public function countUsers($filter, $attr = array('dn'), $limit = null, $offset = null) {
return $this->count($filter, $this->connection->ldapBaseGroups, $attr, $limit, $offset);
}
@@ -702,7 +723,7 @@ class Access extends LDAPUtility {
* @param $limit maximum results to be counted
* @param $offset a starting point
* @param $pagedSearchOK whether a paged search has been executed
- * @param $skipHandling required for paged search when cookies to
+ * @param boolean $skipHandling required for paged search when cookies to
* prior results need to be gained
* @returns array with the search result as first value and pagedSearchOK as
* second | false if not successful
@@ -920,7 +941,7 @@ class Access extends LDAPUtility {
/**
* @brief combines the input filters with given operator
* @param $filters array, the filters to connect
- * @param $operator either & or |
+ * @param string $operator either & or |
* @returns the combined filter
*
* Combines Filter arguments with AND
@@ -1173,7 +1194,7 @@ class Access extends LDAPUtility {
/**
* @brief check wether the most recent paged search was successful. It flushed the state var. Use it always after a possible paged search.
- * @return true on success, null or false otherwise
+ * @return boolean|null true on success, null or false otherwise
*/
public function getPagedSearchResultState() {
$result = $this->pagedSearchedSuccessful;
diff --git a/apps/user_ldap/lib/configuration.php b/apps/user_ldap/lib/configuration.php
index 93f044e3152..954d0501fad 100644
--- a/apps/user_ldap/lib/configuration.php
+++ b/apps/user_ldap/lib/configuration.php
@@ -78,6 +78,9 @@ class Configuration {
'lastJpegPhotoLookup' => null,
);
+ /**
+ * @param string $configPrefix
+ */
public function __construct($configPrefix, $autoread = true) {
$this->configPrefix = $configPrefix;
if($autoread) {
@@ -106,7 +109,7 @@ class Configuration {
* @param $config array that holds the config parameters in an associated
* array
* @param &$applied optional; array where the set fields will be given to
- * @return null
+ * @return false|null
*/
public function setConfiguration($config, &$applied = null) {
if(!is_array($config)) {
diff --git a/apps/user_ldap/lib/connection.php b/apps/user_ldap/lib/connection.php
index 7fbabda7106..19870550163 100644
--- a/apps/user_ldap/lib/connection.php
+++ b/apps/user_ldap/lib/connection.php
@@ -140,6 +140,9 @@ class Connection extends LDAPUtility {
return $prefix.md5($key);
}
+ /**
+ * @param string $key
+ */
public function getFromCache($key) {
if(!$this->configured) {
$this->readConfiguration();
@@ -167,6 +170,9 @@ class Connection extends LDAPUtility {
return $this->cache->hasKey($key);
}
+ /**
+ * @param string $key
+ */
public function writeToCache($key, $value) {
if(!$this->configured) {
$this->readConfiguration();
@@ -201,7 +207,7 @@ class Connection extends LDAPUtility {
* @brief set LDAP configuration with values delivered by an array, not read from configuration
* @param $config array that holds the config parameters in an associated array
* @param &$setParameters optional; array where the set fields will be given to
- * @return true if config validates, false otherwise. Check with $setParameters for detailed success on single parameters
+ * @return boolean true if config validates, false otherwise. Check with $setParameters for detailed success on single parameters
*/
public function setConfiguration($config, &$setParameters = null) {
if(is_null($setParameters)) {
diff --git a/apps/user_ldap/lib/ildapwrapper.php b/apps/user_ldap/lib/ildapwrapper.php
index 20587cba7db..3cda2aac7a5 100644
--- a/apps/user_ldap/lib/ildapwrapper.php
+++ b/apps/user_ldap/lib/ildapwrapper.php
@@ -29,7 +29,7 @@ interface ILDAPWrapper {
/**
* @brief Bind to LDAP directory
- * @param $link LDAP link resource
+ * @param resource $link LDAP link resource
* @param $dn an RDN to log in with
* @param $password the password
* @return true on success, false otherwise
@@ -50,7 +50,7 @@ interface ILDAPWrapper {
* @brief Send LDAP pagination control
* @param $link LDAP link resource
* @param $pagesize number of results per page
- * @param $isCritical Indicates whether the pagination is critical of not.
+ * @param boolean $isCritical Indicates whether the pagination is critical of not.
* @param $cookie structure sent by LDAP server
* @return true on success, false otherwise
*/
@@ -61,7 +61,7 @@ interface ILDAPWrapper {
* @param $link LDAP link resource
* @param $result LDAP result resource
* @param $cookie structure sent by LDAP server
- * @return true on success, false otherwise
+ * @return boolean on success, false otherwise
*
* Corresponds to ldap_control_paged_result_response
*/
@@ -124,7 +124,7 @@ interface ILDAPWrapper {
/**
* @brief Return next result id
* @param $link LDAP link resource
- * @param $result LDAP entry result resource
+ * @param resource $result LDAP entry result resource
* @return an LDAP search result resource
* */
public function nextEntry($link, $result);
@@ -153,7 +153,7 @@ interface ILDAPWrapper {
* @brief Sets the value of the specified option to be $value
* @param $link LDAP link resource
* @param $option a defined LDAP Server option
- * @param $value the new value for the option
+ * @param integer $value the new value for the option
* @return true on success, false otherwise
*/
public function setOption($link, $option, $value);
@@ -175,7 +175,7 @@ interface ILDAPWrapper {
/**
* @brief Unbind from LDAP directory
- * @param $link LDAP link resource
+ * @param resource $link LDAP link resource
* @return true on success, false otherwise
*/
public function unbind($link);
@@ -184,20 +184,20 @@ interface ILDAPWrapper {
/**
* @brief Checks whether the server supports LDAP
- * @return true if it the case, false otherwise
+ * @return boolean if it the case, false otherwise
* */
public function areLDAPFunctionsAvailable();
/**
* @brief Checks whether PHP supports LDAP Paged Results
- * @return true if it the case, false otherwise
+ * @return boolean if it the case, false otherwise
* */
public function hasPagedResultSupport();
/**
* @brief Checks whether the submitted parameter is a resource
* @param $resource the resource variable to check
- * @return true if it is a resource, false otherwise
+ * @return boolean if it is a resource, false otherwise
*/
public function isResource($resource);
diff --git a/apps/user_ldap/lib/ldap.php b/apps/user_ldap/lib/ldap.php
index dda8533c41f..ffd97ab83f9 100644
--- a/apps/user_ldap/lib/ldap.php
+++ b/apps/user_ldap/lib/ldap.php
@@ -108,7 +108,7 @@ class LDAP implements ILDAPWrapper {
/**
* @brief Checks whether the server supports LDAP
- * @return true if it the case, false otherwise
+ * @return boolean if it the case, false otherwise
* */
public function areLDAPFunctionsAvailable() {
return function_exists('ldap_connect');
@@ -116,7 +116,7 @@ class LDAP implements ILDAPWrapper {
/**
* @brief Checks whether PHP supports LDAP Paged Results
- * @return true if it the case, false otherwise
+ * @return boolean if it the case, false otherwise
* */
public function hasPagedResultSupport() {
$hasSupport = function_exists('ldap_control_paged_result')
@@ -127,7 +127,7 @@ class LDAP implements ILDAPWrapper {
/**
* @brief Checks whether the submitted parameter is a resource
* @param $resource the resource variable to check
- * @return true if it is a resource, false otherwise
+ * @return boolean if it is a resource, false otherwise
*/
public function isResource($resource) {
return is_resource($resource);
@@ -144,6 +144,9 @@ class LDAP implements ILDAPWrapper {
}
}
+ /**
+ * @param string $functionName
+ */
private function preFunctionCall($functionName, $args) {
$this->curFunc = $functionName;
$this->curArgs = $args;
diff --git a/apps/user_ldap/lib/proxy.php b/apps/user_ldap/lib/proxy.php
index 30e1875901c..b68910ff97f 100644
--- a/apps/user_ldap/lib/proxy.php
+++ b/apps/user_ldap/lib/proxy.php
@@ -54,13 +54,16 @@ abstract class Proxy {
return 'group-'.$gid.'-lastSeenOn';
}
+ /**
+ * @param boolean $passOnWhen
+ */
abstract protected function callOnLastSeenOn($id, $method, $parameters, $passOnWhen);
abstract protected function walkBackends($id, $method, $parameters);
/**
* @brief Takes care of the request to the User backend
* @param $uid string, the uid connected to the request
- * @param $method string, the method of the user backend that shall be called
+ * @param string $method string, the method of the user backend that shall be called
* @param $parameters an array of parameters to be passed
* @return mixed, the result of the specified method
*/
@@ -80,6 +83,9 @@ abstract class Proxy {
return $prefix.md5($key);
}
+ /**
+ * @param string $key
+ */
public function getFromCache($key) {
if(!$this->isCached($key)) {
return null;
@@ -94,6 +100,9 @@ abstract class Proxy {
return $this->cache->hasKey($key);
}
+ /**
+ * @param string $key
+ */
public function writeToCache($key, $value) {
$key = $this->getCacheKey($key);
$value = base64_encode(serialize($value));
diff --git a/apps/user_ldap/lib/wizard.php b/apps/user_ldap/lib/wizard.php
index b70ede8599c..7160cdc04f2 100644
--- a/apps/user_ldap/lib/wizard.php
+++ b/apps/user_ldap/lib/wizard.php
@@ -176,7 +176,7 @@ class Wizard extends LDAPUtility {
/**
* @brief return the state of the mode of the specified filter
- * @param $confkey string, contains the access key of the Configuration
+ * @param string $confkey string, contains the access key of the Configuration
*/
private function getFilterMode($confkey) {
$mode = $this->configuration->$confkey;
@@ -241,6 +241,8 @@ class Wizard extends LDAPUtility {
/**
* @brief detects the available LDAP groups
* @returns the instance's WizardResult instance
+ * @param string $dbkey
+ * @param string $confkey
*/
private function determineGroups($dbkey, $confkey, $testMemberOf = true) {
if(!$this->checkRequirements(array('ldapHost',
@@ -554,7 +556,7 @@ class Wizard extends LDAPUtility {
/**
* @brief Checks whether for a given BaseDN results will be returned
- * @param $base the BaseDN to test
+ * @param string $base the BaseDN to test
* @return bool true on success, false otherwise
*/
private function testBaseDN($base) {
@@ -615,7 +617,7 @@ class Wizard extends LDAPUtility {
/**
* @brief creates an LDAP Filter from given configuration
- * @param $filterType int, for which use case the filter shall be created
+ * @param integer $filterType int, for which use case the filter shall be created
* can be any of self::LFILTER_USER_LIST, self::LFILTER_LOGIN or
* self::LFILTER_GROUP_LIST
* @return mixed, string with the filter on success, false otherwise
@@ -842,6 +844,9 @@ class Wizard extends LDAPUtility {
|| (empty($agent) && empty($pwd)));
}
+ /**
+ * @param string[] $reqs
+ */
private function checkRequirements($reqs) {
$this->checkAgentRequirements();
foreach($reqs as $option) {
@@ -860,7 +865,7 @@ class Wizard extends LDAPUtility {
* @param $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 $maxF string. if not null, this variable will have the filter that
+ * @param string $maxF string. if not null, this variable will have the filter that
* yields most result entries
* @return mixed, an array with the values on success, false otherwise
*
@@ -922,8 +927,8 @@ class Wizard extends LDAPUtility {
/**
* @brief determines if and which $attr are available on the LDAP server
- * @param $objectclasses the objectclasses to use as search filter
- * @param $attr the attribute to look for
+ * @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
* Configuration class
diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php
index a19af86086c..f983c7835af 100644
--- a/apps/user_ldap/user_ldap.php
+++ b/apps/user_ldap/user_ldap.php
@@ -139,9 +139,9 @@ class USER_LDAP extends BackendUtility implements \OCP\UserInterface {
/**
* @brief Check if the password is correct
- * @param $uid The username
- * @param $password The password
- * @returns true/false
+ * @param string $uid The username
+ * @param string $password The password
+ * @return boolean
*
* Check if the password is correct without logging in the user
*/