diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-04-03 20:02:27 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-04-03 20:02:27 +0200 |
commit | 20f26068e769258ecbcce3646bab69a851d6c7c4 (patch) | |
tree | d6943fb83adbcd76bb636b679aece358e7c16b79 /lib | |
parent | e2969062ca172b46713653ac243bb849a54ca7d7 (diff) | |
parent | 6b061c236dd5730837b567f2c39a19af1617d33c (diff) | |
download | nextcloud-server-20f26068e769258ecbcce3646bab69a851d6c7c4.tar.gz nextcloud-server-20f26068e769258ecbcce3646bab69a851d6c7c4.zip |
Merge pull request #7476 from owncloud/type-hinting
Type hinting
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/appconfig.php | 4 | ||||
-rw-r--r-- | lib/private/cache.php | 2 | ||||
-rw-r--r-- | lib/private/contactsmanager.php | 4 | ||||
-rw-r--r-- | lib/private/db.php | 5 | ||||
-rw-r--r-- | lib/private/image.php | 2 | ||||
-rw-r--r-- | lib/private/l10n.php | 5 | ||||
-rw-r--r-- | lib/private/legacy/appconfig.php | 2 | ||||
-rw-r--r-- | lib/private/legacy/config.php | 6 | ||||
-rw-r--r-- | lib/private/server.php | 2 | ||||
-rw-r--r-- | lib/private/share/mailnotifications.php | 1 | ||||
-rw-r--r-- | lib/private/template/base.php | 2 | ||||
-rw-r--r-- | lib/public/contacts/imanager.php | 4 | ||||
-rw-r--r-- | lib/public/iappconfig.php | 5 | ||||
-rw-r--r-- | lib/public/il10n.php | 12 | ||||
-rw-r--r-- | lib/public/iservercontainer.php | 2 |
15 files changed, 26 insertions, 32 deletions
diff --git a/lib/private/appconfig.php b/lib/private/appconfig.php index cdaaebb87e5..cfb84309c67 100644 --- a/lib/private/appconfig.php +++ b/lib/private/appconfig.php @@ -218,8 +218,8 @@ class AppConfig implements \OCP\IAppConfig { /** * get multiply values, either the app or key can be used as wildcard by setting it to false * - * @param boolean $app - * @param string $key + * @param string|false $app + * @param string|false $key * @return array */ public function getValues($app, $key) { diff --git a/lib/private/cache.php b/lib/private/cache.php index a311f10a00f..961270c334c 100644 --- a/lib/private/cache.php +++ b/lib/private/cache.php @@ -97,7 +97,7 @@ class Cache { /** * creates cache key based on the files given - * @param $files + * @param string[] $files * @return string */ static public function generateCacheKeyFromFiles($files) { diff --git a/lib/private/contactsmanager.php b/lib/private/contactsmanager.php index fc6745b4505..1cb3da7098f 100644 --- a/lib/private/contactsmanager.php +++ b/lib/private/contactsmanager.php @@ -47,7 +47,7 @@ namespace OC { * This function can be used to delete the contact identified by the given id * * @param object $id the unique identifier to a contact - * @param $address_book_key + * @param string $address_book_key identifier of the address book in which the contact shall be deleted * @return bool successful or not */ public function delete($id, $address_book_key) { @@ -66,7 +66,7 @@ namespace OC { * Otherwise the contact will be updated by replacing the entire data set. * * @param array $properties this array if key-value-pairs defines a contact - * @param $address_book_key string to identify the address book in which the contact shall be created or updated + * @param string $address_book_key identifier of the address book in which the contact shall be created or updated * @return array representing the contact just created or updated */ public function createOrUpdate($properties, $address_book_key) { diff --git a/lib/private/db.php b/lib/private/db.php index cfdac766bff..322a13642ae 100644 --- a/lib/private/db.php +++ b/lib/private/db.php @@ -313,9 +313,8 @@ class OC_DB { /** * @brief Insert a row if a matching row doesn't exists. - * @param string $table. The table to insert into in the form '*PREFIX*tableName' - * @param array $input. An array of fieldname/value pairs - * @param string $table + * @param string $table The table to insert into in the form '*PREFIX*tableName' + * @param array $input An array of fieldname/value pairs * @return boolean number of updated rows */ public static function insertIfNotExist($table, $input) { diff --git a/lib/private/image.php b/lib/private/image.php index c987ce92c3c..f1b8acc41b7 100644 --- a/lib/private/image.php +++ b/lib/private/image.php @@ -34,7 +34,7 @@ class OC_Image { /** * @brief Get mime type for an image file. - * @param string|null $filepath The path to a local image file. + * @param string|null $filePath The path to a local image file. * @return string The mime type if the it could be determined, otherwise an empty string. */ static public function getMimeTypeForFile($filePath) { diff --git a/lib/private/l10n.php b/lib/private/l10n.php index 197b2d6791b..175360e27a3 100644 --- a/lib/private/l10n.php +++ b/lib/private/l10n.php @@ -75,7 +75,7 @@ class OC_L10N implements \OCP\IL10N { * get an L10N instance * @param string $app * @param string|null $lang - * @return OC_L10N + * @return \OC_L10N */ public static function get($app, $lang=null) { if (is_null($lang)) { @@ -89,7 +89,6 @@ class OC_L10N implements \OCP\IL10N { * @brief The constructor * @param string $app app requesting l10n * @param string $lang default: null Language - * @returns OC_L10N-Object * * If language is not set, the constructor tries to find the right * language. @@ -352,7 +351,7 @@ class OC_L10N implements \OCP\IL10N { /** * @brief Localization * @param string $type Type of localization - * @param $params parameters for this localization + * @param array $data parameters for this localization * @returns String or false * * Returns the localized data. diff --git a/lib/private/legacy/appconfig.php b/lib/private/legacy/appconfig.php index b6c3542a673..cb5cef7e350 100644 --- a/lib/private/legacy/appconfig.php +++ b/lib/private/legacy/appconfig.php @@ -116,8 +116,6 @@ class OC_Appconfig { /** * get multiply values, either the app or key can be used as wildcard by setting it to false * - * @param app - * @param key * @param string|false $app * @param string|false $key * @return array diff --git a/lib/private/legacy/config.php b/lib/private/legacy/config.php index ab67c8d3020..6c2103179ab 100644 --- a/lib/private/legacy/config.php +++ b/lib/private/legacy/config.php @@ -63,8 +63,8 @@ class OC_Config { /** * @brief Gets a value from config.php * @param string $key key - * @param string $default = null default value - * @return string the value or $default + * @param mixed $default = null default value + * @return mixed the value or $default * * This function gets the value from config.php. If it does not exist, * $default will be returned. @@ -76,7 +76,7 @@ class OC_Config { /** * @brief Sets a value * @param string $key key - * @param string $value value + * @param mixed $value value * * This function sets the value and writes the config.php. * diff --git a/lib/private/server.php b/lib/private/server.php index 5c83f3ef495..3517d7b3548 100644 --- a/lib/private/server.php +++ b/lib/private/server.php @@ -302,7 +302,7 @@ class Server extends SimpleContainer implements IServerContainer { /** * get an L10N instance - * @param $app string appid + * @param string $app appid * @return \OC_L10N */ function getL10N($app) { diff --git a/lib/private/share/mailnotifications.php b/lib/private/share/mailnotifications.php index 45734818731..4799db52330 100644 --- a/lib/private/share/mailnotifications.php +++ b/lib/private/share/mailnotifications.php @@ -30,7 +30,6 @@ class MailNotifications { /** * - * @param string $recipient user id * @param string $sender user id (if nothing is set we use the currently logged-in user) */ public function __construct($sender = null) { diff --git a/lib/private/template/base.php b/lib/private/template/base.php index 7aa0cb4a956..3d7c685c1cf 100644 --- a/lib/private/template/base.php +++ b/lib/private/template/base.php @@ -77,7 +77,7 @@ class Base { /** * @brief Appends a variable * @param string $key key - * @param string $value value + * @param mixed $value value * @return boolean|null * * This function assigns a variable in an array context. If the key already diff --git a/lib/public/contacts/imanager.php b/lib/public/contacts/imanager.php index 5b9d64ecc41..005b71f298b 100644 --- a/lib/public/contacts/imanager.php +++ b/lib/public/contacts/imanager.php @@ -96,7 +96,7 @@ namespace OCP\Contacts { * This function can be used to delete the contact identified by the given id * * @param object $id the unique identifier to a contact - * @param $address_book_key + * @param string $address_book_key identifier of the address book in which the contact shall be deleted * @return bool successful or not */ function delete($id, $address_book_key); @@ -106,7 +106,7 @@ namespace OCP\Contacts { * Otherwise the contact will be updated by replacing the entire data set. * * @param array $properties this array if key-value-pairs defines a contact - * @param $address_book_key string to identify the address book in which the contact shall be created or updated + * @param string $address_book_key identifier of the address book in which the contact shall be created or updated * @return array representing the contact just created or updated */ function createOrUpdate($properties, $address_book_key); diff --git a/lib/public/iappconfig.php b/lib/public/iappconfig.php index 1f31898bf2c..2b014df2e42 100644 --- a/lib/public/iappconfig.php +++ b/lib/public/iappconfig.php @@ -55,9 +55,8 @@ interface IAppConfig { /** * get multiply values, either the app or key can be used as wildcard by setting it to false * - * @param app - * @param key - * @param string $key + * @param string|false $key + * @param string|false $app * @return array */ public function getValues($app, $key); diff --git a/lib/public/il10n.php b/lib/public/il10n.php index 1c025e7824f..1388274c21a 100644 --- a/lib/public/il10n.php +++ b/lib/public/il10n.php @@ -23,7 +23,7 @@ namespace OCP; interface IL10N { /** * Translating - * @param $text String The text we need a translation for + * @param string $text The text we need a translation for * @param array $parameters default:array() Parameters for sprintf * @return \OC_L10N_String Translation or the same text * @@ -34,9 +34,9 @@ interface IL10N { /** * Translating - * @param $text_singular String the string to translate for exactly one object - * @param $text_plural String the string to translate for n objects - * @param $count Integer Number of objects + * @param string $text_singular the string to translate for exactly one object + * @param string $text_plural the string to translate for n objects + * @param integer $count Number of objects * @param array $parameters default:array() Parameters for sprintf * @return \OC_L10N_String Translation or the same text * @@ -51,8 +51,8 @@ interface IL10N { /** * Localization - * @param $type Type of localization - * @param $params parameters for this localization + * @param string $type Type of localization + * @param array $data parameters for this localization * @return String or false * * Returns the localized data. diff --git a/lib/public/iservercontainer.php b/lib/public/iservercontainer.php index dc3aff663d4..600d81d83af 100644 --- a/lib/public/iservercontainer.php +++ b/lib/public/iservercontainer.php @@ -122,7 +122,7 @@ interface IServerContainer { /** * get an L10N instance - * @param $app string appid + * @param string $app appid * @return \OCP\IL10N */ function getL10N($app); |