Browse Source

Fix @return array PHPDocs, in /lib

tags/v7.0.0alpha2
Robin McCorkell 10 years ago
parent
commit
b5bc37d2e4

+ 2
- 2
lib/private/app.php View File

@@ -307,7 +307,7 @@ class OC_App{
/**
* @brief Get the navigation entries for the $app
* @param string $app app
* @return array of the $data added with addNavigationEntry
* @return array an array of the $data added with addNavigationEntry
*
* Warning: destroys the existing entries
*/
@@ -660,7 +660,7 @@ class OC_App{

/**
* @brief: get a list of all apps in the apps folder
* @return array or app names (string IDs)
* @return array an array of app names (string IDs)
* @todo: change the name of this method to getInstalledApps, which is more accurate
*/
public static function getAllApps() {

+ 2
- 2
lib/private/appconfig.php View File

@@ -90,7 +90,7 @@ class AppConfig implements \OCP\IAppConfig {

/**
* @brief Get all apps using the config
* @return array with app ids
* @return array an array of app ids
*
* This function returns a list of all apps that have at least one
* entry in the appconfig table.
@@ -109,7 +109,7 @@ class AppConfig implements \OCP\IAppConfig {
/**
* @brief Get the available keys for an app
* @param string $app the app we are looking for
* @return array with key names
* @return array an array of key names
*
* This function gets all keys of an app. Please note that the values are
* not returned.

+ 1
- 1
lib/private/config.php View File

@@ -65,7 +65,7 @@ class Config {

/**
* @brief Lists all available config keys
* @return array with key names
* @return array an array of key names
*
* This function returns all keys saved in config.php. Please note that it
* does not return the values.

+ 2
- 2
lib/private/contactsmanager.php View File

@@ -31,7 +31,7 @@ namespace OC {
* @param string $pattern which should match within the $searchProperties
* @param array $searchProperties defines the properties within the query pattern should match
* @param array $options - for future use. One should always have options!
* @return array of contacts which are arrays of key-value-pairs
* @return array an array of contacts which are arrays of key-value-pairs
*/
public function search($pattern, $searchProperties = array(), $options = array()) {
$result = array();
@@ -72,7 +72,7 @@ namespace OC {
*
* @param array $properties this array if key-value-pairs defines a contact
* @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
* @return array an array representing the contact just created or updated
*/
public function createOrUpdate($properties, $address_book_key) {


+ 1
- 1
lib/private/files/cache/cache.php View File

@@ -450,7 +450,7 @@ class Cache {
* search for files matching $pattern
*
* @param string $pattern
* @return array of file data
* @return array an array of file data
*/
public function search($pattern) {


+ 3
- 3
lib/private/files/cache/scanner.php View File

@@ -61,7 +61,7 @@ class Scanner extends BasicEmitter {
* *
*
* @param string $path
* @return array with metadata of the file
* @return array an array of metadata of the file
*/
public function getData($path) {
if (!$this->storage->isReadable($path)) {
@@ -88,7 +88,7 @@ class Scanner extends BasicEmitter {
* @param string $file
* @param int $reuseExisting
* @param bool $parentExistsInCache
* @return array with metadata of the scanned file
* @return array an array of metadata of the scanned file
*/
public function scanFile($file, $reuseExisting = 0, $parentExistsInCache = false) {
if (!self::isPartialFile($file)
@@ -174,7 +174,7 @@ class Scanner extends BasicEmitter {
* @param string $path
* @param bool $recursive
* @param int $reuse
* @return array with the meta data of the scanned file or folder
* @return array an array of the meta data of the scanned file or folder
*/
public function scan($path, $recursive = self::SCAN_RECURSIVE, $reuse = -1) {
if ($reuse === -1) {

+ 1
- 1
lib/private/files/cache/updater.php View File

@@ -17,7 +17,7 @@ class Updater {
* resolve a path to a storage and internal path
*
* @param string $path the relative path
* @return array consisting of the storage and the internal path
* @return array an array consisting of the storage and the internal path
*/
static public function resolvePath($path) {
$view = \OC\Files\Filesystem::getView();

+ 1
- 1
lib/private/files/filesystem.php View File

@@ -270,7 +270,7 @@ class Filesystem {
* resolve a path to a storage and internal path
*
* @param string $path
* @return array consisting of the storage and the internal path
* @return array an array consisting of the storage and the internal path
*/
static public function resolvePath($path) {
if (!self::$mounts) {

+ 1
- 1
lib/private/files/view.php View File

@@ -109,7 +109,7 @@ class View {
* resolve a path to a storage and internal path
*
* @param string $path
* @return array consisting of the storage and the internal path
* @return array an array consisting of the storage and the internal path
*/
public function resolvePath($path) {
$a = $this->getAbsolutePath($path);

+ 6
- 6
lib/private/group.php View File

@@ -179,7 +179,7 @@ class OC_Group {
/**
* @brief Get all groups a user belongs to
* @param string $uid Name of the user
* @return array with group names
* @return array an array of group names
*
* This function fetches all groups a user belongs to. It does not check
* if the user exists at all.
@@ -203,7 +203,7 @@ class OC_Group {
* @param string $search
* @param int|null $limit
* @param int|null $offset
* @return array with group names
* @return array an array of group names
*
* Returns a list with all groups
*/
@@ -232,7 +232,7 @@ class OC_Group {
* @param string $search
* @param int $limit
* @param int $offset
* @return array with user ids
* @return array an array of user ids
*/
public static function usersInGroup($gid, $search = '', $limit = -1, $offset = 0) {
$group = self::getManager()->get($gid);
@@ -254,7 +254,7 @@ class OC_Group {
* @param string $search
* @param int $limit
* @param int $offset
* @return array with user ids
* @return array an array of user ids
*/
public static function usersInGroups($gids, $search = '', $limit = -1, $offset = 0) {
$users = array();
@@ -271,7 +271,7 @@ class OC_Group {
* @param string $search
* @param int $limit
* @param int $offset
* @return array with display names (value) and user ids(key)
* @return array an array of display names (value) and user ids(key)
*/
public static function displayNamesInGroup($gid, $search = '', $limit = -1, $offset = 0) {
return self::getManager()->displayNamesInGroup($gid, $search, $limit, $offset);
@@ -283,7 +283,7 @@ class OC_Group {
* @param string $search
* @param int $limit
* @param int $offset
* @return array with display names (Key) user ids (value)
* @return array an array of display names (Key) user ids (value)
*/
public static function displayNamesInGroups($gids, $search = '', $limit = -1, $offset = 0) {
$displayNames = array();

+ 3
- 3
lib/private/group/backend.php View File

@@ -93,7 +93,7 @@ abstract class OC_Group_Backend implements OC_Group_Interface {
/**
* @brief Get all groups a user belongs to
* @param string $uid Name of the user
* @return array with group names
* @return array an array of group names
*
* This function fetches all groups a user belongs to. It does not check
* if the user exists at all.
@@ -107,7 +107,7 @@ abstract class OC_Group_Backend implements OC_Group_Interface {
* @param string $search
* @param int $limit
* @param int $offset
* @return array with group names
* @return array an array of group names
*
* Returns a list with all groups
*/
@@ -131,7 +131,7 @@ abstract class OC_Group_Backend implements OC_Group_Interface {
* @param string $search
* @param int $limit
* @param int $offset
* @return array with user ids
* @return array an array of user ids
*/
public function usersInGroup($gid, $search = '', $limit = -1, $offset = 0) {
return array();

+ 3
- 3
lib/private/group/database.php View File

@@ -140,7 +140,7 @@ class OC_Group_Database extends OC_Group_Backend {
/**
* @brief Get all groups a user belongs to
* @param string $uid Name of the user
* @return array with group names
* @return array an array of group names
*
* This function fetches all groups a user belongs to. It does not check
* if the user exists at all.
@@ -163,7 +163,7 @@ class OC_Group_Database extends OC_Group_Backend {
* @param string $search
* @param int $limit
* @param int $offset
* @return array with group names
* @return array an array of group names
*
* Returns a list with all groups
*/
@@ -197,7 +197,7 @@ class OC_Group_Database extends OC_Group_Backend {
* @param string $search
* @param int $limit
* @param int $offset
* @return array with user ids
* @return array an array of user ids
*/
public function usersInGroup($gid, $search = '', $limit = null, $offset = null) {
$stmt = OC_DB::prepare('SELECT `uid` FROM `*PREFIX*group_user` WHERE `gid` = ? AND `uid` LIKE ?',

+ 3
- 3
lib/private/group/dummy.php View File

@@ -119,7 +119,7 @@ class OC_Group_Dummy extends OC_Group_Backend {
/**
* @brief Get all groups a user belongs to
* @param $uid Name of the user
* @return array with group names
* @return array an array of group names
*
* This function fetches all groups a user belongs to. It does not check
* if the user exists at all.
@@ -137,7 +137,7 @@ class OC_Group_Dummy extends OC_Group_Backend {

/**
* @brief get a list of all groups
* @return array with group names
* @return array an array of group names
*
* Returns a list with all groups
*/
@@ -147,7 +147,7 @@ class OC_Group_Dummy extends OC_Group_Backend {

/**
* @brief get a list of all users in a group
* @return array with user ids
* @return array an array of user ids
*/
public function usersInGroup($gid, $search = '', $limit = -1, $offset = 0) {
if(isset($this->groups[$gid])) {

+ 3
- 3
lib/private/group/example.php View File

@@ -78,7 +78,7 @@ abstract class OC_Group_Example {
/**
* @brief Get all groups a user belongs to
* @param $uid Name of the user
* @return array with group names
* @return array an array of group names
*
* This function fetches all groups a user belongs to. It does not check
* if the user exists at all.
@@ -87,7 +87,7 @@ abstract class OC_Group_Example {

/**
* @brief get a list of all groups
* @return array with group names
* @return array an array of group names
*
* Returns a list with all groups
*/
@@ -102,7 +102,7 @@ abstract class OC_Group_Example {

/**
* @brief get a list of all users in a group
* @return array with user ids
* @return array an array of user ids
*/
abstract public static function usersInGroup($gid, $search = '', $limit = -1, $offset = 0);


+ 3
- 3
lib/private/group/interface.php View File

@@ -45,7 +45,7 @@ interface OC_Group_Interface {
/**
* @brief Get all groups a user belongs to
* @param string $uid Name of the user
* @return array with group names
* @return array an array of group names
*
* This function fetches all groups a user belongs to. It does not check
* if the user exists at all.
@@ -57,7 +57,7 @@ interface OC_Group_Interface {
* @param string $search
* @param int $limit
* @param int $offset
* @return array with group names
* @return array an array of group names
*
* Returns a list with all groups
*/
@@ -76,7 +76,7 @@ interface OC_Group_Interface {
* @param string $search
* @param int $limit
* @param int $offset
* @return array with user ids
* @return array an array of user ids
*/
public function usersInGroup($gid, $search = '', $limit = -1, $offset = 0);


+ 1
- 1
lib/private/group/manager.php View File

@@ -165,7 +165,7 @@ class Manager extends PublicEmitter {
* @param string $search
* @param int $limit
* @param int $offset
* @return array with display names (value) and user ids (key)
* @return array an array of display names (value) and user ids (key)
*/
public function displayNamesInGroup($gid, $search = '', $limit = -1, $offset = 0) {
$group = $this->get($gid);

+ 2
- 2
lib/private/legacy/appconfig.php View File

@@ -35,7 +35,7 @@ class OC_Appconfig {

/**
* @brief Get all apps using the config
* @return array with app ids
* @return array an array of app ids
*
* This function returns a list of all apps that have at least one
* entry in the appconfig table.
@@ -47,7 +47,7 @@ class OC_Appconfig {
/**
* @brief Get the available keys for an app
* @param string $app the app we are looking for
* @return array with key names
* @return array an array of key names
*
* This function gets all keys of an app. Please note that the values are
* not returned.

+ 1
- 1
lib/private/legacy/config.php View File

@@ -51,7 +51,7 @@ class OC_Config {

/**
* @brief Lists all available config keys
* @return array with key names
* @return array an array of key names
*
* This function returns all keys saved in config.php. Please note that it
* does not return the values.

+ 2
- 2
lib/private/legacy/preferences.php View File

@@ -29,7 +29,7 @@ class OC_Preferences{
public static $object;
/**
* @brief Get all users using the preferences
* @return array with user ids
* @return array an array of user ids
*
* This function returns a list of all users that have at least one entry
* in the preferences table.
@@ -54,7 +54,7 @@ class OC_Preferences{
* @brief Get the available keys for an app
* @param string $user user
* @param string $app the app we are looking for
* @return array with key names
* @return array an array of key names
*
* This function gets all keys of an app of an user. Please note that the
* values are not returned.

+ 1
- 1
lib/private/migrate.php View File

@@ -538,7 +538,7 @@ class OC_Migrate{
* @param string $db string path to migration.db
* @param $info object of migration info
* @param string|null|int $uid uid to use
* @return array of apps with import statuses, or false on failure.
* @return array an array of apps with import statuses, or false on failure.
*/
public static function importAppData( $db, $info, $uid=null ) {
// Check if the db exists

+ 1
- 1
lib/private/navigationmanager.php View File

@@ -30,7 +30,7 @@ class NavigationManager implements \OCP\INavigationManager {

/**
* @brief returns all the added Menu entries
* @return array of the added entries
* @return array an array of the added entries
*/
public function getAll() {
return $this->entries;

+ 4
- 4
lib/private/ocsclient.php View File

@@ -59,7 +59,7 @@ class OC_OCSClient{

/**
* @brief Get all the categories from the OCS server
* @return array with category ids
* @return array an array of category ids
* @note returns NULL if config value appstoreenabled is set to false
* This function returns a list of all the application categories on the OCS server
*/
@@ -92,7 +92,7 @@ class OC_OCSClient{

/**
* @brief Get all the applications from the OCS server
* @return array with application data
* @return array an array of application data
*
* This function returns a list of all the applications on the OCS server
* @param $categories
@@ -150,7 +150,7 @@ class OC_OCSClient{
/**
* @brief Get an the applications from the OCS server
* @param string $id
* @return array with application data
* @return array an array of application data
*
* This function returns an applications from the OCS server
*/
@@ -192,7 +192,7 @@ class OC_OCSClient{

/**
* @brief Get the download url for an application from the OCS server
* @return array with application data
* @return array an array of application data
*
* This function returns an download url for an applications from the OCS server
* @param string $id

+ 2
- 2
lib/private/preferences.php View File

@@ -69,7 +69,7 @@ class Preferences {

/**
* @brief Get all users using the preferences
* @return array with user ids
* @return array an array of user ids
*
* This function returns a list of all users that have at least one entry
* in the preferences table.
@@ -125,7 +125,7 @@ class Preferences {
* @brief Get the available keys for an app
* @param string $user user
* @param string $app the app we are looking for
* @return array with key names
* @return array an array of key names
*
* This function gets all keys of an app of an user. Please note that the
* values are not returned.

+ 1
- 1
lib/private/preview.php View File

@@ -382,7 +382,7 @@ class Preview {
/**
* @brief get possible bigger thumbnails of the given image
* @param int $fileId fileId of the original image
* @return array of paths to bigger thumbnails
* @return array an array of paths to bigger thumbnails
*/
private function getPossibleThumbnails($fileId) {


+ 1
- 1
lib/private/share/mailnotifications.php View File

@@ -136,7 +136,7 @@ class MailNotifications {
* @param string $filename the shared file
* @param string $link link to the shared file
* @param int $expiration expiration date (timestamp)
* @return array with the html mail body and the plain text mail body
* @return array an array of the html mail body and the plain text mail body
*/
private function createMailBody($filename, $link, $expiration) {


+ 3
- 3
lib/private/user.php View File

@@ -77,7 +77,7 @@ class OC_User {
/**
* @brief gets available backends
* @deprecated
* @return array of backends
* @return array an array of backends
*
* Returns the names of all backends.
*/
@@ -88,7 +88,7 @@ class OC_User {
/**
* @brief gets used backends
* @deprecated
* @return array of backends
* @return array an array of backends
*
* Returns the names of all used backends.
*/
@@ -517,7 +517,7 @@ class OC_User {

/**
* @brief Get a list of all users
* @return array with all uids
* @return array an array of all uids
*
* Get a list of all users.
* @param string $search

+ 2
- 2
lib/private/user/backend.php View File

@@ -103,7 +103,7 @@ abstract class OC_User_Backend implements OC_User_Interface {

/**
* @brief Get a list of all users
* @return array with all uids
* @return array an array of all uids
*
* Get a list of all users.
*/
@@ -140,7 +140,7 @@ abstract class OC_User_Backend implements OC_User_Interface {

/**
* @brief Get a list of all display names
* @return array with all displayNames (value) and the corresponding uids (key)
* @return array an array of all displayNames (value) and the corresponding uids (key)
*
* Get a list of all display names and user ids.
*/

+ 2
- 2
lib/private/user/database.php View File

@@ -149,7 +149,7 @@ class OC_User_Database extends OC_User_Backend {

/**
* @brief Get a list of all display names
* @return array with all displayNames (value) and the correspondig uids (key)
* @return array an array of all displayNames (value) and the correspondig uids (key)
*
* Get a list of all display names and user ids.
*/
@@ -226,7 +226,7 @@ class OC_User_Database extends OC_User_Backend {

/**
* @brief Get a list of all users
* @return array with all uids
* @return array an array of all uids
*
* Get a list of all users.
*/

+ 2
- 2
lib/private/user/interface.php View File

@@ -46,7 +46,7 @@ interface OC_User_Interface {

/**
* @brief Get a list of all users
* @return array with all uids
* @return array an array of all uids
*
* Get a list of all users.
*/
@@ -68,7 +68,7 @@ interface OC_User_Interface {

/**
* @brief Get a list of all display names
* @return array with all displayNames (value) and the corresponding uids (key)
* @return array an array of all displayNames (value) and the corresponding uids (key)
*
* Get a list of all display names and user ids.
*/

+ 1
- 1
lib/private/user/manager.php View File

@@ -261,7 +261,7 @@ class Manager extends PublicEmitter {
/**
* returns how many users per backend exist (if supported by backend)
*
* @return array with backend class as key and count number as value
* @return array an array of backend class as key and count number as value
*/
public function countUsers() {
$userCountStatistics = array();

+ 1
- 1
lib/private/util.php View File

@@ -819,7 +819,7 @@ class OC_Util {
* string or array of strings before displaying it on a web page.
*
* @param string|array of strings
* @return array with sanitized strings or a single sanitized string, depends on the input parameter.
* @return array an array of sanitized strings or a single sanitized string, depends on the input parameter.
*/
public static function sanitizeHTML( &$value ) {
if (is_array($value)) {

+ 2
- 2
lib/public/backgroundjob.php View File

@@ -125,7 +125,7 @@ class BackgroundJob {
/**
* @deprecated
* Gets all queued tasks
* @return array with associative arrays
* @return array an array of associative arrays
*/
public static function allQueuedTasks() {
$jobList = \OC::$server->getJobList();
@@ -145,7 +145,7 @@ class BackgroundJob {
* @deprecated
* Gets all queued tasks of a specific app
* @param string $app app name
* @return array with associative arrays
* @return array an array of associative arrays
*/
public static function queuedTaskWhereAppIs($app) {
$jobList = \OC::$server->getJobList();

+ 2
- 2
lib/public/contacts.php View File

@@ -87,7 +87,7 @@ namespace OCP {
* @param string $pattern which should match within the $searchProperties
* @param array $searchProperties defines the properties within the query pattern should match
* @param array $options - for future use. One should always have options!
* @return array of contacts which are arrays of key-value-pairs
* @return array an array of contacts which are arrays of key-value-pairs
*/
public static function search($pattern, $searchProperties = array(), $options = array()) {
$cm = \OC::$server->getContactsManager();
@@ -112,7 +112,7 @@ namespace OCP {
*
* @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
* @return array representing the contact just created or updated
* @return array an array representing the contact just created or updated
*/
public static function createOrUpdate($properties, $address_book_key) {
$cm = \OC::$server->getContactsManager();

+ 2
- 2
lib/public/contacts/imanager.php View File

@@ -88,7 +88,7 @@ namespace OCP\Contacts {
* @param string $pattern which should match within the $searchProperties
* @param array $searchProperties defines the properties within the query pattern should match
* @param array $options - for future use. One should always have options!
* @return array of contacts which are arrays of key-value-pairs
* @return array an array of contacts which are arrays of key-value-pairs
*/
function search($pattern, $searchProperties = array(), $options = array());

@@ -107,7 +107,7 @@ namespace OCP\Contacts {
*
* @param array $properties this array if key-value-pairs defines a contact
* @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
* @return array an array representing the contact just created or updated
*/
function createOrUpdate($properties, $address_book_key);


+ 2
- 2
lib/public/iaddressbook.php View File

@@ -45,7 +45,7 @@ namespace OCP {
* @param string $pattern which should match within the $searchProperties
* @param array $searchProperties defines the properties within the query pattern should match
* @param array $options - for future use. One should always have options!
* @return array of contacts which are arrays of key-value-pairs
* @return array an array of contacts which are arrays of key-value-pairs
*/
public function search($pattern, $searchProperties, $options);
// // dummy results
@@ -56,7 +56,7 @@ namespace OCP {

/**
* @param array $properties this array if key-value-pairs defines a contact
* @return array representing the contact just created or updated
* @return array an array representing the contact just created or updated
*/
public function createOrUpdate($properties);
// // dummy

+ 2
- 2
lib/public/iappconfig.php View File

@@ -45,7 +45,7 @@ interface IAppConfig {
/**
* @brief Get the available keys for an app
* @param string $app the app we are looking for
* @return array with key names
* @return array an array of key names
*
* This function gets all keys of an app. Please note that the values are
* not returned.
@@ -74,7 +74,7 @@ interface IAppConfig {

/**
* @brief Get all apps using the config
* @return array with app ids
* @return array an array of app ids
*
* This function returns a list of all apps that have at least one
* entry in the appconfig table.

+ 2
- 2
lib/public/user.php View File

@@ -48,7 +48,7 @@ class User {
* @param string search pattern
* @param integer $limit
* @param integer $offset
* @return array with all uids
* @return array an array of all uids
*/
public static function getUsers( $search = '', $limit = null, $offset = null ) {
return \OC_User::getUsers( $search, $limit, $offset );
@@ -68,7 +68,7 @@ class User {
* @param string search pattern
* @param int limit
* @param int offset
* @return array with all display names (value) and the correspondig uids (key)
* @return array an array of all display names (value) and the correspondig uids (key)
*/
public static function getDisplayNames( $search = '', $limit = null, $offset = null ) {
return \OC_User::getDisplayNames( $search, $limit, $offset );

+ 1
- 1
lib/public/util.php View File

@@ -381,7 +381,7 @@ class Util {
* string or array of strings before displaying it on a web page.
*
* @param string|array of strings
* @return array with sanitized strings or a single sinitized string, depends on the input parameter.
* @return 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));

Loading…
Cancel
Save