diff options
author | Robin McCorkell <rmccorkell@karoshi.org.uk> | 2014-05-13 12:29:25 +0100 |
---|---|---|
committer | Robin McCorkell <rmccorkell@karoshi.org.uk> | 2014-05-16 22:21:57 +0100 |
commit | c4f1de63a8ebe137566e034641b7bc3b05a05058 (patch) | |
tree | c238bc352ad6507bd40de7ed8eecedd03c470ce2 /apps/files_encryption | |
parent | 42b99b6d0fbcaf54b3cf3b3c9be5bc8a9c7a2e12 (diff) | |
download | nextcloud-server-c4f1de63a8ebe137566e034641b7bc3b05a05058.tar.gz nextcloud-server-c4f1de63a8ebe137566e034641b7bc3b05a05058.zip |
Fix PHPDoc in /apps
Diffstat (limited to 'apps/files_encryption')
-rw-r--r-- | apps/files_encryption/hooks/hooks.php | 2 | ||||
-rwxr-xr-x | apps/files_encryption/lib/crypt.php | 21 | ||||
-rwxr-xr-x | apps/files_encryption/lib/helper.php | 2 | ||||
-rwxr-xr-x | apps/files_encryption/lib/keymanager.php | 6 | ||||
-rw-r--r-- | apps/files_encryption/lib/proxy.php | 16 | ||||
-rw-r--r-- | apps/files_encryption/lib/session.php | 4 | ||||
-rw-r--r-- | apps/files_encryption/lib/stream.php | 20 | ||||
-rw-r--r-- | apps/files_encryption/lib/util.php | 11 | ||||
-rwxr-xr-x | apps/files_encryption/tests/crypt.php | 2 | ||||
-rwxr-xr-x | apps/files_encryption/tests/util.php | 4 |
10 files changed, 43 insertions, 45 deletions
diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php index c9ffeb454a1..fdc1126f448 100644 --- a/apps/files_encryption/hooks/hooks.php +++ b/apps/files_encryption/hooks/hooks.php @@ -262,7 +262,7 @@ class Hooks { * @brief check if files can be encrypted to every user.
*/
/**
- * @param $params
+ * @param array $params
*/
public static function preShared($params) {
diff --git a/apps/files_encryption/lib/crypt.php b/apps/files_encryption/lib/crypt.php index 7d86eb72ed1..5cdc92e85f7 100755 --- a/apps/files_encryption/lib/crypt.php +++ b/apps/files_encryption/lib/crypt.php @@ -125,7 +125,7 @@ class Crypt { /**
* @brief Check if a file's contents contains an IV and is symmetrically encrypted
- * @param $content
+ * @param string $content
* @return boolean
* @note see also OCA\Encryption\Util->isEncryptedPath()
*/
@@ -179,10 +179,9 @@ class Crypt { /**
* @brief Check if a file is encrypted via legacy system
- * @param $data
+ * @param boolean $isCatFileContent
* @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) {
@@ -323,7 +322,7 @@ class Crypt { /**
* @brief Symmetrically decrypts keyfile content
- * @param $keyfileContent
+ * @param string $keyfileContent
* @param string $passphrase
* @throws \Exception
* @return string|false
@@ -362,7 +361,7 @@ class Crypt { * @brief Decrypt private key and check if the result is a valid keyfile
* @param string $encryptedKey encrypted keyfile
* @param string $passphrase to decrypt keyfile
- * @return encrypted private key or false
+ * @return string|false encrypted private key or false
*
* This function decrypts a file
*/
@@ -435,9 +434,9 @@ class Crypt { /**
* @brief Asymmetrically encrypt a file using multiple public keys
- * @param $encryptedContent
- * @param $shareKey
- * @param $privateKey
+ * @param string $encryptedContent
+ * @param string $shareKey
+ * @param mixed $privateKey
* @return false|string
* @internal param string $plainContent content to be encrypted
* @return string $plainContent decrypted string
@@ -498,7 +497,7 @@ class Crypt { /**
* @brief Generate a pseudo random 256-bit ASCII key, used as file key
- * @return $key Generated key
+ * @return string|false Generated key
*/
public static function generateKey() {
@@ -524,7 +523,7 @@ class Crypt { /**
* @brief Get the blowfish encryption handler for a key
- * @param $key string (optional)
+ * @param string $key (optional)
* @return \Crypt_Blowfish blowfish object
*
* if the key is left out, the default handler will be used
@@ -561,7 +560,7 @@ class Crypt { }
/**
- * @param $data
+ * @param string $data
* @param string $key
* @param int $maxLength
* @return string
diff --git a/apps/files_encryption/lib/helper.php b/apps/files_encryption/lib/helper.php index c3a31ff9fbc..2455c605dfe 100755 --- a/apps/files_encryption/lib/helper.php +++ b/apps/files_encryption/lib/helper.php @@ -102,7 +102,7 @@ class Helper { /** * @brief enable recovery * - * @param $recoveryKeyId + * @param string $recoveryKeyId * @param string $recoveryPassword * @internal param \OCA\Encryption\Util $util * @internal param string $password diff --git a/apps/files_encryption/lib/keymanager.php b/apps/files_encryption/lib/keymanager.php index 5aa8a6ab06e..0732153f313 100755 --- a/apps/files_encryption/lib/keymanager.php +++ b/apps/files_encryption/lib/keymanager.php @@ -57,7 +57,7 @@ class Keymanager { /** * @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) { @@ -76,7 +76,7 @@ class Keymanager { /** * @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) { @@ -297,7 +297,7 @@ class Keymanager { * * @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 diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php index 919853107a8..b5bb03cb1c1 100644 --- a/apps/files_encryption/lib/proxy.php +++ b/apps/files_encryption/lib/proxy.php @@ -79,8 +79,8 @@ class Proxy extends \OC_FileProxy { } /** - * @param $path - * @param $data + * @param string $path + * @param string $data * @return bool */ public function preFile_put_contents($path, &$data) { @@ -225,7 +225,7 @@ class Proxy extends \OC_FileProxy { /** - * @param $path + * @param string $path * @param $result * @return resource */ @@ -261,8 +261,8 @@ class Proxy extends \OC_FileProxy { } /** - * @param $path - * @param $data + * @param string $path + * @param array $data * @return array */ public function postGetFileInfo($path, $data) { @@ -285,9 +285,9 @@ class Proxy extends \OC_FileProxy { } /** - * @param $path - * @param $size - * @return bool + * @param string $path + * @param int $size + * @return int|bool */ public function postFileSize($path, $size) { diff --git a/apps/files_encryption/lib/session.php b/apps/files_encryption/lib/session.php index dea27d7a186..a3870014b3c 100644 --- a/apps/files_encryption/lib/session.php +++ b/apps/files_encryption/lib/session.php @@ -121,7 +121,7 @@ class Session { /** * @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! @@ -145,7 +145,7 @@ class Session { /** * @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! */ diff --git a/apps/files_encryption/lib/stream.php b/apps/files_encryption/lib/stream.php index 8b575174e2e..9a204e088a3 100644 --- a/apps/files_encryption/lib/stream.php +++ b/apps/files_encryption/lib/stream.php @@ -79,10 +79,10 @@ class Stream { 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) { @@ -187,7 +187,7 @@ class Stream { } /** - * @param $offset + * @param int $offset * @param int $whence * @return bool true if fseek was successful, otherwise false */ @@ -202,7 +202,7 @@ class Stream { } /** - * @param $count + * @param int $count * @return bool|string * @throws \Exception */ @@ -426,9 +426,9 @@ class Stream { /** - * @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; @@ -454,7 +454,7 @@ class Stream { } /** - * @param $mode + * @param int $mode */ public function stream_lock($mode) { return flock($this->handle, $mode); diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php index b96e4590507..84dbec6fdfc 100644 --- a/apps/files_encryption/lib/util.php +++ b/apps/files_encryption/lib/util.php @@ -54,7 +54,7 @@ class Util { /** * @param \OC\Files\View $view - * @param $userId + * @param string $userId * @param bool $client */ public function __construct($view, $userId, $client = false) { @@ -1238,7 +1238,7 @@ class Util { /** * @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 */ @@ -1398,8 +1398,7 @@ class Util { /** * @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) { @@ -1479,7 +1478,7 @@ class Util { } /** - * @param $password + * @param string $password * @return bool */ public function checkRecoveryPassword($password) { @@ -1639,7 +1638,7 @@ class Util { /** * @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) { diff --git a/apps/files_encryption/tests/crypt.php b/apps/files_encryption/tests/crypt.php index 83c2ab30b8e..b98798d7265 100755 --- a/apps/files_encryption/tests/crypt.php +++ b/apps/files_encryption/tests/crypt.php @@ -662,7 +662,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { /** * @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) { diff --git a/apps/files_encryption/tests/util.php b/apps/files_encryption/tests/util.php index 11961f27675..395bf152cd9 100755 --- a/apps/files_encryption/tests/util.php +++ b/apps/files_encryption/tests/util.php @@ -554,7 +554,7 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase { } /** - * @param $user + * @param string $user * @param bool $create * @param bool $password */ @@ -595,7 +595,7 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase { * 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) { |