/**
* Sort the given file info array
*
- * @param \OCP\Files\FileInfo[] files to sort
+ * @param \OCP\Files\FileInfo[] $files files to sort
* @param string $sortAttribute attribute to sort on
* @param bool $sortDescending true for descending sort, false otherwise
* @return \OCP\Files\FileInfo[] sorted files
* @brief check if files can be encrypted to every user.\r
*/\r
/**\r
- * @param $params\r
+ * @param array $params\r
*/\r
public static function preShared($params) {\r
\r
\r
/**\r
* @brief Check if a file's contents contains an IV and is symmetrically encrypted\r
- * @param $content\r
+ * @param string $content\r
* @return boolean\r
* @note see also OCA\Encryption\Util->isEncryptedPath()\r
*/\r
\r
/**\r
* @brief Check if a file is encrypted via legacy system\r
- * @param $data\r
+ * @param boolean $isCatFileContent\r
* @param string $relPath The path of the file, relative to user/data;\r
* e.g. filename or /Docs/filename, NOT admin/files/filename\r
- * @param boolean $isCatFileContent\r
* @return boolean\r
*/\r
public static function isLegacyEncryptedContent($isCatFileContent, $relPath) {\r
\r
/**\r
* @brief Symmetrically decrypts keyfile content\r
- * @param $keyfileContent\r
+ * @param string $keyfileContent\r
* @param string $passphrase\r
* @throws \Exception\r
* @return string|false\r
* @brief Decrypt private key and check if the result is a valid keyfile\r
* @param string $encryptedKey encrypted keyfile\r
* @param string $passphrase to decrypt keyfile\r
- * @return encrypted private key or false\r
+ * @return string|false encrypted private key or false\r
*\r
* This function decrypts a file\r
*/\r
\r
/**\r
* @brief Asymmetrically encrypt a file using multiple public keys\r
- * @param $encryptedContent\r
- * @param $shareKey\r
- * @param $privateKey\r
+ * @param string $encryptedContent\r
+ * @param string $shareKey\r
+ * @param mixed $privateKey\r
* @return false|string\r
* @internal param string $plainContent content to be encrypted\r
* @return string $plainContent decrypted string\r
\r
/**\r
* @brief Generate a pseudo random 256-bit ASCII key, used as file key\r
- * @return $key Generated key\r
+ * @return string|false Generated key\r
*/\r
public static function generateKey() {\r
\r
\r
/**\r
* @brief Get the blowfish encryption handler for a key\r
- * @param $key string (optional)\r
+ * @param string $key (optional)\r
* @return \Crypt_Blowfish blowfish object\r
*\r
* if the key is left out, the default handler will be used\r
}\r
\r
/**\r
- * @param $data\r
+ * @param string $data\r
* @param string $key\r
* @param int $maxLength\r
* @return string\r
/**
* @brief enable recovery
*
- * @param $recoveryKeyId
+ * @param string $recoveryKeyId
* @param string $recoveryPassword
* @internal param \OCA\Encryption\Util $util
* @internal param string $password
/**
* @brief retrieve public key for a specified user
* @param \OC\Files\View $view
- * @param $userId
+ * @param string $userId
* @return string public key or false
*/
public static function getPublicKey(\OC\Files\View $view, $userId) {
/**
* @brief Retrieve a user's public and private key
* @param \OC\Files\View $view
- * @param $userId
+ * @param string $userId
* @return array keys: privateKey, publicKey
*/
public static function getUserKeys(\OC\Files\View $view, $userId) {
*
* @param \OC\Files\View $view
* @param string $path where the share key is stored
- * @param $shareKey
+ * @param string $shareKey
* @return bool true/false
* @note The keyfile is not encrypted here. Client code must
* asymmetrically encrypt the keyfile before passing it to this method
}
/**
- * @param $path
- * @param $data
+ * @param string $path
+ * @param string $data
* @return bool
*/
public function preFile_put_contents($path, &$data) {
/**
- * @param $path
+ * @param string $path
* @param $result
* @return resource
*/
}
/**
- * @param $path
- * @param $data
+ * @param string $path
+ * @param array $data
* @return array
*/
public function postGetFileInfo($path, $data) {
}
/**
- * @param $path
- * @param $size
- * @return bool
+ * @param string $path
+ * @param int $size
+ * @return int|bool
*/
public function postFileSize($path, $size) {
/**
* @brief Sets status of encryption app
- * @param string $init INIT_SUCCESSFUL, INIT_EXECUTED, NOT_INOITIALIZED
+ * @param string $init INIT_SUCCESSFUL, INIT_EXECUTED, NOT_INITIALIZED
* @return bool
*
* @note this doesn not indicate of the init was successful, we just remeber the try!
/**
* @brief Gets status if we already tried to initialize the encryption app
- * @return init status INIT_SUCCESSFUL, INIT_EXECUTED, NOT_INOITIALIZED
+ * @return string init status INIT_SUCCESSFUL, INIT_EXECUTED, NOT_INITIALIZED
*
* @note this doesn not indicate of the init was successful, we just remeber the try!
*/
private $privateKey;
/**
- * @param $path raw path relative to data/
- * @param $mode
- * @param $options
- * @param $opened_path
+ * @param string $path raw path relative to data/
+ * @param string $mode
+ * @param int $options
+ * @param string $opened_path
* @return bool
*/
public function stream_open($path, $mode, $options, &$opened_path) {
}
/**
- * @param $offset
+ * @param int $offset
* @param int $whence
* @return bool true if fseek was successful, otherwise false
*/
}
/**
- * @param $count
+ * @param int $count
* @return bool|string
* @throws \Exception
*/
/**
- * @param $option
- * @param $arg1
- * @param $arg2
+ * @param int $option
+ * @param int $arg1
+ * @param int|null $arg2
*/
public function stream_set_option($option, $arg1, $arg2) {
$return = false;
}
/**
- * @param $mode
+ * @param int $mode
*/
public function stream_lock($mode) {
return flock($this->handle, $mode);
/**
* @param \OC\Files\View $view
- * @param $userId
+ * @param string $userId
* @param bool $client
*/
public function __construct($view, $userId, $client = false) {
/**
* @brief check if files are already migrated to the encryption system
- * @return migration status, false = in case of no record
+ * @return int|false migration status, false = in case of no record
* @note If records are not being returned, check for a hidden space
* at the start of the uid in db
*/
/**
* @brief get owner of the shared files.
- * @param $id
- * @internal param int $Id of a share
+ * @param int $id ID of a share
* @return string owner
*/
public function getOwnerFromSharedFile($id) {
}
/**
- * @param $password
+ * @param string $password
* @return bool
*/
public function checkRecoveryPassword($password) {
/**
* @brief check if the file is stored on a system wide mount point
- * @param $path relative to /data/user with leading '/'
+ * @param string $path relative to /data/user with leading '/'
* @return boolean
*/
public function isSystemWideMountPoint($path) {
/**
* @brief encryption using legacy blowfish method
* @param string $data data to encrypt
- * @param $passwd string password
+ * @param string $passwd password
* @return string
*/
function legacyEncrypt($data, $passwd) {
}
/**
- * @param $user
+ * @param string $user
* @param bool $create
* @param bool $password
*/
* to be able to test the migration path
*
* @param integer $status needed migration status for test
- * @param $user for which user the status should be set
+ * @param string $user for which user the status should be set
* @return boolean
*/
private function setMigrationStatus($status, $user) {
/**
* Returns a dependency missing message
- * @param $l OC_L10N
- * @param $module string
- * @param $backend string
+ * @param OC_L10N $l
+ * @param string $module
+ * @param string $backend
* @return string
*/
private static function getSingleDependencyMessage($l, $module, $backend) {
/**
* Encrypt a single password
* @param string $password plain text password
- * @return encrypted password
+ * @return string encrypted password
*/
private static function encryptPassword($password) {
$cipher = self::getCipher();
/**
* Decrypts a single password
* @param string $encryptedPassword encrypted password
- * @return plain text password
+ * @return string plain text password
*/
private static function decryptPassword($encryptedPassword) {
$cipher = self::getCipher();
/**
* @brief Returns the path's 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
+ * @param bool $list if true, also return the directory's contents
+ * @return mixed 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
*/
private function getMetaData($path, $list = false) {
/**
* @brief update password for public link share
* @param array $share information about the share
- * @param type $params 'password'
+ * @param array $params 'password'
* @return \OC_OCS_Result
*/
private static function updatePassword($share, $params) {
}
/**
- * @param $user
+ * @param string $user
* @param bool $create
* @param bool $password
*/
/**
* move file to the trash bin
*
- * @param $file_path path to the deleted file/directory relative to the files root directory
+ * @param string $file_path path to the deleted file/directory relative to the files root directory
*/
public static function move2trash($file_path) {
$user = \OCP\User::getUser();
/**
* Move file versions to trash so that they can be restored later
*
- * @param $file_path path to original file
- * @param $filename of deleted file
+ * @param string $file_path path to original file
+ * @param string $filename of deleted file
* @param integer $timestamp when the file was deleted
*
- * @return size of stored versions
+ * @return int size of stored versions
*/
private static function retainVersions($file_path, $filename, $timestamp) {
$size = 0;
/**
* Move encryption keys to trash so that they can be restored later
*
- * @param $file_path path to original file
- * @param $filename of deleted file
+ * @param string $file_path path to original file
+ * @param string $filename of deleted file
* @param integer $timestamp when the file was deleted
*
- * @return size of encryption keys
+ * @return int size of encryption keys
*/
private static function retainEncryptionKeys($file_path, $filename, $timestamp) {
$size = 0;
/**
* restore files from trash bin
*
- * @param $file path to the deleted file
- * @param $filename name of the file
- * @param $timestamp time when the file was deleted
+ * @param string $file path to the deleted file
+ * @param string $filename name of the file
+ * @param int $timestamp time when the file was deleted
*
* @return bool
*/
* @brief restore versions from trash bin
*
* @param \OC\Files\View $view file view
- * @param $file complete path to file
- * @param $filename name of file once it was deleted
+ * @param string $file complete path to file
+ * @param string $filename name of file once it was deleted
* @param string $uniqueFilename new file name to restore the file without overwriting existing files
- * @param $location location if file
- * @param $timestamp deleteion time
+ * @param string $location location if file
+ * @param int $timestamp deleteion time
*
*/
private static function restoreVersions($view, $file, $filename, $uniqueFilename, $location, $timestamp) {
* @brief restore encryption keys from trash bin
*
* @param \OC\Files\View $view
- * @param $file complete path to file
- * @param $filename name of file
+ * @param string $file complete path to file
+ * @param string $filename name of file
* @param string $uniqueFilename new file name to restore the file without overwriting existing files
- * @param $location location of file
- * @param $timestamp deleteion time
+ * @param string $location location of file
+ * @param int $timestamp deleteion time
*
*/
private static function restoreEncryptionKeys($view, $file, $filename, $uniqueFilename, $location, $timestamp) {
/**
* @brief delete file from trash bin permanently
*
- * @param $filename path to the file
- * @param $timestamp of deletion time
+ * @param string $filename path to the file
+ * @param int $timestamp of deletion time
*
- * @return size of deleted files
+ * @return int size of deleted files
*/
public static function delete($filename, $timestamp = null) {
$user = \OCP\User::getUser();
/**
* check to see whether a file exists in trashbin
*
- * @param $filename path to the file
- * @param $timestamp of deletion time
- * @return true if file exists, otherwise false
+ * @param string $filename path to the file
+ * @param int $timestamp of deletion time
+ * @return bool true if file exists, otherwise false
*/
public static function file_exists($filename, $timestamp = null) {
$user = \OCP\User::getUser();
* @brief deletes used space for trash bin in db if user was deleted
*
* @param type $uid id of deleted user
- * @return result of db delete operation
+ * @return bool result of db delete operation
*/
public static function deleteUser($uid) {
$query = \OC_DB::prepare('DELETE FROM `*PREFIX*files_trash` WHERE `user`=?');
* calculate remaining free space for trash bin
*
* @param integer $trashbinSize current size of the trash bin
- * @return available free space for trash bin
+ * @return int available free space for trash bin
*/
private static function calculateFreeSpace($trashbinSize) {
$softQuota = true;
/**
* find all versions which belong to the file we want to restore
*
- * @param $filename name of the file which should be restored
- * @param $timestamp timestamp when the file was deleted
+ * @param string $filename name of the file which should be restored
+ * @param int $timestamp timestamp when the file was deleted
*/
private static function getVersionsFromTrash($filename, $timestamp) {
$view = new \OC\Files\View('/' . \OCP\User::getUser() . '/files_trashbin/versions');
/**
* 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 string $location where the file should be restored
+ * @param string $filename name of the file
* @param \OC\Files\View $view filesystem view relative to users root directory
* @return string with unique extension
*/
/**
* get current size of trash bin from a given user
*
- * @param $user user who owns the trash bin
+ * @param string $user user who owns the trash bin
* @return mixed trash bin size or false if no trash bin size is stored
*/
private static function getTrashbinSize($user) {
/**
* get current size of all versions from a given user
*
- * @param $user user who owns the versions
+ * @param string $user user who owns the versions
* @return mixed versions size or false if no versions size is stored
*/
private static function getVersionsSize($user) {
/**
* write to the database how much space is in use for versions
*
- * @param $user owner of the versions
- * @param $size size of the versions
+ * @param string $user owner of the versions
+ * @param int $size size of the versions
*/
private static function setVersionsSize($user, $size) {
if ( self::getVersionsSize($user) === false) {
/**
* @brief deletes used space for files versions in db if user was deleted
*
- * @param type $uid id of deleted user
+ * @param string $uid id of deleted user
* @return \OC_DB_StatementWrapper of db delete operation
*/
public static function deleteUser($uid) {
/**
* @brief get the size of all stored versions from a given user
- * @param $uid id from the user
- * @return size of vesions
+ * @param string $uid id from the user
+ * @return int size of versions
*/
private static function calculateSize($uid) {
if (\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED) == 'true') {
/**
* @brief is user in group?
- * @param $uid uid of the user
- * @param $gid gid of the group
- * @returns true/false
+ * @param string $uid uid of the user
+ * @param string $gid gid of the group
+ * @return bool
*
* Checks whether the user is member of a group or not.
*/
/**
* @brief Get all groups a user belongs to
- * @param $uid Name of the user
- * @returns array with group names
+ * @param string $uid Name of the user
+ * @return array with group names
*
* This function fetches all groups a user belongs to. It does not check
* if the user exists at all.
/**
* @brief get a list of all users in a group
- * @returns array with user ids
+ * @return array with user ids
*/
public function usersInGroup($gid, $search = '', $limit = -1, $offset = 0) {
if(!$this->enabled) {
* @brief returns the number of users in a group, who match the search term
* @param string the internal group name
* @param string optional, a search string
- * @returns int | bool
+ * @return int | bool
*/
public function countUsersInGroup($gid, $search = '') {
$cachekey = 'countUsersInGroup-'.$gid.'-'.$search;
/**
* @brief get a list of all groups
- * @returns array with group names
+ * @return array with group names
*
* Returns a list with all groups (used by getGroups)
*/
/**
* @brief get a list of all groups using a paged search
- * @returns array with group names
+ * @return array with group names
*
* Returns a list with all groups
* Uses a paged search if available to override a
/**
* @brief Check if backend implements actions
- * @param $actions bitwise-or'ed actions
- * @returns boolean
+ * @param int $actions bitwise-or'ed actions
+ * @return boolean
*
* Returns the supported actions as int to be
* compared with OC_USER_BACKEND_CREATE_USER etc.
/**
* @brief Constructor
- * @param $serverConfigPrefixes array containing the config Prefixes
+ * @param array $serverConfigPrefixes array containing the config Prefixes
*/
public function __construct($serverConfigPrefixes, ILDAPWrapper $ldap) {
parent::__construct($ldap);
/**
* @brief Tries the backends one after the other until a positive result is returned from the specified method
- * @param $gid string, the gid connected to the request
- * @param $method string, the method of the group backend that shall be called
- * @param $parameters an array of parameters to be passed
+ * @param string $gid the gid connected to the request
+ * @param string $method the method of the group backend that shall be called
+ * @param array $parameters an array of parameters to be passed
* @return mixed, the result of the method or false
*/
protected function walkBackends($gid, $method, $parameters) {
/**
* @brief Asks the backend connected to the server that supposely takes care of the gid from the request.
- * @param $gid string, the gid connected to the request
- * @param $method string, the method of the group backend that shall be called
- * @param $parameters an array of parameters to be passed
- * @param $passOnWhen the result matches this variable
+ * @param string $gid the gid connected to the request
+ * @param string $method the method of the group backend that shall be called
+ * @param array $parameters an array of parameters to be passed
+ * @param mixed $passOnWhen the result matches this variable
* @return mixed, the result of the method or false
*/
protected function callOnLastSeenOn($gid, $method, $parameters, $passOnWhen) {
/**
* @brief is user in group?
- * @param $uid uid of the user
- * @param $gid gid of the group
- * @returns true/false
+ * @param string $uid uid of the user
+ * @param string $gid gid of the group
+ * @return bool
*
* Checks whether the user is member of a group or not.
*/
/**
* @brief Get all groups a user belongs to
- * @param $uid Name of the user
- * @returns array with group names
+ * @param string $uid Name of the user
+ * @return array with group names
*
* This function fetches all groups a user belongs to. It does not check
* if the user exists at all.
/**
* @brief get a list of all users in a group
- * @returns array with user ids
+ * @return array with user ids
*/
public function usersInGroup($gid, $search = '', $limit = -1, $offset = 0) {
$users = array();
* @brief returns the number of users in a group, who match the search term
* @param string the internal group name
* @param string optional, a search string
- * @returns int | bool
+ * @return int | bool
*/
public function countUsersInGroup($gid, $search = '') {
return $this->handleRequest(
/**
* @brief get a list of all groups
- * @returns array with group names
+ * @return array with group names
*
* Returns a list with all groups
*/
/**
* @brief Check if backend implements actions
- * @param $actions bitwise-or'ed actions
- * @returns boolean
+ * @param int $actions bitwise-or'ed actions
+ * @return boolean
*
* Returns the supported actions as int to be
* compared with OC_USER_BACKEND_CREATE_USER etc.
}
/**
- * @param $dn
+ * @param string $dn
* @return bool|string
*/
private function findMappedUser($dn) {
}
/**
- * @param $dn
+ * @param string $dn
* @return bool|string
*/
private function findMappedGroup($dn) {
}
/**
- * @param $filter
- * @param $attr
+ * @param string $filter
+ * @param string $attr
* @param int $limit
* @param int $offset
* @return array
}
/**
- * @param $filter
- * @param $attr
+ * @param string $filter
+ * @param string $attr
* @param int $limit
* @param int $offset
* @return array
}
/**
- * @param $list
+ * @param array $list
* @param bool $manyAttributes
* @return array
*/
}
/**
- * @param $searchResults
- * @param $limit
- * @param $hasHitLimit
+ * @param array $searchResults
+ * @param int $limit
+ * @param bool $hasHitLimit
* @return int
*/
private function countEntriesInSearchResults($searchResults, $limit, &$hasHitLimit) {
}
/**
- * @param $name
+ * @param string $name
* @return bool|mixed|string
*/
public function sanitizeUsername($name) {
/**
* @brief combines the input filters with AND
- * @param $filters array, the filters to connect
+ * @param array $filters the filters to connect
* @return string the combined filter
*/
public function combineFilterWithAnd($filters) {
/**
* @brief combines the input filters with AND
- * @param $filters array, the filters to connect
+ * @param array $filters the filters to connect
* @return string the combined filter
*/
public function combineFilterWithOr($filters) {
/**
* @brief combines the input filters with given operator
- * @param $filters array, the filters to connect
+ * @param array $filters the filters to connect
* @param string $operator either & or |
* @return string the combined filter
*/
/**
* @brief creates a filter part for searches
* @param string $search the search term
- * @param $searchAttributes
+ * @param array|null $searchAttributes
* @param string $fallbackAttribute a fallback attribute in case the user
* did not define search attributes. Typically the display name attribute.
* @return string the final filter part to use in LDAP searches
}
/**
- * @param $dn
+ * @param string $dn
* @param bool $isUser
* @return array|bool|false
*/
/**
* @brief checks if the given DN is part of the given base DN(s)
* @param string $dn the DN
- * @param $bases array containing the allowed base DN or DNs
+ * @param array $bases array containing the allowed base DN or DNs
* @return bool
*/
private function isDNPartOfBase($dn, $bases) {
);
/**
- * @param $configPrefix
+ * @param string $configPrefix
* @param bool $autoRead
*/
public function __construct($configPrefix, $autoRead = true) {
}
/**
- * @param $name
+ * @param string $name
* @return mixed|void
*/
public function __get($name) {
}
/**
- * @param $name
- * @param $value
+ * @param string $name
+ * @param mixed $value
*/
public function __set($name, $value) {
$this->setConfiguration(array($name => $value));
* @brief set LDAP configuration with values delivered by an array, not read
* from configuration. It does not save the configuration! To do so, you
* must call saveConfiguration afterwards.
- * @param $config array that holds the config parameters in an associated
+ * @param array $config array that holds the config parameters in an associated
* array
* @param array &$applied optional; array where the set fields will be given to
* @return false|null
}
/**
- * @param $varName
+ * @param string $varName
* @return array|string
*/
protected function getMultiLine($varName) {
}
/**
- * @param $varName
- * @param $value
+ * @param string $varName
+ * @param array|string $value
*/
protected function setMultiLine($varName, $value) {
if(empty($value)) {
}
/**
- * @param $varName
+ * @param string $varName
* @return string
*/
protected function getPwd($varName) {
}
/**
- * @param $varName
+ * @param string $varName
* @return string
*/
protected function getLcValue($varName) {
}
/**
- * @param $varName
+ * @param string $varName
* @return string
*/
protected function getSystemValue($varName) {
}
/**
- * @param $varName
+ * @param string $varName
* @return string
*/
protected function getValue($varName) {
}
/**
- * @param $varName
- * @param $value
+ * @param string $varName
+ * @param mixed $value
*/
protected function setValue($varName, $value) {
$this->config[$varName] = $value;
}
/**
- * @param $varName
- * @param $value
+ * @param string $varName
+ * @param string $value
* @return bool
*/
protected function saveValue($varName, $value) {
return $array;
}
-}
\ No newline at end of file
+}
}
/**
- * @param $name
+ * @param string $name
* @return bool|mixed|void
*/
public function __get($name) {
}
/**
- * @param $name
- * @param $value
+ * @param string $name
+ * @param mixed $value
*/
public function __set($name, $value) {
$this->doNotValidate = false;
}
/**
- * @param $key
+ * @param string|null $key
* @return string
*/
private function getCacheKey($key) {
}
/**
- * @param $key
+ * @param string $key
* @return mixed|null
*/
public function getFromCache($key) {
}
/**
- * @param $key
+ * @param string $key
* @return bool
*/
public function isCached($key) {
}
/**
- * @param $key
- * @param $value
+ * @param string $key
+ * @param mixed $value
*/
public function writeToCache($key, $value) {
if(!$this->configured) {
/**
* @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 array $config array that holds the config parameters in an associated array
* @param array &$setParameters optional; array where the set fields will be given to
* @return boolean true if config validates, false otherwise. Check with $setParameters for detailed success on single parameters
*/
}
/**
- * @param $host
- * @param $port
+ * @param string $host
+ * @param string $port
* @return false|void
*/
private function doConnect($host, $port) {
* @param int $pageSize number of results per page
* @param bool $isCritical Indicates whether the pagination is critical of not.
* @param array $cookie structure sent by LDAP server
- * @return true on success, false otherwise
+ * @return bool true on success, false otherwise
*/
public function controlPagedResult($link, $pageSize, $isCritical, $cookie);
/**
* @brief Retrieve the LDAP pagination cookie
- * @param $link LDAP link resource
- * @param $result LDAP result resource
- * @param array $cookie structure sent by LDAP server
+ * @param resource $link LDAP link resource
+ * @param resource $result LDAP result resource
+ * @param string $cookie structure sent by LDAP server
* @return bool true on success, false otherwise
*
* Corresponds to ldap_control_paged_result_response
/**
* @brief Sort the result of a LDAP search
- * @param $link LDAP link resource
- * @param $result LDAP result resource
+ * @param resource $link LDAP link resource
+ * @param resource $result LDAP result resource
* @param string $sortFilter attribute to use a key in sort
*/
public function sort($link, $result, $sortFilter);
}
/**
- * @param $argument
+ * @param mixed $argument
*/
public function run($argument){
Jobs::updateGroups();
}
/**
- * @param $groups
+ * @param array $groups
*/
static private function handleKnownGroups($groups) {
\OCP\Util::writeLog('user_ldap', 'bgJ "updateGroups" – Dealing with known Groups.', \OCP\Util::DEBUG);
}
/**
- * @param $createdGroups
+ * @param array $createdGroups
*/
static private function handleCreatedGroups($createdGroups) {
\OCP\Util::writeLog('user_ldap', 'bgJ "updateGroups" – dealing with created Groups.', \OCP\Util::DEBUG);
}
/**
- * @param $removedGroups
+ * @param array $removedGroups
*/
static private function handleRemovedGroups($removedGroups) {
\OCP\Util::writeLog('user_ldap', 'bgJ "updateGroups" – dealing with removed groups.', \OCP\Util::DEBUG);
/**
* @param LDAP $link
* @param LDAP $result
- * @param $cookie
+ * @param string $cookie
* @return bool|LDAP
*/
public function controlPagedResultResponse($link, $result, &$cookie) {
* @param LDAP $link
* @param int $pageSize
* @param bool $isCritical
- * @param array $cookie
+ * @param string $cookie
* @return mixed|true
*/
public function controlPagedResult($link, $pageSize, $isCritical, $cookie) {
/**
* @param string $functionName
- * @param $args
+ * @param array $args
*/
private function preFunctionCall($functionName, $args) {
$this->curFunc = $functionName;
}
/**
- * @param $configPrefix
+ * @param string $configPrefix
*/
private function addAccess($configPrefix) {
$connector = new Connection($this->ldap, $configPrefix);
}
/**
- * @param $configPrefix
+ * @param string $configPrefix
* @return mixed
*/
protected function getAccess($configPrefix) {
}
/**
- * @param $uid
+ * @param string $uid
* @return string
*/
protected function getUserCacheKey($uid) {
}
/**
- * @param $gid
+ * @param string $gid
* @return string
*/
protected function getGroupCacheKey($gid) {
}
/**
- * @param $id
- * @param $method
- * @param $parameters
+ * @param string $id
+ * @param string $method
+ * @param array $parameters
* @param bool $passOnWhen
* @return mixed
*/
abstract protected function callOnLastSeenOn($id, $method, $parameters, $passOnWhen);
/**
- * @param $id
- * @param $method
- * @param $parameters
+ * @param string $id
+ * @param string $method
+ * @param array $parameters
* @return mixed
*/
abstract protected function walkBackends($id, $method, $parameters);
/**
* @brief Takes care of the request to the User backend
- * @param $id
+ * @param string $id
* @param string $method string, the method of the user backend that shall be called
* @param array $parameters an array of parameters to be passed
* @param bool $passOnWhen
}
/**
- * @param $key
+ * @param string|null $key
* @return string
*/
private function getCacheKey($key) {
}
/**
- * @param $key
+ * @param string $key
* @return mixed|null
*/
public function getFromCache($key) {
}
/**
- * @param $key
+ * @param string $key
* @return bool
*/
public function isCached($key) {
}
/**
- * @param $key
- * @param $value
+ * @param string $key
+ * @param mixed $value
*/
public function writeToCache($key, $value) {
$key = $this->getCacheKey($key);
* specified attribute
* @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
+ * @param bool $lfw whether the last filter is a wildcard which shall not
* be processed if there were already findings, defaults to true
* @param int $dnReadLimit the amount of how many DNs should be analyzed.
* The lower, the faster
* @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
+ * @param bool $po whether the objectClass with most result entries
* shall be pre-selected via the result
* @return array, list of found items.
* @throws \Exception
/**
* @brief appends a list of values fr
- * @param $result resource, the return value from ldap_get_attributes
+ * @param resource $result the return value from ldap_get_attributes
* @param string $attribute the attribute values to look for
- * @param &$known array, new values will be appended here
+ * @param array &$known new values will be appended here
* @return int, state on of the class constants LRESULT_PROCESSED_OK,
* LRESULT_PROCESSED_INVALID or LRESULT_PROCESSED_SKIP
*/
protected $markedChange = false;
/**
- * @param $key
- * @param $value
+ * @param string $key
+ * @param mixed $value
*/
public function addChange($key, $value) {
$this->changes[$key] = $value;
}
return $result;
}
-}
\ No newline at end of file
+}
/**
* @brief Prepares the Access mock for checkPassword tests
- * @param $access mock of \OCA\user_ldap\lib\Access
+ * @param \OCA\user_ldap\lib\Access $access mock
* @return void
*/
private function prepareAccessForCheckPassword(&$access) {
/**
* @brief Prepares the Access mock for getUsers tests
- * @param $access mock of \OCA\user_ldap\lib\Access
+ * @param \OCA\user_ldap\lib\Access $access mock
* @return void
*/
private function prepareAccessForGetUsers(&$access) {
$result = $backend->countUsers();
$this->assertFalse($result);
}
-}
\ No newline at end of file
+}
/**
* @brief reads jpegPhoto and set is as avatar if available
- * @param $uid string ownCloud user name
- * @param $dn string the user's LDAP DN
+ * @param string $uid ownCloud user name
+ * @param string $dn the user's LDAP DN
* @return void
*/
private function updateAvatar($uid, $dn) {
/**
* @brief checks whether the user is allowed to change his avatar in ownCloud
- * @param $uid string the ownCloud user name
+ * @param string $uid the ownCloud user name
* @return boolean either the user can or cannot
*/
public function canChangeAvatar($uid) {
/**
* @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
+ * @param string $uid the ownCloud user name
+ * @param string $dn the user DN
* @return string data (provided by LDAP) | false
*/
private function getAvatarImage($uid, $dn) {
/**
* @brief Get a list of all users
- * @returns array with all uids
+ * @return array with all uids
*
* Get a list of all users.
*/
/**
* @brief delete a user
- * @param $uid The username of the user to delete
- * @returns true/false
+ * @param string $uid The username of the user to delete
+ * @return bool
*
* Deletes a user
*/
/**
* @brief get display name of the user
- * @param $uid user ID of the user
- * @return display name
+ * @param string $uid user ID of the user
+ * @return string display name
*/
public function getDisplayName($uid) {
if(!$this->userExists($uid)) {
/**
* @brief Get a list of all display names
- * @returns array with all displayNames (value) and the correspondig uids (key)
+ * @return array with all displayNames (value) and the correspondig uids (key)
*
* Get a list of all display names and user ids.
*/
/**
* @brief Check if backend implements actions
- * @param $actions bitwise-or'ed actions
- * @returns boolean
+ * @param int $actions bitwise-or'ed actions
+ * @return boolean
*
* Returns the supported actions as int to be
* compared with OC_USER_BACKEND_CREATE_USER etc.
/**
* @brief Constructor
- * @param $serverConfigPrefixes array containing the config Prefixes
+ * @param array $serverConfigPrefixes array containing the config Prefixes
*/
public function __construct($serverConfigPrefixes, ILDAPWrapper $ldap) {
parent::__construct($ldap);
/**
* @brief Tries the backends one after the other until a positive result is returned from the specified method
- * @param $uid string, the uid connected to the request
- * @param $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 method or false
+ * @param string $uid the uid connected to the request
+ * @param string $method the method of the user backend that shall be called
+ * @param array $parameters an array of parameters to be passed
+ * @return mixed the result of the method or false
*/
protected function walkBackends($uid, $method, $parameters) {
$cacheKey = $this->getUserCacheKey($uid);
/**
* @brief Asks the backend connected to the server that supposely takes care of the uid from the request.
- * @param $uid string, the uid connected to the request
- * @param $method string, the method of the user backend that shall be called
- * @param $parameters an array of parameters to be passed
- * @param $passOnWhen the result matches this variable
- * @return mixed, the result of the method or false
+ * @param string $uid the uid connected to the request
+ * @param string $method the method of the user backend that shall be called
+ * @param array $parameters an array of parameters to be passed
+ * @param mixed $passOnWhen the result matches this variable
+ * @return mixed the result of the method or false
*/
protected function callOnLastSeenOn($uid, $method, $parameters, $passOnWhen) {
$cacheKey = $this->getUserCacheKey($uid);
/**
* @brief Check if backend implements actions
- * @param $actions bitwise-or'ed actions
- * @returns boolean
+ * @param int $actions bitwise-or'ed actions
+ * @return boolean
*
* Returns the supported actions as int to be
* compared with OC_USER_BACKEND_CREATE_USER etc.
/**
* @brief Get a list of all users
- * @returns array with all uids
+ * @return array with all uids
*
* Get a list of all users.
*/
/**
* @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 bool
*
* Check if the password is correct without logging in the user
*/
/**
* @brief get display name of the user
- * @param $uid user ID of the user
- * @return display name
+ * @param string $uid user ID of the user
+ * @return string display name
*/
public function getDisplayName($uid) {
return $this->handleRequest($uid, 'getDisplayName', array($uid));
/**
* @brief checks whether the user is allowed to change his avatar in ownCloud
- * @param $uid string the ownCloud user name
+ * @param string $uid the ownCloud user name
* @return boolean either the user can or cannot
*/
public function canChangeAvatar($uid) {
/**
* @brief Get a list of all display names
- * @returns array with all displayNames (value) and the corresponding uids (key)
+ * @return array with all displayNames (value) and the corresponding uids (key)
*
* Get a list of all display names and user ids.
*/
/**
* @brief delete a user
- * @param $uid The username of the user to delete
- * @returns true/false
+ * @param string $uid The username of the user to delete
+ * @return bool
*
* Deletes a user
*/
/**
* @brief Count the number of users
- * @returns int | bool
+ * @return int|bool
*/
public function countUsers() {
$users = false;