summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2014-02-28 13:37:41 +0100
committerBart Visscher <bartv@thisnet.nl>2014-02-28 13:37:41 +0100
commit89e0763d3d511d2da878db43c89300c51850b0f3 (patch)
tree83798f7a7ae60b516ea3e7ab913db56002000bec
parent6335f855f9eb5038f3b8bd5cfea4fb9c173fca6d (diff)
downloadnextcloud-server-89e0763d3d511d2da878db43c89300c51850b0f3.tar.gz
nextcloud-server-89e0763d3d511d2da878db43c89300c51850b0f3.zip
Update PHPDoc for I10N, OC_Config, OC\Template\Base and OCP\IL10N
-rw-r--r--lib/private/l10n.php31
-rw-r--r--lib/private/legacy/config.php6
-rw-r--r--lib/private/template/base.php4
-rw-r--r--lib/public/il10n.php12
4 files changed, 26 insertions, 27 deletions
diff --git a/lib/private/l10n.php b/lib/private/l10n.php
index ad979a92870..b98ccc9d58b 100644
--- a/lib/private/l10n.php
+++ b/lib/private/l10n.php
@@ -73,9 +73,9 @@ class OC_L10N implements \OCP\IL10N {
/**
* get an L10N instance
- * @param $app string
- * @param $lang string|null
- * @return OC_L10N
+ * @param string $app
+ * @param string|null $lang
+ * @return \OC_L10N
*/
public static function get($app, $lang=null) {
if (is_null($lang)) {
@@ -87,9 +87,8 @@ class OC_L10N implements \OCP\IL10N {
/**
* @brief The constructor
- * @param $app string app requesting l10n
- * @param $lang string default: null Language
- * @returns OC_L10N-Object
+ * @param string $app app requesting l10n
+ * @param string $lang default: null Language
*
* If language is not set, the constructor tries to find the right
* language.
@@ -237,7 +236,7 @@ class OC_L10N implements \OCP\IL10N {
/**
* @brief 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
*
@@ -250,9 +249,9 @@ class OC_L10N implements \OCP\IL10N {
/**
* @brief 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
*
@@ -351,8 +350,8 @@ class OC_L10N implements \OCP\IL10N {
/**
* @brief Localization
- * @param $type Type of localization
- * @param $params parameters for this localization
+ * @param string $type Type of localization
+ * @param array $params parameters for this localization
* @returns String or false
*
* Returns the localized data.
@@ -406,7 +405,7 @@ class OC_L10N implements \OCP\IL10N {
/**
* @brief Choose a language
- * @param $texts Associative Array with possible strings
+ * @param array $texts Associative Array with possible strings
* @returns String
*
* $text is an array 'de' => 'hallo welt', 'en' => 'hello world', ...
@@ -421,7 +420,7 @@ class OC_L10N implements \OCP\IL10N {
/**
* @brief find the best language
- * @param $app Array or string, details below
+ * @param array|string $app Array or string, details below
* @returns string language
*
* If $app is an array, ownCloud assumes that these are the available
@@ -494,7 +493,7 @@ class OC_L10N implements \OCP\IL10N {
/**
* @brief find the l10n directory
- * @param $app App that needs to be translated
+ * @param string $app App that needs to be translated
* @returns directory
*/
protected static function findI18nDir($app) {
@@ -514,7 +513,7 @@ class OC_L10N implements \OCP\IL10N {
/**
* @brief find all available languages for an app
- * @param $app App that needs to be translated
+ * @param string $app App that needs to be translated
* @returns array an array of available languages
*/
public static function findAvailableLanguages($app=null) {
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/template/base.php b/lib/private/template/base.php
index 232a29939cc..8af2fce7737 100644
--- a/lib/private/template/base.php
+++ b/lib/private/template/base.php
@@ -61,7 +61,7 @@ class Base {
/**
* @brief Assign variables
* @param string $key key
- * @param string $value value
+ * @param mixed $value value
* @return bool
*
* This function assigns a variable. It can be accessed via $_[$key] in
@@ -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/il10n.php b/lib/public/il10n.php
index 1c025e7824f..bba52b4c4bb 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 $params parameters for this localization
* @return String or false
*
* Returns the localized data.