aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorRobin McCorkell <rmccorkell@karoshi.org.uk>2014-05-11 21:51:30 +0100
committerRobin McCorkell <rmccorkell@karoshi.org.uk>2014-05-13 19:08:14 +0100
commit87b548ed91c03f051a93cc39bf94650922c1f55f (patch)
tree1c2a03d338f3c9a9e729b08d66c83ef9a55782f2 /lib/public
parenta7ae2e874a28aed2c190840634db50a19ab1d2e7 (diff)
downloadnextcloud-server-87b548ed91c03f051a93cc39bf94650922c1f55f.tar.gz
nextcloud-server-87b548ed91c03f051a93cc39bf94650922c1f55f.zip
Fix all PHPDoc types and variable names, in /lib
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/app.php10
-rw-r--r--lib/public/backgroundjob.php4
-rw-r--r--lib/public/backgroundjob/ijoblist.php6
-rw-r--r--lib/public/contacts.php4
-rw-r--r--lib/public/db.php2
-rw-r--r--lib/public/iavatar.php2
-rw-r--r--lib/public/iavatarmanager.php2
-rw-r--r--lib/public/idbconnection.php4
-rw-r--r--lib/public/il10n.php2
-rw-r--r--lib/public/route/iroute.php2
-rw-r--r--lib/public/share.php24
-rw-r--r--lib/public/template.php22
-rw-r--r--lib/public/user.php14
-rw-r--r--lib/public/util.php16
14 files changed, 57 insertions, 57 deletions
diff --git a/lib/public/app.php b/lib/public/app.php
index 96162299ec4..bef4e96ae02 100644
--- a/lib/public/app.php
+++ b/lib/public/app.php
@@ -36,7 +36,7 @@ namespace OCP;
class App {
/**
* Makes ownCloud aware of this app
- * @param array with all information
+ * @param array $data with all information
* @return boolean
*
* @deprecated This method is deprecated. Do not call it anymore.
@@ -49,7 +49,7 @@ class App {
/**
* Adds an entry to the navigation
- * @param array containing the data
+ * @param array $data containing the data
* @return boolean
*
* This function adds a new entry to the navigation visible to users. $data
@@ -70,7 +70,7 @@ class App {
/**
* Marks a navigation entry as active
- * @param string id of the entry
+ * @param string $id id of the entry
* @return boolean
*
* This function sets a navigation entry as active and removes the 'active'
@@ -83,8 +83,8 @@ class App {
/**
* Register a Configuration Screen that should appear in the personal settings section.
- * @param $app string appid
- * @param $page string page to be included
+ * @param string $app appid
+ * @param string $page page to be included
* @return void
*/
public static function registerPersonal( $app, $page ) {
diff --git a/lib/public/backgroundjob.php b/lib/public/backgroundjob.php
index 1832f766ea3..562228e1e52 100644
--- a/lib/public/backgroundjob.php
+++ b/lib/public/backgroundjob.php
@@ -94,7 +94,7 @@ class BackgroundJob {
/**
* @deprecated
* gets all regular tasks
- * @return associative array
+ * @return array
*
* key is string "$klass-$method", value is array( $klass, $method )
*/
@@ -115,7 +115,7 @@ class BackgroundJob {
* @deprecated
* Gets one queued task
* @param int $id ID of the task
- * @return BackgroundJob\IJob array
+ * @return BackgroundJob\IJob|null
*/
public static function findQueuedTask($id) {
$jobList = \OC::$server->getJobList();
diff --git a/lib/public/backgroundjob/ijoblist.php b/lib/public/backgroundjob/ijoblist.php
index c9b546605b8..366b0e37368 100644
--- a/lib/public/backgroundjob/ijoblist.php
+++ b/lib/public/backgroundjob/ijoblist.php
@@ -12,7 +12,7 @@ interface IJobList {
/**
* Add a job to the list
*
- * @param \OCP\BackgroundJob\IJob |string $job
+ * @param \OCP\BackgroundJob\IJob|string $job
* @param mixed $argument The argument to be passed to $job->run() when the job is exectured
* @param string $job
* @return void
@@ -22,7 +22,7 @@ interface IJobList {
/**
* Remove a job from the list
*
- * @param IJob $job
+ * @param \OCP\BackgroundJob\IJob|string $job
* @param mixed $argument
* @return void
*/
@@ -31,7 +31,7 @@ interface IJobList {
/**
* check if a job is in the list
*
- * @param $job
+ * @param \OCP\BackgroundJob\IJob|string $job
* @param mixed $argument
* @return bool
*/
diff --git a/lib/public/contacts.php b/lib/public/contacts.php
index 70c67c75731..0d12e91c67f 100644
--- a/lib/public/contacts.php
+++ b/lib/public/contacts.php
@@ -98,7 +98,7 @@ namespace OCP {
* 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
* @return bool successful or not
*/
public static function delete($id, $address_book_key) {
@@ -111,7 +111,7 @@ namespace OCP {
* 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 an array representing the contact just created or updated
*/
public static function createOrUpdate($properties, $address_book_key) {
diff --git a/lib/public/db.php b/lib/public/db.php
index cb876b4d1f9..ba3a4724ce0 100644
--- a/lib/public/db.php
+++ b/lib/public/db.php
@@ -50,7 +50,7 @@ class DB {
/**
* Insert a row if a matching row doesn't exists.
* @param string $table The optional table name (will replace *PREFIX*) and add sequence suffix
- * @param $input array
+ * @param array $input
*
* The input array if in the form:
*
diff --git a/lib/public/iavatar.php b/lib/public/iavatar.php
index 43fa32556de..fc7e8e79fed 100644
--- a/lib/public/iavatar.php
+++ b/lib/public/iavatar.php
@@ -15,7 +15,7 @@ interface IAvatar {
/**
* @brief get the users avatar
- * @param $size integer size in px of the avatar, avatars are square, defaults to 64
+ * @param int $size size in px of the avatar, avatars are square, defaults to 64
* @return boolean|\OC_Image containing the avatar or false if there's no image
*/
function get($size = 64);
diff --git a/lib/public/iavatarmanager.php b/lib/public/iavatarmanager.php
index 9b185ae0467..b09b456a0da 100644
--- a/lib/public/iavatarmanager.php
+++ b/lib/public/iavatarmanager.php
@@ -16,7 +16,7 @@ interface IAvatarManager {
/**
* @brief return a user specific instance of \OCP\IAvatar
* @see \OCP\IAvatar
- * @param $user string the ownCloud user id
+ * @param string $user the ownCloud user id
* @return \OCP\IAvatar
*/
function getAvatar($user);
diff --git a/lib/public/idbconnection.php b/lib/public/idbconnection.php
index 656b5e7e5b2..3e6624e07e9 100644
--- a/lib/public/idbconnection.php
+++ b/lib/public/idbconnection.php
@@ -52,8 +52,8 @@ interface IDBConnection {
/**
* Insert a row if a matching row doesn't exists.
- * @param string The table name (will replace *PREFIX*) to perform the replace on.
- * @param array
+ * @param string $table The table name (will replace *PREFIX*) to perform the replace on.
+ * @param array $input
*
* The input array if in the form:
*
diff --git a/lib/public/il10n.php b/lib/public/il10n.php
index 1388274c21a..c228be6a0a3 100644
--- a/lib/public/il10n.php
+++ b/lib/public/il10n.php
@@ -53,7 +53,7 @@ interface IL10N {
* Localization
* @param string $type Type of localization
* @param array $data parameters for this localization
- * @return String or false
+ * @return string|false
*
* Returns the localized data.
*
diff --git a/lib/public/route/iroute.php b/lib/public/route/iroute.php
index d5610e762a8..f511e7af720 100644
--- a/lib/public/route/iroute.php
+++ b/lib/public/route/iroute.php
@@ -26,7 +26,7 @@ interface IRoute {
* The action to execute when this route matches, includes a file like
* it is called directly
*
- * @param $file
+ * @param string $file
* @return void
*/
public function actionInclude($file);
diff --git a/lib/public/share.php b/lib/public/share.php
index 018386253bc..33c5069ac57 100644
--- a/lib/public/share.php
+++ b/lib/public/share.php
@@ -92,13 +92,13 @@ class Share extends \OC\Share\Constants {
/**
* Get the items of item type shared with a user
- * @param string Item type
- * @param sting user id for which user we want the shares
- * @param int Format (optional) Format type must be defined by the backend
- * @param mixed Parameters (optional)
- * @param int Number of items to return (optional) Returns all by default
- * @param bool include collections (optional)
- * @return Return depends on format
+ * @param string $itemType
+ * @param string $user for which user we want the shares
+ * @param int $format (optional) Format type must be defined by the backend
+ * @param mixed $parameters (optional)
+ * @param int $limit Number of items to return (optional) Returns all by default
+ * @param bool $includeCollections (optional)
+ * @return mixed Return depends on format
*/
public static function getItemsSharedWithUser($itemType, $user, $format = self::FORMAT_NONE,
$parameters = null, $limit = -1, $includeCollections = false) {
@@ -111,8 +111,8 @@ class Share extends \OC\Share\Constants {
* @param string $itemType
* @param string $itemTarget
* @param int $format (optional) Format type must be defined by the backend
- * @param mixed Parameters (optional)
- * @param bool include collections (optional)
+ * @param mixed $parameters (optional)
+ * @param bool $includeCollections (optional)
* @return mixed Return depends on format
*/
public static function getItemSharedWith($itemType, $itemTarget, $format = self::FORMAT_NONE,
@@ -168,8 +168,8 @@ class Share extends \OC\Share\Constants {
/**
* resolves reshares down to the last real share
- * @param $linkItem
- * @return $fileOwner
+ * @param array $linkItem
+ * @return array file owner
*/
public static function resolveReShare($linkItem) {
return \OC\Share\Share::resolveReShare($linkItem);
@@ -213,7 +213,7 @@ class Share extends \OC\Share\Constants {
* @param string $uidOwner
* @param bool $includeCollections
* @param bool $checkExpireDate
- * @return Return array of users
+ * @return array Return array of users
*/
public static function getUsersItemShared($itemType, $itemSource, $uidOwner, $includeCollections = false, $checkExpireDate = true) {
return \OC\Share\Share::getUsersItemShared($itemType, $itemSource, $uidOwner, $includeCollections, $checkExpireDate);
diff --git a/lib/public/template.php b/lib/public/template.php
index 6cc984b12d5..b1264e0c3ad 100644
--- a/lib/public/template.php
+++ b/lib/public/template.php
@@ -33,8 +33,8 @@ namespace OCP;
/**
* Make OC_Helper::imagePath available as a simple function
- * @param string app
- * @param string image
+ * @param string $app
+ * @param string $image
* @return string to the image
*
* @see OC_Helper::imagePath
@@ -46,7 +46,7 @@ function image_path( $app, $image ) {
/**
* Make OC_Helper::mimetypeIcon available as a simple function
- * @param string mimetype
+ * @param string $mimetype
* @return string to the image of this file type.
*/
function mimetype_icon( $mimetype ) {
@@ -55,7 +55,7 @@ function mimetype_icon( $mimetype ) {
/**
* Make preview_icon available as a simple function
- * @param string path of file
+ * @param string $path path to file
* @return string to the preview of the image
*/
function preview_icon( $path ) {
@@ -76,7 +76,7 @@ function publicPreview_icon ( $path, $token ) {
/**
* Make OC_Helper::humanFileSize available as a simple function
* Example: 2048 to 2 kB.
- * @param int size in bytes
+ * @param int $size in bytes
* @return string size as string
*/
function human_file_size( $bytes ) {
@@ -86,8 +86,8 @@ function human_file_size( $bytes ) {
/**
* Return the relative date in relation to today. Returns something like "last hour" or "two month ago"
- * @param int unix timestamp
- * @param boolean date only
+ * @param int $timestamp unix timestamp
+ * @param boolean $dateOnly
* @return OC_L10N_String human readable interpretation of the timestamp
*/
function relative_modified_date( $timestamp, $dateOnly = false ) {
@@ -98,7 +98,7 @@ function relative_modified_date( $timestamp, $dateOnly = false ) {
/**
* Return a human readable outout for a file size.
* @deprecated human_file_size() instead
- * @param integer size of a file in byte
+ * @param integer $bytes size of a file in byte
* @return string human readable interpretation of a file size
*/
function simple_file_size($bytes) {
@@ -108,9 +108,9 @@ function simple_file_size($bytes) {
/**
* Generate html code for an options block.
- * @param $options the options
- * @param $selected which one is selected?
- * @param array the parameters
+ * @param array $options the options
+ * @param mixed $selected which one is selected?
+ * @param array $params the parameters
* @return string html options
*/
function html_select_options($options, $selected, $params=array()) {
diff --git a/lib/public/user.php b/lib/public/user.php
index e79ad4e7190..925410d37d5 100644
--- a/lib/public/user.php
+++ b/lib/public/user.php
@@ -45,9 +45,9 @@ class User {
/**
* Get a list of all users
- * @param string search pattern
- * @param integer $limit
- * @param integer $offset
+ * @param string $search search pattern
+ * @param int|null $limit
+ * @param int|null $offset
* @return array an array of all uids
*/
public static function getUsers( $search = '', $limit = null, $offset = null ) {
@@ -56,7 +56,7 @@ class User {
/**
* Get the user display name of the user currently logged in.
- * @param string user id or null for current user
+ * @param string|null $user user id or null for current user
* @return string display name
*/
public static function getDisplayName( $user = null ) {
@@ -65,9 +65,9 @@ class User {
/**
* Get a list of all display names and user ids.
- * @param string search pattern
- * @param int limit
- * @param int offset
+ * @param string $search search pattern
+ * @param int|null $limit
+ * @param int|null $offset
* @return array an array of all display names (value) and the correspondig uids (key)
*/
public static function getDisplayNames( $search = '', $limit = null, $offset = null ) {
diff --git a/lib/public/util.php b/lib/public/util.php
index 0ca6f7928c3..8aeb03aef8e 100644
--- a/lib/public/util.php
+++ b/lib/public/util.php
@@ -203,7 +203,7 @@ class Util {
/**
* Creates an url using a defined route
- * @param $route
+ * @param string $route
* @param array $parameters
* @internal param array $args with param=>value, will be appended to the returned url
* @return string the url
@@ -380,8 +380,8 @@ class Util {
* This function is used to sanitize HTML and should be applied on any
* string or array of strings before displaying it on a web page.
*
- * @param string|array of strings
- * @return array an array of sanitized strings or a single sinitized string, depends on the input parameter.
+ * @param string|array $value
+ * @return string|array an array of sanitized strings or a single sinitized string, depends on the input parameter.
*/
public static function sanitizeHTML( $value ) {
return(\OC_Util::sanitizeHTML($value));
@@ -458,7 +458,7 @@ class Util {
*
* @param string $dir the current folder where the user currently operates
* @param int $free the number of bytes free on the storage holding $dir, if not set this will be received from the storage directly
- * @return number of bytes representing
+ * @return int number of bytes representing
*/
public static function maxUploadFilesize($dir, $free = null) {
return \OC_Helper::maxUploadFilesize($dir, $free);
@@ -476,7 +476,7 @@ class Util {
/**
* Calculate PHP upload limit
*
- * @return number of bytes representing
+ * @return int number of bytes representing
*/
public static function uploadLimit() {
return \OC_Helper::uploadLimit();
@@ -484,7 +484,7 @@ class Util {
/**
* Returns whether the given file name is valid
- * @param $file string file name to check
+ * @param string $file file name to check
* @return bool true if the file name is valid, false otherwise
*/
public static function isValidFileName($file) {
@@ -493,8 +493,8 @@ class Util {
/**
* @brief Generates a cryptographic secure pseudo-random string
- * @param Int $length of the random string
- * @return String
+ * @param int $length of the random string
+ * @return string
*/
public static function generateRandomBytes($length = 30) {
return \OC_Util::generateRandomBytes($length);