diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2014-02-06 16:30:58 +0100 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2014-02-06 17:02:21 +0100 |
commit | 2a6a9a8cefcf68f48d95e124db0c1b7edc9fe356 (patch) | |
tree | 66d682a22c3d12d1838822fc52cdd48fa765f5df /lib/public | |
parent | 0d94da7e9ef9550c8ae0244b203ca84e5ee007b0 (diff) | |
download | nextcloud-server-2a6a9a8cefcf68f48d95e124db0c1b7edc9fe356.tar.gz nextcloud-server-2a6a9a8cefcf68f48d95e124db0c1b7edc9fe356.zip |
polish documentation based on scrutinizer patches
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/activity/imanager.php | 1 | ||||
-rw-r--r-- | lib/public/app.php | 7 | ||||
-rw-r--r-- | lib/public/appframework/http/response.php | 2 | ||||
-rw-r--r-- | lib/public/appframework/iapi.php | 4 | ||||
-rw-r--r-- | lib/public/appframework/iappcontainer.php | 4 | ||||
-rw-r--r-- | lib/public/backgroundjob.php | 12 | ||||
-rw-r--r-- | lib/public/config.php | 2 | ||||
-rw-r--r-- | lib/public/contacts/imanager.php | 8 | ||||
-rw-r--r-- | lib/public/db.php | 8 | ||||
-rw-r--r-- | lib/public/files.php | 1 | ||||
-rw-r--r-- | lib/public/files/file.php | 1 | ||||
-rw-r--r-- | lib/public/files/node.php | 2 | ||||
-rw-r--r-- | lib/public/files/storage.php | 1 | ||||
-rw-r--r-- | lib/public/iavatar.php | 2 | ||||
-rw-r--r-- | lib/public/iconfig.php | 3 | ||||
-rw-r--r-- | lib/public/il10n.php | 4 | ||||
-rw-r--r-- | lib/public/inavigationmanager.php | 2 | ||||
-rw-r--r-- | lib/public/irequest.php | 5 | ||||
-rw-r--r-- | lib/public/itags.php | 2 | ||||
-rw-r--r-- | lib/public/iusersession.php | 1 | ||||
-rw-r--r-- | lib/public/json.php | 2 | ||||
-rw-r--r-- | lib/public/share.php | 31 | ||||
-rw-r--r-- | lib/public/template.php | 15 | ||||
-rw-r--r-- | lib/public/user.php | 6 |
24 files changed, 83 insertions, 43 deletions
diff --git a/lib/public/activity/imanager.php b/lib/public/activity/imanager.php index 086e430d677..449fdcc934d 100644 --- a/lib/public/activity/imanager.php +++ b/lib/public/activity/imanager.php @@ -53,6 +53,7 @@ interface IManager { * $callable has to return an instance of OCA\Activity\IConsumer * * @param \Closure $callable + * @return void */ function registerConsumer(\Closure $callable); diff --git a/lib/public/app.php b/lib/public/app.php index e0b5682242b..0cb22545362 100644 --- a/lib/public/app.php +++ b/lib/public/app.php @@ -92,8 +92,8 @@ class App { /** * Register a Configuration Screen that should appear in the Admin section. - * @param $app string appid - * @param $page string page to be included + * @param string $app string appid + * @param string $page string page to be included */ public static function registerAdmin( $app, $page ) { \OC_App::registerAdmin( $app, $page ); @@ -112,6 +112,7 @@ class App { /** * checks whether or not an app is enabled * @param string + * @param string $app * @return boolean * * This function checks whether or not an app is enabled. @@ -131,7 +132,7 @@ class App { /** * Get the last version of the app, either from appinfo/version or from appinfo/info.xml * @param string - * @return boolean + * @return string */ public static function getAppVersion( $app ) { return \OC_App::getAppVersion( $app ); diff --git a/lib/public/appframework/http/response.php b/lib/public/appframework/http/response.php index 0f5a18ca4fe..d223621d4fd 100644 --- a/lib/public/appframework/http/response.php +++ b/lib/public/appframework/http/response.php @@ -155,7 +155,7 @@ class Response { /** * Get "last modified" date - * @return string RFC2822 formatted last modified date + * @return \DateTime RFC2822 formatted last modified date */ public function getLastModified() { return $this->lastModified; diff --git a/lib/public/appframework/iapi.php b/lib/public/appframework/iapi.php index 963e870f79b..c4aeea2d4e5 100644 --- a/lib/public/appframework/iapi.php +++ b/lib/public/appframework/iapi.php @@ -45,6 +45,7 @@ interface IApi { * Adds a new javascript file * @param string $scriptName the name of the javascript in js/ without the suffix * @param string $appName the name of the app, defaults to the current one + * @return void */ function addScript($scriptName, $appName = null); @@ -53,6 +54,7 @@ interface IApi { * Adds a new css file * @param string $styleName the name of the css file in css/without the suffix * @param string $appName the name of the app, defaults to the current one + * @return void */ function addStyle($styleName, $appName = null); @@ -60,6 +62,7 @@ interface IApi { /** * shorthand for addScript for files in the 3rdparty directory * @param string $name the name of the file without the suffix + * @return void */ function add3rdPartyScript($name); @@ -67,6 +70,7 @@ interface IApi { /** * shorthand for addStyle for files in the 3rdparty directory * @param string $name the name of the file without the suffix + * @return void */ function add3rdPartyStyle($name); diff --git a/lib/public/appframework/iappcontainer.php b/lib/public/appframework/iappcontainer.php index 7e6ec6016b7..e4f5f37cad2 100644 --- a/lib/public/appframework/iappcontainer.php +++ b/lib/public/appframework/iappcontainer.php @@ -66,8 +66,8 @@ interface IAppContainer extends IContainer{ function isAdminUser(); /** - * @param $message - * @param $level + * @param string $message + * @param string $level * @return mixed */ function log($message, $level); diff --git a/lib/public/backgroundjob.php b/lib/public/backgroundjob.php index a7f54491dfa..dcf67da9570 100644 --- a/lib/public/backgroundjob.php +++ b/lib/public/backgroundjob.php @@ -59,7 +59,7 @@ class BackgroundJob { * sets the background jobs execution type * * @param string $type execution type - * @return boolean + * @return boolean|null * * This method sets the execution type of the background jobs. Possible types * are "none", "ajax", "webcron", "cron" @@ -69,7 +69,7 @@ class BackgroundJob { } /** - * @param \OC\BackgroundJob\Job|string $job + * @param string $job * @param mixed $argument */ public static function registerJob($job, $argument = null) { @@ -82,7 +82,7 @@ class BackgroundJob { * creates a regular task * @param string $klass class name * @param string $method method name - * @return true + * @return boolean|null */ public static function addRegularTask($klass, $method) { if (!\OC::needUpgrade()) { @@ -115,7 +115,7 @@ class BackgroundJob { * @deprecated * Gets one queued task * @param int $id ID of the task - * @return associative array + * @return \OC\BackgroundJob\Job|null array */ public static function findQueuedTask($id) { $jobList = new JobList(); @@ -170,7 +170,7 @@ class BackgroundJob { * @param string $class class name * @param string $method method name * @param string $parameters all useful data as text - * @return int id of task + * @return boolean id of task */ public static function addQueuedTask($app, $class, $method, $parameters) { self::registerJob('OC\BackgroundJob\Legacy\QueuedJob', array('app' => $app, 'klass' => $class, 'method' => $method, 'parameters' => $parameters)); @@ -181,7 +181,7 @@ class BackgroundJob { * @deprecated * deletes a queued task * @param int $id id of task - * @return bool + * @return boolean|null * * Deletes a report */ diff --git a/lib/public/config.php b/lib/public/config.php index d9355a0605f..2d450e0d0d2 100644 --- a/lib/public/config.php +++ b/lib/public/config.php @@ -89,7 +89,7 @@ class Config { * @param string $app app * @param string $key key * @param string $value value - * @return string true/false + * @return boolean true/false * * Sets a value. If the key did not exist before it will be created. */ diff --git a/lib/public/contacts/imanager.php b/lib/public/contacts/imanager.php index 973d48be5ec..da9bca75525 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 $address_book_key * @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 $address_book_key string to identify 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); @@ -122,6 +122,7 @@ namespace OCP\Contacts { * Registers an address book * * @param \OCP\IAddressBook $address_book + * @return void */ function registerAddressBook(\OCP\IAddressBook $address_book); @@ -129,6 +130,7 @@ namespace OCP\Contacts { * Unregisters an address book * * @param \OCP\IAddressBook $address_book + * @return void */ function unregisterAddressBook(\OCP\IAddressBook $address_book); @@ -138,6 +140,7 @@ namespace OCP\Contacts { * * @param string $key * @param \Closure $callable + * @return void */ function register($key, \Closure $callable); @@ -148,6 +151,7 @@ namespace OCP\Contacts { /** * removes all registered address book instances + * @return void */ function clear(); } diff --git a/lib/public/db.php b/lib/public/db.php index 4a19d78d444..adb1f14cc4d 100644 --- a/lib/public/db.php +++ b/lib/public/db.php @@ -39,7 +39,7 @@ class DB { * @param string $query Query string * @param int $limit Limit of the SQL statement * @param int $offset Offset of the SQL statement - * @return \Doctrine\DBAL\Statement prepared SQL query + * @return \OC_DB_StatementWrapper prepared SQL query * * SQL query via Doctrine prepare(), needs to be execute()'d! */ @@ -49,7 +49,7 @@ class DB { /** * Insert a row if a matching row doesn't exists. - * @param $table string The table name (will replace *PREFIX*) to perform the replace on. + * @param string $table string The table name (will replace *PREFIX*) to perform the replace on. * @param $input array * * The input array if in the form: @@ -70,8 +70,8 @@ class DB { /** * Gets last value of autoincrement - * @param $table string The optional table name (will replace *PREFIX*) and add sequence suffix - * @return int + * @param string $table string The optional table name (will replace *PREFIX*) and add sequence suffix + * @return string * * \Doctrine\DBAL\Connection lastInsertID() * diff --git a/lib/public/files.php b/lib/public/files.php index d36d74fdf77..bc8fe2b7997 100644 --- a/lib/public/files.php +++ b/lib/public/files.php @@ -109,6 +109,7 @@ class Files { * Gets the Storage for an app - creates the needed folder if they are not * existant * @param string appid + * @param string $app * @return \OC\Files\View */ public static function getStorage( $app ) { diff --git a/lib/public/files/file.php b/lib/public/files/file.php index c6cda59f9b0..6208aeff426 100644 --- a/lib/public/files/file.php +++ b/lib/public/files/file.php @@ -43,6 +43,7 @@ interface File extends Node { * * @param string $data * @throws \OCP\Files\NotPermittedException + * @return void */ public function putContent($data); diff --git a/lib/public/files/node.php b/lib/public/files/node.php index 972b1cfa492..a380394095b 100644 --- a/lib/public/files/node.php +++ b/lib/public/files/node.php @@ -41,6 +41,7 @@ interface Node { /** * Delete the file or folder + * @return void */ public function delete(); @@ -58,6 +59,7 @@ interface Node { * * @param int $mtime (optional) modified date as unix timestamp * @throws \OCP\Files\NotPermittedException + * @return void */ public function touch($mtime = null); diff --git a/lib/public/files/storage.php b/lib/public/files/storage.php index 194b42a6481..01a15851d46 100644 --- a/lib/public/files/storage.php +++ b/lib/public/files/storage.php @@ -39,6 +39,7 @@ interface Storage { * $parameters is a free form array with the configuration options needed to construct the storage * * @param array $parameters + * @return void */ public function __construct($parameters); diff --git a/lib/public/iavatar.php b/lib/public/iavatar.php index 2cbec0d45c3..43fa32556de 100644 --- a/lib/public/iavatar.php +++ b/lib/public/iavatar.php @@ -22,7 +22,7 @@ interface IAvatar { /** * @brief sets the users avatar - * @param $data mixed imagedata or path to set a new avatar + * @param Image $data mixed imagedata or path to set a new avatar * @throws Exception if the provided file is not a jpg or png image * @throws Exception if the provided image is not valid * @throws \OCP\NotSquareException if the image is not square diff --git a/lib/public/iconfig.php b/lib/public/iconfig.php index 1d0f8e0015c..f1124a2dd0b 100644 --- a/lib/public/iconfig.php +++ b/lib/public/iconfig.php @@ -59,6 +59,7 @@ interface IConfig { * @param string $appName the appName that we want to store the value under * @param string $key the key of the value, under which will be saved * @param string $value the value that should be stored + * @return void */ public function setAppValue($appName, $key, $value); @@ -80,6 +81,7 @@ interface IConfig { * @param string $appName the appName that we want to store the value under * @param string $key the key under which the value is being stored * @param string $value the value that you want to store + * @return void */ public function setUserValue($userId, $appName, $key, $value); @@ -90,6 +92,7 @@ interface IConfig { * @param string $appName the appName that we stored the value under * @param string $key the key under which the value is being stored * @param string $default the default value to be returned if the value isn't set + * @return string */ public function getUserValue($userId, $appName, $key, $default = ''); } diff --git a/lib/public/il10n.php b/lib/public/il10n.php index 817b299b0b7..1c025e7824f 100644 --- a/lib/public/il10n.php +++ b/lib/public/il10n.php @@ -25,7 +25,7 @@ interface IL10N { * Translating * @param $text String The text we need a translation for * @param array $parameters default:array() Parameters for sprintf - * @return \OC_L10N_String|string Translation or the same text + * @return \OC_L10N_String Translation or the same text * * Returns the translation. If no translation is found, $text will be * returned. @@ -38,7 +38,7 @@ interface IL10N { * @param $text_plural String the string to translate for n objects * @param $count Integer Number of objects * @param array $parameters default:array() Parameters for sprintf - * @return \OC_L10N_String|string Translation or the same text + * @return \OC_L10N_String Translation or the same text * * Returns the translation. If no translation is found, $text will be * returned. %n will be replaced with the number of objects. diff --git a/lib/public/inavigationmanager.php b/lib/public/inavigationmanager.php index 73e85d03761..9497d3fd08e 100644 --- a/lib/public/inavigationmanager.php +++ b/lib/public/inavigationmanager.php @@ -37,12 +37,14 @@ interface INavigationManager { /** * Creates a new navigation entry * @param array $entry containing: id, name, order, icon and href key + * @return void */ public function add(array $entry); /** * Sets the current navigation entry of the currently running app * @param string $appId id of the app entry to activate (from added $entry) + * @return void */ public function setActiveEntry($appId); } diff --git a/lib/public/irequest.php b/lib/public/irequest.php index ca23e12b7f5..d77a9bc887a 100644 --- a/lib/public/irequest.php +++ b/lib/public/irequest.php @@ -55,6 +55,11 @@ namespace OCP; interface IRequest { + /** + * @param string $name + * + * @return string + */ function getHeader($name); /** diff --git a/lib/public/itags.php b/lib/public/itags.php index ea62fb38ecb..7965d4152f9 100644 --- a/lib/public/itags.php +++ b/lib/public/itags.php @@ -49,7 +49,7 @@ interface ITags { /** * Check if any tags are saved for this type and user. * - * @return boolean. + * @return boolean */ public function isEmpty(); diff --git a/lib/public/iusersession.php b/lib/public/iusersession.php index 131b326ab90..adc706cc7c3 100644 --- a/lib/public/iusersession.php +++ b/lib/public/iusersession.php @@ -45,6 +45,7 @@ interface IUserSession { /** * Logs the user out including all the session data * Logout, destroys session + * @return void */ public function logout(); diff --git a/lib/public/json.php b/lib/public/json.php index cd5d233ef90..e7371ad63f3 100644 --- a/lib/public/json.php +++ b/lib/public/json.php @@ -81,7 +81,7 @@ class JSON { * parameter to the ajax call, then assign it to the template and finally * add a hidden input field also named 'requesttoken' containing the value. * - * @return string json formatted error string if not valid. + * @return \json|null json formatted error string if not valid. */ public static function callCheck() { return(\OC_JSON::callCheck()); diff --git a/lib/public/share.php b/lib/public/share.php index f832d04a70f..bc8a54bc350 100644 --- a/lib/public/share.php +++ b/lib/public/share.php @@ -78,7 +78,7 @@ class Share { * @param string Backend class * @param string (optional) Depends on item type * @param array (optional) List of supported file extensions if this item type depends on files - * @return Returns true if backend is registered or false if error + * @return boolean true if backend is registered or false if error */ public static function registerBackend($itemType, $class, $collectionOf = null, $supportedFileExtensions = null) { if (self::isEnabled()) { @@ -104,7 +104,7 @@ class Share { /** * Check if the Share API is enabled - * @return Returns true if enabled or false + * @return boolean true if enabled or false * * The Share API is enabled by default if not configured */ @@ -135,7 +135,7 @@ class Share { /** * Find which users can access a shared item - * @param $path to the file + * @param string $path to the file * @param $user owner of the file * @param include owner to the list of users with access to the file * @return array @@ -247,6 +247,7 @@ class Share { * @param mixed Parameters (optional) * @param int Number of items to return (optional) Returns all by default * @param bool include collections (optional) + * @param string $itemType * @return Return depends on format */ public static function getItemsSharedWith($itemType, $format = self::FORMAT_NONE, @@ -262,7 +263,7 @@ class Share { * @param int $format (optional) Format type must be defined by the backend * @param mixed Parameters (optional) * @param bool include collections (optional) - * @return Return depends on format + * @return string depends on format */ public static function getItemSharedWith($itemType, $itemTarget, $format = self::FORMAT_NONE, $parameters = null, $includeCollections = false) { @@ -646,7 +647,7 @@ class Share { * @param string Item source * @param int SHARE_TYPE_USER, SHARE_TYPE_GROUP, or SHARE_TYPE_LINK * @param string User or group the item is being shared with - * @return Returns true on success or false on failure + * @return boolean true on success or false on failure */ public static function unshare($itemType, $itemSource, $shareType, $shareWith) { if ($item = self::getItems($itemType, $itemSource, $shareType, $shareWith, \OC_User::getUser(), @@ -661,7 +662,7 @@ class Share { * Unshare an item from all users, groups, and remove all links * @param string Item type * @param string Item source - * @return Returns true on success or false on failure + * @return boolean true on success or false on failure */ public static function unshareAll($itemType, $itemSource) { // Get all of the owners of shares of this item. @@ -693,7 +694,7 @@ class Share { * Unshare an item shared with the current user * @param string Item type * @param string Item target - * @return Returns true on success or false on failure + * @return boolean true on success or false on failure * * Unsharing from self is not allowed for items inside collections */ @@ -754,7 +755,8 @@ class Share { * @param int SHARE_TYPE_USER, SHARE_TYPE_GROUP, or SHARE_TYPE_LINK * @param string User or group the item is being shared with * @param int CRUDS permissions - * @return Returns true on success or false on failure + * @param integer|null $permissions + * @return boolean true on success or false on failure */ public static function setPermissions($itemType, $itemSource, $shareType, $shareWith, $permissions) { if ($item = self::getItems($itemType, $itemSource, $shareType, $shareWith, @@ -836,7 +838,7 @@ class Share { * @param string $itemType * @param string $itemSource * @param string $date expiration date - * @return Share_Backend + * @return boolean */ public static function setExpirationDate($itemType, $itemSource, $date) { if ($items = self::getItems($itemType, $itemSource, null, null, \OC_User::getUser(), @@ -930,7 +932,7 @@ class Share { /** * Check if resharing is allowed - * @return Returns true if allowed or false + * @return boolean true if allowed or false * * Resharing is allowed by default if not configured */ @@ -1389,6 +1391,11 @@ class Share { * @param bool|array Parent folder target (optional) * @param string token (optional) * @param string name of the source item (optional) + * @param string $itemType + * @param string $itemSource + * @param integer $shareType + * @param integer $permissions + * @param string $itemSourceName * @return bool Returns true on success or false on failure */ private static function put($itemType, $itemSource, $shareType, $shareWith, $uidOwner, @@ -1936,7 +1943,7 @@ interface Share_Backend { * Get the source of the item to be stored in the database * @param string Item source * @param string Owner of the item - * @return mixed|array|false Source + * @return boolean Source * * Return an array if the item is file dependent, the array needs two keys: 'item' and 'file' * Return false if the item does not exist for the user @@ -1961,6 +1968,7 @@ interface Share_Backend { * Converts the shared item sources back into the item in the specified format * @param array Shared items * @param int Format + * @param integer $format * @return TODO * * The items array is a 3-dimensional array with the item_source as the @@ -1992,6 +2000,7 @@ interface Share_Backend_File_Dependent extends Share_Backend { * Get the file path of the item * @param string Item source * @param string User that is the owner of shared item + * @return boolean */ public function getFilePath($itemSource, $uidOwner); diff --git a/lib/public/template.php b/lib/public/template.php index 320b7c6393f..0d86acbd060 100644 --- a/lib/public/template.php +++ b/lib/public/template.php @@ -35,7 +35,7 @@ namespace OCP; * Make OC_Helper::imagePath available as a simple function * @param string app * @param string image - * @return link to the image + * @return string to the image * * @see OC_Helper::imagePath */ @@ -47,7 +47,7 @@ function image_path( $app, $image ) { /** * Make OC_Helper::mimetypeIcon available as a simple function * @param string mimetype - * @return path to the image of this file type. + * @return string to the image of this file type. */ function mimetype_icon( $mimetype ) { return(\mimetype_icon( $mimetype )); @@ -56,7 +56,7 @@ function mimetype_icon( $mimetype ) { /** * Make preview_icon available as a simple function * @param string path of file - * @return path to the preview of the image + * @return string to the preview of the image */ function preview_icon( $path ) { return(\preview_icon( $path )); @@ -67,6 +67,7 @@ function preview_icon( $path ) { * Returns the path to the preview of the image. * @param string path of file * @param string token + * @param string $path * @return link to the preview */ function publicPreview_icon ( $path, $token ) { @@ -77,7 +78,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 - * @return size as string + * @return string as string */ function human_file_size( $bytes ) { return(\human_file_size( $bytes )); @@ -88,7 +89,7 @@ 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 - * @return human readable interpretation of the timestamp + * @return OC_L10N_String readable interpretation of the timestamp */ function relative_modified_date( $timestamp, $dateOnly = false ) { return(\relative_modified_date($timestamp, null, $dateOnly)); @@ -99,7 +100,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 - * @return human readable interpretation of a file size + * @return string readable interpretation of a file size */ function simple_file_size($bytes) { return(\human_file_size($bytes)); @@ -111,7 +112,7 @@ function simple_file_size($bytes) { * @param $options the options * @param $selected which one is selected? * @param array the parameters - * @return html options + * @return string options */ function html_select_options($options, $selected, $params=array()) { return(\html_select_options($options, $selected, $params)); diff --git a/lib/public/user.php b/lib/public/user.php index acc0e3b737b..3f98a636a01 100644 --- a/lib/public/user.php +++ b/lib/public/user.php @@ -48,6 +48,8 @@ class User { * @param string search pattern * @param int limit * @param int offset + * @param integer $limit + * @param integer $offset * @return array with all uids */ public static function getUsers( $search = '', $limit = null, $offset = null ) { @@ -103,7 +105,9 @@ class User { * Check if the password is correct * @param string The username * @param string The password - * @return mixed username on success, false otherwise + * @param string $uid + * @param string $password + * @return string|false username on success, false otherwise * * Check if the password is correct without logging in the user */ |