diff --git a/apps/files_encryption/lib/crypt.php b/apps/files_encryption/lib/crypt.php index a4f7bd35497543c000c43358b0118a6c482ef6e6..7d86eb72ed1e11b335e9b81c9fbfe771b2778c39 100755 --- a/apps/files_encryption/lib/crypt.php +++ b/apps/files_encryption/lib/crypt.php @@ -254,7 +254,7 @@ class Crypt { * @brief Concatenate encrypted data with its IV and padding * @param string $content content to be concatenated * @param string $iv IV to be concatenated - * @returns string concatenated content + * @return string concatenated content */ private static function concatIv($content, $iv) { @@ -267,7 +267,7 @@ class Crypt { /** * @brief Split concatenated data and IV into respective parts * @param string $catFile concatenated data to be split - * @returns array keys: encrypted, iv + * @return array keys: encrypted, iv */ private static function splitIv($catFile) { @@ -330,7 +330,7 @@ class Crypt { * @internal param string $source * @internal param string $target * @internal param string $key the decryption key - * @returns string decrypted content + * @return string decrypted content * * This function decrypts a file */ @@ -362,7 +362,7 @@ class Crypt { * @brief Decrypt private key and check if the result is a valid keyfile * @param string $encryptedKey encrypted keyfile * @param string $passphrase to decrypt keyfile - * @returns encrypted private key or false + * @return encrypted private key or false * * This function decrypts a file */ @@ -389,7 +389,7 @@ class Crypt { * @brief Create asymmetrically encrypted keyfile content using a generated key * @param string $plainContent content to be encrypted * @param array $publicKeys array keys must be the userId of corresponding user - * @returns array keys: keys (array, key = userId), data + * @return array keys: keys (array, key = userId), data * @note symmetricDecryptFileContent() can decrypt files created using this method */ public static function multiKeyEncrypt($plainContent, array $publicKeys) { @@ -440,7 +440,7 @@ class Crypt { * @param $privateKey * @return false|string * @internal param string $plainContent content to be encrypted - * @returns string $plainContent decrypted string + * @return string $plainContent decrypted string * @note symmetricDecryptFileContent() can be used to decrypt files created using this method * * This function decrypts a file @@ -498,7 +498,7 @@ class Crypt { /** * @brief Generate a pseudo random 256-bit ASCII key, used as file key - * @returns $key Generated key + * @return $key Generated key */ public static function generateKey() { diff --git a/apps/files_encryption/lib/session.php b/apps/files_encryption/lib/session.php index 19b669a27ff99d81206a67b351f65c124be720e7..dea27d7a18645253c963b7712127803fdd3b2ad5 100644 --- a/apps/files_encryption/lib/session.php +++ b/apps/files_encryption/lib/session.php @@ -145,7 +145,7 @@ class Session { /** * @brief Gets status if we already tried to initialize the encryption app - * @returns init status INIT_SUCCESSFUL, INIT_EXECUTED, NOT_INOITIALIZED + * @return init status INIT_SUCCESSFUL, INIT_EXECUTED, NOT_INOITIALIZED * * @note this doesn not indicate of the init was successful, we just remeber the try! */ @@ -159,7 +159,7 @@ class Session { /** * @brief Gets user or public share private key from session - * @returns string $privateKey The user's plaintext private key + * @return string $privateKey The user's plaintext private key * */ public function getPrivateKey() { @@ -190,7 +190,7 @@ class Session { /** * @brief Gets public share private key from session - * @returns string $privateKey + * @return string $privateKey * */ public function getPublicSharePrivateKey() { @@ -217,7 +217,7 @@ class Session { /** * @brief Gets user legacy key from session - * @returns string $legacyKey The user's plaintext legacy key + * @return string $legacyKey The user's plaintext legacy key * */ public function getLegacyKey() { diff --git a/apps/files_sharing/lib/api.php b/apps/files_sharing/lib/api.php index 438d3cc4ba3702e23cc698b201b2a64275ff2866..d554d68c6bdcd16a9dd5781a3287dfc7e6912479 100644 --- a/apps/files_sharing/lib/api.php +++ b/apps/files_sharing/lib/api.php @@ -196,7 +196,7 @@ class Api { } /** - * @breif create a new share + * @brief create a new share * @param array $params * @return \OC_OCS_Result */ diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php index d4a817fca3461c462fffe005593c5226b918a149..d1ca60ff6ac8035e73b7c48638dca38a641d455e 100644 --- a/apps/files_sharing/lib/sharedstorage.php +++ b/apps/files_sharing/lib/sharedstorage.php @@ -36,7 +36,7 @@ class Shared extends \OC\Files\Storage\Common { } /** - * @breif get id of the mount point + * @brief get id of the mount point * @return string */ public function getId() { @@ -44,7 +44,7 @@ class Shared extends \OC\Files\Storage\Common { } /** - * @breif get file cache of the shared item source + * @brief get file cache of the shared item source * @return string */ public function getSourceId() { diff --git a/apps/files_versions/lib/versions.php b/apps/files_versions/lib/versions.php index 67acd5369a4a2ddcf3c60e4f39e23e49fdb44ce4..e97510dead80b2c596d008db29d1bcae9af12b70 100644 --- a/apps/files_versions/lib/versions.php +++ b/apps/files_versions/lib/versions.php @@ -265,7 +265,7 @@ class Storage { * @param string $uid user id from the owner of the file * @param string $filename file to find versions of, relative to the user files dir * @param string $userFullPath - * @returns array versions newest version first + * @return array versions newest version first */ public static function getVersions($uid, $filename, $userFullPath = '') { $versions = array(); diff --git a/lib/base.php b/lib/base.php index be613706e6404cc9e8cfc7ff61fd5b99742ec58e..f3a15e0355f89385aea7ccda602978a4539ca4e0 100644 --- a/lib/base.php +++ b/lib/base.php @@ -175,7 +175,7 @@ class OC { OC::$SERVERROOT . '/lib/private' . PATH_SEPARATOR . OC::$SERVERROOT . '/config' . PATH_SEPARATOR . OC::$THIRDPARTYROOT . '/3rdparty' . PATH_SEPARATOR . - implode($paths, PATH_SEPARATOR) . PATH_SEPARATOR . + implode(PATH_SEPARATOR, $paths) . PATH_SEPARATOR . get_include_path() . PATH_SEPARATOR . OC::$SERVERROOT ); diff --git a/lib/private/app.php b/lib/private/app.php index 2f55b54b328ea64f85e6b3fcba699c0705474680..a35248f2552db505d5e96431929555cfef78016f 100644 --- a/lib/private/app.php +++ b/lib/private/app.php @@ -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() { diff --git a/lib/private/appconfig.php b/lib/private/appconfig.php index 0cd6b3bc35bc3f6616ec14ee2556c5446e8bf43f..5fba7514de0491783de146c424c5b72fe90d1498 100644 --- a/lib/private/appconfig.php +++ b/lib/private/appconfig.php @@ -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. diff --git a/lib/private/appframework/dependencyinjection/dicontainer.php b/lib/private/appframework/dependencyinjection/dicontainer.php index 97a6569a0f6e087db16805dca16b70f2d492e18b..ee492b8a9e5e13ddc229d291de4b940d2bd7a58d 100644 --- a/lib/private/appframework/dependencyinjection/dicontainer.php +++ b/lib/private/appframework/dependencyinjection/dicontainer.php @@ -190,8 +190,8 @@ class DIContainer extends SimpleContainer implements IAppContainer{ } /** - * @param $message - * @param $level + * @param string $message + * @param string $level * @return mixed */ function log($message, $level) { diff --git a/lib/private/appframework/http.php b/lib/private/appframework/http.php index d09e1d3ce2e778b8daf1b29951d13875edb61ac8..2b1387af715dba9dfea927a7233d62bdf8ba336d 100644 --- a/lib/private/appframework/http.php +++ b/lib/private/appframework/http.php @@ -33,7 +33,7 @@ class Http extends BaseHttp { protected $headers; /** - * @param $_SERVER $server + * @param array $server $_SERVER * @param string $protocolVersion the http version to use defaults to HTTP/1.1 */ public function __construct($server, $protocolVersion='HTTP/1.1') { diff --git a/lib/private/appframework/routing/routeconfig.php b/lib/private/appframework/routing/routeconfig.php index a3bbde6af5345d492a9cf7457293e0b62b1c411b..91ea7778d0868d5c1a5b4a31d9f1c23f1eeb481c 100644 --- a/lib/private/appframework/routing/routeconfig.php +++ b/lib/private/appframework/routing/routeconfig.php @@ -61,7 +61,7 @@ class RouteConfig { /** * Creates one route base on the give configuration - * @param $routes + * @param array $routes * @throws \UnexpectedValueException */ private function processSimpleRoutes($routes) @@ -105,7 +105,7 @@ class RouteConfig { * - update * - destroy * - * @param $routes + * @param array $routes */ private function processResources($routes) { @@ -151,7 +151,7 @@ class RouteConfig { /** * Based on a given route name the controller name is generated - * @param $controller + * @param string $controller * @return string */ private function buildControllerName($controller) @@ -161,7 +161,7 @@ class RouteConfig { /** * Based on the action part of the route name the controller method name is generated - * @param $action + * @param string $action * @return string */ private function buildActionName($action) { @@ -170,7 +170,7 @@ class RouteConfig { /** * Generates the id used in the url part o the route url - * @param $resource + * @param string $resource * @return string */ private function buildResourceId($resource) { @@ -179,7 +179,7 @@ class RouteConfig { /** * Underscored strings are converted to camel case strings - * @param $str string + * @param string $str * @return string */ private function underScoreToCamelCase($str) { diff --git a/lib/private/archive/tar.php b/lib/private/archive/tar.php index cbdb565ba35e6440f8c04cfb1379ee7e407ba117..21a995d9e50f7bd06c779764414f89f0a6c8f306 100644 --- a/lib/private/archive/tar.php +++ b/lib/private/archive/tar.php @@ -154,7 +154,7 @@ class OC_Archive_TAR extends OC_Archive{ } /** * get the last modified time of a file in the archive - * @param string path + * @param string $path * @return int */ function mtime($path) { diff --git a/lib/private/avatar.php b/lib/private/avatar.php index e97f55eecafeede2526d2c13ed747528081fc37f..459597984769fee409699ed1c066abbfdb4a3c77 100644 --- a/lib/private/avatar.php +++ b/lib/private/avatar.php @@ -16,7 +16,7 @@ class OC_Avatar implements \OCP\IAvatar { /** * @brief constructor - * @param $user string user to do avatar-management with + * @param string $user user to do avatar-management with */ public function __construct ($user) { $this->view = new \OC\Files\View('/'.$user); @@ -24,7 +24,7 @@ class OC_Avatar implements \OCP\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 */ public function get ($size = 64) { @@ -44,7 +44,7 @@ class OC_Avatar implements \OCP\IAvatar { /** * @brief sets the users avatar - * @param $data mixed OC_Image, imagedata or path to set a new avatar + * @param \OC_Image|resource|string $data OC_Image, 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 \OC\NotSquareException if the image is not square diff --git a/lib/private/avatarmanager.php b/lib/private/avatarmanager.php index 3ca46868ea6d3968217c2655aa838192622e2293..f462e6ac5fd4bab518dc56a9b79ed352980331a6 100644 --- a/lib/private/avatarmanager.php +++ b/lib/private/avatarmanager.php @@ -17,7 +17,7 @@ class AvatarManager implements 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/private/backgroundjob/joblist.php b/lib/private/backgroundjob/joblist.php index 26c9026934964c18d48fc8d47b84fa9c59ad2e95..9fa13c25851de21666db812f1582658a12316b0d 100644 --- a/lib/private/backgroundjob/joblist.php +++ b/lib/private/backgroundjob/joblist.php @@ -31,7 +31,7 @@ class JobList implements IJobList { } /** - * @param \Test\BackgroundJob\TestJob $job + * @param Job|string $job * @param mixed $argument */ public function add($job, $argument = null) { @@ -48,7 +48,7 @@ class JobList implements IJobList { } /** - * @param Job $job + * @param Job|string $job * @param mixed $argument */ public function remove($job, $argument = null) { @@ -70,7 +70,7 @@ class JobList implements IJobList { /** * check if a job is in the list * - * @param $job + * @param Job|string $job * @param mixed $argument * @return bool */ @@ -126,7 +126,7 @@ class JobList implements IJobList { /** * @param int $id - * @return Job + * @return Job|null */ public function getById($id) { $query = $this->conn->prepare('SELECT `id`, `class`, `last_run`, `argument` FROM `*PREFIX*jobs` WHERE `id` = ?'); diff --git a/lib/private/cache/file.php b/lib/private/cache/file.php index feee9cc32b6340f7555e3825d5f0fab48548eb97..4e7c065678e3fb27a2c3f1903416d325071b30d6 100644 --- a/lib/private/cache/file.php +++ b/lib/private/cache/file.php @@ -48,7 +48,7 @@ class File { /** * Returns the size of the stored/cached data * - * @param $key + * @param string $key * @return int */ public function size($key) { diff --git a/lib/private/config.php b/lib/private/config.php index 6701ca0532bd87ae2cb7ecd4dfeceda5adc806b1..4242682af3d828ccc21d71782ddfe990199b48ba 100644 --- a/lib/private/config.php +++ b/lib/private/config.php @@ -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. @@ -77,8 +77,8 @@ class Config { /** * @brief Gets a value from config.php * @param string $key key - * @param array|bool|string|null $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. @@ -94,7 +94,7 @@ class 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/connector/sabre/auth.php b/lib/private/connector/sabre/auth.php index 5577273df8c004c79317531030021b7e953f7635..9ebf5fc05cfe0c69585ea2e3dc16b1bb4b18d348 100644 --- a/lib/private/connector/sabre/auth.php +++ b/lib/private/connector/sabre/auth.php @@ -69,6 +69,8 @@ class OC_Connector_Sabre_Auth extends Sabre_DAV_Auth_Backend_AbstractBasic { * even if there are no HTTP Basic Auth headers. * In other case, just fallback to the parent implementation. * + * @param Sabre_DAV_Server $server + * @param $realm * @return bool */ public function authenticate(Sabre_DAV_Server $server, $realm) { diff --git a/lib/private/connector/sabre/file.php b/lib/private/connector/sabre/file.php index 66b50a875524b50f97921c9fe785f3b6eb49d817..ab9d3e47d0e405173c9ae889c122640f32ee869d 100644 --- a/lib/private/connector/sabre/file.php +++ b/lib/private/connector/sabre/file.php @@ -123,7 +123,7 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements Sabre_D /** * Returns the data * - * @return string | resource + * @return string|resource */ public function get() { diff --git a/lib/private/connector/sabre/filesplugin.php b/lib/private/connector/sabre/filesplugin.php index 65231040fb5973f7622e1730387d8a3c427a1ef5..f8495b405243050388fba301894ecdb48669a23d 100644 --- a/lib/private/connector/sabre/filesplugin.php +++ b/lib/private/connector/sabre/filesplugin.php @@ -73,7 +73,7 @@ class OC_Connector_Sabre_FilesPlugin extends Sabre_DAV_ServerPlugin } /** - * @param $filePath + * @param string $filePath * @param Sabre_DAV_INode $node * @throws Sabre_DAV_Exception_BadRequest */ diff --git a/lib/private/connector/sabre/quotaplugin.php b/lib/private/connector/sabre/quotaplugin.php index 1e73e1645c3f6eff57c95fcc53400536357028c8..c9b8336b57b14f67a8eefb741462cead14f679aa 100644 --- a/lib/private/connector/sabre/quotaplugin.php +++ b/lib/private/connector/sabre/quotaplugin.php @@ -97,7 +97,7 @@ class OC_Connector_Sabre_QuotaPlugin extends Sabre_DAV_ServerPlugin { } /** - * @param $parentUri + * @param string $parentUri * @return mixed */ public function getFreeSpace($parentUri) { diff --git a/lib/private/contactsmanager.php b/lib/private/contactsmanager.php index 4299d88017a7fa462cd137f3b2fe01681e9befaf..26264d4e988ea7edb90d2fcff27fa6325eb807a0 100644 --- a/lib/private/contactsmanager.php +++ b/lib/private/contactsmanager.php @@ -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) { diff --git a/lib/private/db.php b/lib/private/db.php index 322a13642ae242ef8361f09946b7ac9f313a9fde..52bf570d1d0ee2b7d814a7c7a9edbe858c6cb30d 100644 --- a/lib/private/db.php +++ b/lib/private/db.php @@ -401,7 +401,7 @@ class OC_DB { /** * @brief replaces the ownCloud tables with a new set - * @param $file string path to the MDB2 xml db export file + * @param string $file path to the MDB2 xml db export file */ public static function replaceDB( $file ) { $schemaManager = self::getMDB2SchemaManager(); diff --git a/lib/private/db/connectionwrapper.php b/lib/private/db/connectionwrapper.php index c2cfc21d2040c7ada2b6bab7917d7332ececffb8..132e76666ab5d705f6ab1fb9acdce6ad333f12a2 100644 --- a/lib/private/db/connectionwrapper.php +++ b/lib/private/db/connectionwrapper.php @@ -41,8 +41,8 @@ class ConnectionWrapper implements \OCP\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/private/db/mdb2schemamanager.php b/lib/private/db/mdb2schemamanager.php index aaf2ea543b9ba31e6e58dc689c9cffce1cf4962b..d98197445e999c1474a5dbe0dd28c11fa17383fa 100644 --- a/lib/private/db/mdb2schemamanager.php +++ b/lib/private/db/mdb2schemamanager.php @@ -126,7 +126,7 @@ class MDB2SchemaManager { /** * @brief replaces the ownCloud tables with a new set - * @param $file string path to the MDB2 xml db export file + * @param string $file path to the MDB2 xml db export file */ public function replaceDB( $file ) { $apps = \OC_App::getAllApps(); diff --git a/lib/private/db/mdb2schemareader.php b/lib/private/db/mdb2schemareader.php index 1c16d03eab2cbfbcd724cfc46278321ebd124979..597650985fac87000ea19e4ec133aea85ec0ffd3 100644 --- a/lib/private/db/mdb2schemareader.php +++ b/lib/private/db/mdb2schemareader.php @@ -66,7 +66,7 @@ class MDB2SchemaReader { } /** - * @param\Doctrine\DBAL\Schema\Schema $schema + * @param \Doctrine\DBAL\Schema\Schema $schema * @param \SimpleXMLElement $xml * @throws \DomainException */ @@ -303,7 +303,7 @@ class MDB2SchemaReader { } /** - * @param \SimpleXMLElement | string $xml + * @param \SimpleXMLElement|string $xml * @return bool */ private function asBool($xml) { diff --git a/lib/private/db/statementwrapper.php b/lib/private/db/statementwrapper.php index 492209b883bd94134cacd548dcb308ef0937c730..70d1f985a41ef15c93d3e0536bf8705b6a326eef 100644 --- a/lib/private/db/statementwrapper.php +++ b/lib/private/db/statementwrapper.php @@ -41,7 +41,7 @@ class OC_DB_StatementWrapper { * make execute return the result instead of a bool * * @param array $input - * @return \OC_DB_StatementWrapper | int + * @return \OC_DB_StatementWrapper|int */ public function execute($input=array()) { if(OC_Config::getValue( "log_query", false)) { diff --git a/lib/private/defaults.php b/lib/private/defaults.php index fca798568c579402b85dbe87c7b5a4f7fad5fbfa..663c327a3b0eab5ce45de284d2b080c77f33f42e 100644 --- a/lib/private/defaults.php +++ b/lib/private/defaults.php @@ -185,7 +185,7 @@ class OC_Defaults { /** * Returns mail header color - * @return mail header color + * @return string */ public function getMailHeaderColor() { if ($this->themeExist('getMailHeaderColor')) { diff --git a/lib/private/fileproxy.php b/lib/private/fileproxy.php index 88976c1b8e510e46d1f4a1ee96aac85e4b3d2809..2835e9746427cd88d6a35eb9d99b076aa54a9210 100644 --- a/lib/private/fileproxy.php +++ b/lib/private/fileproxy.php @@ -47,7 +47,7 @@ class OC_FileProxy{ /** * fallback function when a proxy operation is not implemented * @param string $function the name of the proxy operation - * @param mixed + * @param mixed $arguments * * this implements a dummy proxy for all operations */ diff --git a/lib/private/files.php b/lib/private/files.php index c435f8d168438e85858a35b4a8a5802e18874ccb..7c437a16a98aa831c3507579bf17e26e8396e0c0 100644 --- a/lib/private/files.php +++ b/lib/private/files.php @@ -225,7 +225,7 @@ class OC_Files { * checks if the selected files are within the size constraint. If not, outputs an error page. * * @param string $dir - * @param array | string $files + * @param array|string $files */ static function validateZipDownload($dir, $files) { if (!OC_Config::getValue('allowZipDownload', true)) { diff --git a/lib/private/files/cache/cache.php b/lib/private/files/cache/cache.php index c4f03b4d9efdeccd8a253fa7918dfc39422ae24e..3e4f6dfb13259faf6619a6e10f619c5e9597bf90 100644 --- a/lib/private/files/cache/cache.php +++ b/lib/private/files/cache/cache.php @@ -109,7 +109,7 @@ class Cache { * get the stored metadata of a file or folder * * @param string/int $file - * @return array | false + * @return array|false */ public function get($file) { if (is_string($file) or $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) { @@ -597,7 +597,7 @@ class Cache { * get the path of a file on this storage by it's id * * @param int $id - * @return string | null + * @return string|null */ public function getPathById($id) { $sql = 'SELECT `path` FROM `*PREFIX*filecache` WHERE `fileid` = ? AND `storage` = ?'; @@ -640,7 +640,7 @@ class Cache { /** * normalize the given path - * @param $path + * @param string $path * @return string */ public function normalize($path) { diff --git a/lib/private/files/cache/scanner.php b/lib/private/files/cache/scanner.php index c0bdde06a755ce04b397797d8847fe6c65c61557..51454a7145869ed8e3ec56399a0e550ec8e00d9e 100644 --- a/lib/private/files/cache/scanner.php +++ b/lib/private/files/cache/scanner.php @@ -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) { @@ -273,7 +273,7 @@ class Scanner extends BasicEmitter { * @brief check if the file should be ignored when scanning * NOTE: files with a '.part' extension are ignored as well! * prevents unfinished put requests to be scanned - * @param String $file + * @param string $file * @return boolean */ public static function isPartialFile($file) { diff --git a/lib/private/files/cache/updater.php b/lib/private/files/cache/updater.php index 199ce5dee78f158369d605c158cc184b34494dca..95f77a81fa263660ee2a4ccabe45445495fe9cd3 100644 --- a/lib/private/files/cache/updater.php +++ b/lib/private/files/cache/updater.php @@ -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(); diff --git a/lib/private/files/cache/watcher.php b/lib/private/files/cache/watcher.php index 48aa6f853ce8db9ae9052ef65859ebc1e4cf059c..599752a6effa46974dbeabbe8d5b611d1d8cc4b3 100644 --- a/lib/private/files/cache/watcher.php +++ b/lib/private/files/cache/watcher.php @@ -55,7 +55,7 @@ class Watcher { * check $path for updates * * @param string $path - * @return boolean | array true if path was updated, otherwise the cached data is returned + * @return boolean|array true if path was updated, otherwise the cached data is returned */ public function checkUpdate($path) { if ($this->watchPolicy === self::CHECK_ALWAYS or ($this->watchPolicy === self::CHECK_ONCE and array_search($path, $this->checkedPaths) === false)) { diff --git a/lib/private/files/fileinfo.php b/lib/private/files/fileinfo.php index d6940f50bf1b61c5b1e0494163fadf498a2aaec3..b64c5d4e1120ffb208ea0c59421a54ae0a380cbf 100644 --- a/lib/private/files/fileinfo.php +++ b/lib/private/files/fileinfo.php @@ -147,7 +147,7 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess { } /** - * @return \OCP\Files\FileInfo::TYPE_FILE | \OCP\Files\FileInfo::TYPE_FOLDER + * @return \OCP\Files\FileInfo::TYPE_FILE|\OCP\Files\FileInfo::TYPE_FOLDER */ public function getType() { if (isset($this->data['type'])) { diff --git a/lib/private/files/filesystem.php b/lib/private/files/filesystem.php index 52df1bec6117c5c823b1521cbb28fc9846dfc59d..22d15840c3201f3d882058efc1976f9863909eac 100644 --- a/lib/private/files/filesystem.php +++ b/lib/private/files/filesystem.php @@ -245,7 +245,7 @@ class Filesystem { } /** - * @param $id + * @param string $id * @return Mount\Mount[] */ public static function getMountByStorageId($id) { @@ -256,7 +256,7 @@ class Filesystem { } /** - * @param $id + * @param int $id * @return Mount\Mount[] */ public static function getMountByNumericId($id) { @@ -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) { diff --git a/lib/private/files/mapper.php b/lib/private/files/mapper.php index 833d4bd8d1cfa9bee9e43dc3efa0b2405918536b..666719da12debc83c2e7a6827c71c8f26b3a306a 100644 --- a/lib/private/files/mapper.php +++ b/lib/private/files/mapper.php @@ -97,8 +97,8 @@ class Mapper } /** - * @param $path - * @param $root + * @param string $path + * @param string $root * @return false|string */ public function stripRootFolder($path, $root) { diff --git a/lib/private/files/mount/manager.php b/lib/private/files/mount/manager.php index 91460b72730cbf735ee865cdc6c98ad33f37067a..db1f4600c742ba5f2994792885d13429d15aa5c2 100644 --- a/lib/private/files/mount/manager.php +++ b/lib/private/files/mount/manager.php @@ -33,7 +33,7 @@ class Manager { /** * Find the mount for $path * - * @param $path + * @param string $path * @return Mount */ public function find($path) { @@ -61,7 +61,7 @@ class Manager { /** * Find all mounts in $path * - * @param $path + * @param string $path * @return Mount[] */ public function findIn($path) { @@ -112,7 +112,7 @@ class Manager { /** * Find mounts by numeric storage id * - * @param string $id + * @param int $id * @return Mount[] */ public function findByNumericId($id) { diff --git a/lib/private/files/mount/mount.php b/lib/private/files/mount/mount.php index 08d5ddf348be9e850904941a538ba53d3c20a1ec..256630726d2c454596ade07e55a17be6558595f1 100644 --- a/lib/private/files/mount/mount.php +++ b/lib/private/files/mount/mount.php @@ -28,7 +28,7 @@ class Mount { private $loader; /** - * @param string | \OC\Files\Storage\Storage $storage + * @param string|\OC\Files\Storage\Storage $storage * @param string $mountpoint * @param array $arguments (optional)\ * @param \OC\Files\Storage\Loader $loader diff --git a/lib/private/files/node/folder.php b/lib/private/files/node/folder.php index d9e0ddc2d610d17c6ab4e9a82c09d88ee01ac78d..1af34fc2be6dc406ce4bef1ea93ae79be0000b7d 100644 --- a/lib/private/files/node/folder.php +++ b/lib/private/files/node/folder.php @@ -296,7 +296,7 @@ class Folder extends Node implements \OCP\Files\Folder { } /** - * @param $id + * @param int $id * @return \OC\Files\Node\Node[] */ public function getById($id) { diff --git a/lib/private/files/storage/common.php b/lib/private/files/storage/common.php index 8a263d4ce1efc333875bc53b67f129a7c13217a7..fef33cabd879f3a261a1c0926d46f591c074a3eb 100644 --- a/lib/private/files/storage/common.php +++ b/lib/private/files/storage/common.php @@ -317,7 +317,7 @@ abstract class Common implements \OC\Files\Storage\Storage { * clean a path, i.e. remove all redundant '.' and '..' * making sure that it can't point to higher than '/' * - * @param $path The path to clean + * @param string $path The path to clean * @return string cleaned path */ public function cleanPath($path) { @@ -347,7 +347,7 @@ abstract class Common implements \OC\Files\Storage\Storage { /** * get the free space in the storage * - * @param $path + * @param string $path * @return int */ public function free_space($path) { diff --git a/lib/private/files/storage/wrapper/quota.php b/lib/private/files/storage/wrapper/quota.php index a878b2c5cf6c8d27798c9b1185f9aa257f8172af..c57c797f87a57c5c1f2babc63e2b5e2e99bc8bb7 100644 --- a/lib/private/files/storage/wrapper/quota.php +++ b/lib/private/files/storage/wrapper/quota.php @@ -30,7 +30,7 @@ class Quota extends Wrapper { } /** - * @return quota value + * @return int quota value */ public function getQuota() { return $this->quota; diff --git a/lib/private/files/stream/oc.php b/lib/private/files/stream/oc.php index 88e7e062df9da747515bde59d9409c657ffb28e2..c206b41f55ee6c3ed06d81091da073218c4a9d76 100644 --- a/lib/private/files/stream/oc.php +++ b/lib/private/files/stream/oc.php @@ -18,7 +18,15 @@ class OC { static private $rootView; private $path; + + /** + * @var resource + */ private $dirSource; + + /** + * @var resource + */ private $fileSource; private $meta; diff --git a/lib/private/files/type/templatemanager.php b/lib/private/files/type/templatemanager.php index cd1536d2732897a4e85f87c3eda6a20202d68ec7..e693e7079a5c230ac17b8e5082994d408caa2257 100644 --- a/lib/private/files/type/templatemanager.php +++ b/lib/private/files/type/templatemanager.php @@ -19,7 +19,7 @@ class TemplateManager { * get the path of the template for a mimetype * * @param string $mimetype - * @return string | null + * @return string|null */ public function getTemplatePath($mimetype) { if (isset($this->templates[$mimetype])) { diff --git a/lib/private/files/view.php b/lib/private/files/view.php index 39c71cfc0b01e9afa91c1393e536960f1f83427d..3b99bd12b8adf91de65a51d3d8b8f21a59675413 100644 --- a/lib/private/files/view.php +++ b/lib/private/files/view.php @@ -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); @@ -168,6 +168,10 @@ class View { } } + /** + * @param string $path + * @return resource + */ public function opendir($path) { return $this->basicOperation('opendir', $path, array('read')); } @@ -552,6 +556,11 @@ class View { } } + /** + * @param string $path + * @param string $mode + * @return resource + */ public function fopen($path, $mode) { $hooks = array(); switch ($mode) { @@ -796,7 +805,7 @@ class View { * @param string $path * @param boolean $includeMountPoints whether to add mountpoint sizes, * defaults to true - * @return \OC\Files\FileInfo | false + * @return \OC\Files\FileInfo|false */ public function getFileInfo($path, $includeMountPoints = true) { $data = array(); @@ -991,7 +1000,7 @@ class View { * change file metadata * * @param string $path - * @param array | \OCP\Files\FileInfo $data + * @param array|\OCP\Files\FileInfo $data * @return int * * returns the fileid of the updated file diff --git a/lib/private/geo.php b/lib/private/geo.php index cd62511f0c1f53f743d4234c394c1cbbd39baabc..a0ad2b799abdb3852e2cadabef67a885ca17fe6f 100644 --- a/lib/private/geo.php +++ b/lib/private/geo.php @@ -8,8 +8,8 @@ class OC_Geo{ /** * @brief returns the closest timezone to coordinates - * @param $latitude - * @param $longitude + * @param float $latitude + * @param float $longitude * @return mixed Closest timezone */ public static function timezone($latitude, $longitude) { diff --git a/lib/private/group.php b/lib/private/group.php index ea6384bae3e7e8bd3380c96133b87e04dfb32736..845b3655bab97cedfb5dea9da1b47cfe8620459b 100644 --- a/lib/private/group.php +++ b/lib/private/group.php @@ -58,7 +58,7 @@ class OC_Group { /** * @brief set the group backend - * @param \OC_Group_Backend $backend The backend to use for user managment + * @param \OC_Group_Backend $backend The backend to use for user managment * @return bool */ public static function useBackend($backend) { @@ -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 - * @returns 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 - * @returns 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 - * @returns 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(); diff --git a/lib/private/group/backend.php b/lib/private/group/backend.php index cc61fce1615ec4c043e1e7978ce8b635d9ce6c36..38522d0c43c81f7de63b6cb3eb9c775dab75949f 100644 --- a/lib/private/group/backend.php +++ b/lib/private/group/backend.php @@ -69,7 +69,7 @@ abstract class OC_Group_Backend implements OC_Group_Interface { /** * @brief Check if backend implements actions * @param int $actions bitwise-or'ed actions - * @return boolean + * @return bool * * Returns the supported actions as int to be * compared with OC_GROUP_BACKEND_CREATE_GROUP etc. @@ -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(); diff --git a/lib/private/group/database.php b/lib/private/group/database.php index df0d84d0d2a3528dde710bd07f04fcb60650f227..91baa3140cc39a47db374846ab7d4f6303544e1d 100644 --- a/lib/private/group/database.php +++ b/lib/private/group/database.php @@ -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 ?', @@ -215,9 +215,8 @@ class OC_Group_Database extends OC_Group_Backend { * @brief get the number of all users matching the search string in a group * @param string $gid * @param string $search - * @param int $limit - * @param int $offset - * @return int | false + * @return int|false + * @throws DatabaseException */ public function countUsersInGroup($gid, $search = '') { $stmt = OC_DB::prepare('SELECT COUNT(`uid`) AS `count` FROM `*PREFIX*group_user` WHERE `gid` = ? AND `uid` LIKE ?'); diff --git a/lib/private/group/dummy.php b/lib/private/group/dummy.php index 94cbb607ad1157d27c9a0e3591a0192ec9269f5d..75bab31a337d86435ce55324a80a4518eed83480 100644 --- a/lib/private/group/dummy.php +++ b/lib/private/group/dummy.php @@ -29,9 +29,9 @@ class OC_Group_Dummy extends OC_Group_Backend { /** * @brief Try to create a new group * @param string $gid The name of the group to create - * @returns true/false + * @return bool * - * Trys to create a new group. If the group name already exists, false will + * Tries to create a new group. If the group name already exists, false will * be returned. */ public function createGroup($gid) { @@ -45,8 +45,8 @@ class OC_Group_Dummy extends OC_Group_Backend { /** * @brief delete a group - * @param $gid gid of the group to delete - * @returns true/false + * @param string $gid gid of the group to delete + * @return bool * * Deletes a group and removes it from the group_user-table */ @@ -61,9 +61,9 @@ class OC_Group_Dummy extends OC_Group_Backend { /** * @brief is user in group? - * @param $uid uid of the user - * @param $gid gid of the group - * @returns true/false + * @param string $uid uid of the user + * @param string $gid gid of the group + * @return bool * * Checks whether the user is member of a group or not. */ @@ -77,9 +77,9 @@ class OC_Group_Dummy extends OC_Group_Backend { /** * @brief Add a user to a group - * @param $uid Name of the user to add to group - * @param $gid Name of the group in which add the user - * @returns true/false + * @param string $uid Name of the user to add to group + * @param string $gid Name of the group in which add the user + * @return bool * * Adds a user to a group. */ @@ -98,9 +98,9 @@ class OC_Group_Dummy extends OC_Group_Backend { /** * @brief Removes a user from a group - * @param $uid NameUSER of the user to remove from group - * @param $gid Name of the group from which remove the user - * @returns true/false + * @param string $uid Name of the user to remove from group + * @param string $gid Name of the group from which remove the user + * @return bool * * removes the user from a group. */ @@ -118,8 +118,8 @@ class OC_Group_Dummy extends OC_Group_Backend { /** * @brief Get all groups a user belongs to - * @param $uid Name of the user - * @returns array with group names + * @param string $uid Name of the user + * @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. @@ -136,18 +136,23 @@ class OC_Group_Dummy extends OC_Group_Backend { } /** - * @brief get a list of all groups - * @returns array with group names - * - * Returns a list with all groups + * @brief Get a list of all groups + * @param string $search + * @param int $limit + * @param int $offset + * @return array an array of group names */ public function getGroups($search = '', $limit = -1, $offset = 0) { return array_keys($this->groups); } /** - * @brief get a list of all users in a group - * @returns array with user ids + * @brief Get a list of all users in a group + * @param string $gid + * @param string $search + * @param int $limit + * @param int $offset + * @return array an array of user IDs */ public function usersInGroup($gid, $search = '', $limit = -1, $offset = 0) { if(isset($this->groups[$gid])) { @@ -159,7 +164,11 @@ class OC_Group_Dummy extends OC_Group_Backend { /** * @brief get the number of all users in a group - * @returns int | bool + * @param string $gid + * @param string $search + * @param int $limit + * @param int $offset + * @return int */ public function countUsersInGroup($gid, $search = '', $limit = -1, $offset = 0) { if(isset($this->groups[$gid])) { diff --git a/lib/private/group/example.php b/lib/private/group/example.php index 3519b9ed92f0d9681017e07edb032ee2f978ea17..76c9ce2433d196c792b2b60053fcad7db67e07b6 100644 --- a/lib/private/group/example.php +++ b/lib/private/group/example.php @@ -28,18 +28,18 @@ abstract class OC_Group_Example { /** * @brief Try to create a new group - * @param $gid The name of the group to create - * @returns true/false + * @param string $gid The name of the group to create + * @return bool * - * Trys to create a new group. If the group name already exists, false will + * Tries to create a new group. If the group name already exists, false will * be returned. */ abstract public static function createGroup($gid); /** * @brief delete a group - * @param $gid gid of the group to delete - * @returns true/false + * @param string $gid gid of the group to delete + * @return bool * * Deletes a group and removes it from the group_user-table */ @@ -47,9 +47,9 @@ abstract class OC_Group_Example { /** * @brief is user in group? - * @param $uid uid of the user - * @param $gid gid of the group - * @returns true/false + * @param string $uid uid of the user + * @param string $gid gid of the group + * @return bool * * Checks whether the user is member of a group or not. */ @@ -57,9 +57,9 @@ abstract class OC_Group_Example { /** * @brief Add a user to a group - * @param $uid Name of the user to add to group - * @param $gid Name of the group in which add the user - * @returns true/false + * @param string $uid Name of the user to add to group + * @param string $gid Name of the group in which add the user + * @return bool * * Adds a user to a group. */ @@ -67,9 +67,9 @@ abstract class OC_Group_Example { /** * @brief Removes a user from a group - * @param $uid NameUSER of the user to remove from group - * @param $gid Name of the group from which remove the user - * @returns true/false + * @param string $uid Name of the user to remove from group + * @param string $gid Name of the group from which remove the user + * @return bool * * removes the user from a group. */ @@ -77,8 +77,8 @@ abstract class OC_Group_Example { /** * @brief Get all groups a user belongs to - * @param $uid Name of the user - * @returns array with group names + * @param string $uid Name of the user + * @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,14 +87,15 @@ abstract class OC_Group_Example { /** * @brief get a list of all groups - * @returns array with group names - * - * Returns a list with all groups + * @param string $search + * @param int $limit + * @param int $offset + * @return array an array of group names */ abstract public static function getGroups($search = '', $limit = -1, $offset = 0); /** - * check if a group exists + * @brief Check if a group exists * @param string $gid * @return bool */ @@ -102,8 +103,11 @@ abstract class OC_Group_Example { /** * @brief get a list of all users in a group - * @returns array with user ids + * @param string $gid + * @param string $search + * @param int $limit + * @param int $offset + * @return array an array of user ids */ abstract public static function usersInGroup($gid, $search = '', $limit = -1, $offset = 0); - } diff --git a/lib/private/group/group.php b/lib/private/group/group.php index 7593bb68d1a9050b837104738381ef19abc72b54..69641854dc5afbe08f610233714f54581a2b91c0 100644 --- a/lib/private/group/group.php +++ b/lib/private/group/group.php @@ -26,7 +26,7 @@ class Group { private $usersLoaded; /** - * @var \OC_Group_Backend[] | \OC_Group_Database[] $backend + * @var \OC_Group_Backend[]|\OC_Group_Database[] $backend */ private $backends; @@ -184,7 +184,7 @@ class Group { * returns the number of users matching the search string * * @param string $search - * @return int | bool + * @return int|bool */ public function count($search) { $users = false; diff --git a/lib/private/group/interface.php b/lib/private/group/interface.php index 4ef3663837f0094664402c08724f30986298fec2..74d288d42c084e1f144058c23044f0e822e7ea4a 100644 --- a/lib/private/group/interface.php +++ b/lib/private/group/interface.php @@ -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); diff --git a/lib/private/group/manager.php b/lib/private/group/manager.php index d31225e3c2e71c4ff26cdb67b04cdf50929759c0..f03f700413294ba4fcb1a59d2f92f65702d1e53f 100644 --- a/lib/private/group/manager.php +++ b/lib/private/group/manager.php @@ -28,7 +28,7 @@ use OC\Hooks\PublicEmitter; */ class Manager extends PublicEmitter { /** - * @var \OC_Group_Backend[] | \OC_Group_Database[] $backends + * @var \OC_Group_Backend[]|\OC_Group_Database[] $backends */ private $backends = array(); @@ -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); diff --git a/lib/private/helper.php b/lib/private/helper.php index 6bc054bce864be99d9b95855aae12b56f4366a5a..12d82f6fb45d9db64e362caeac828cc3fb20bbc7 100644 --- a/lib/private/helper.php +++ b/lib/private/helper.php @@ -32,11 +32,11 @@ class OC_Helper { /** * @brief Creates an url using a defined route - * @param $route + * @param string $route * @param array $parameters * @return * @internal param array $args with param=>value, will be appended to the returned url - * @returns string the url + * @return string the url * * Returns a url to the given app and file. */ @@ -495,7 +495,7 @@ class OC_Helper { /** * detect if a given program is found in the search PATH * - * @param $name + * @param string $name * @param bool $path * @internal param string $program name * @internal param string $optional search path, defaults to $PATH @@ -670,8 +670,8 @@ class OC_Helper { /** * Adds a suffix to the name in case the file exists * - * @param $path - * @param $filename + * @param string $path + * @param string $filename * @return string */ public static function buildNotExistingFileName($path, $filename) { @@ -682,8 +682,8 @@ class OC_Helper { /** * Adds a suffix to the name in case the file exists * - * @param $path - * @param $filename + * @param string $path + * @param string $filename * @return string */ public static function buildNotExistingFileNameForView($path, $filename, \OC\Files\View $view) { @@ -775,7 +775,7 @@ class OC_Helper { /** * @brief replaces a copy of string delimited by the start and (optionally) length parameters with the string given in replacement. * - * @param $string + * @param string $string * @param string $replacement The replacement string. * @param int $start If start is positive, the replacing will begin at the start'th offset into string. If start is negative, the replacing will begin at the start'th character from the end of string. * @param int $length Length of the part to be replaced diff --git a/lib/private/hook.php b/lib/private/hook.php index 7ae6496f91d3e3fa8aadfb7e49abb18fc52c1ba3..b715db2d16c874a023f6bf29dc09efc083051e21 100644 --- a/lib/private/hook.php +++ b/lib/private/hook.php @@ -45,7 +45,7 @@ class OC_Hook{ * @brief emits a signal * @param string $signalclass class name of emitter * @param string $signalname name of signal - * @param array $params default: array() array with additional data + * @param mixed $params default: array() array with additional data * @return bool, true if slots exists or false if not * * Emits a signal. To get data from the slot use references! diff --git a/lib/private/image.php b/lib/private/image.php index 14aa64d12da4526a4c0a8b687499e77f9c2294a1..341bfaaf8189f3bce70e436005a3d6e777dc2a50 100644 --- a/lib/private/image.php +++ b/lib/private/image.php @@ -424,7 +424,7 @@ class OC_Image { * @brief Loads an image from an open file handle. * It is the responsibility of the caller to position the pointer at the correct place and to close the handle again. * @param resource $handle - * @return An image resource or false on error + * @return resource|false An image resource or false on error */ public function loadFromFileHandle($handle) { OC_Log::write('core', __METHOD__.'(): Trying', OC_Log::DEBUG); diff --git a/lib/private/installer.php b/lib/private/installer.php index 64e8e3a5e7a24f58b50c4d4035b5de780f8f0677..9417c32bc89d11b38763fb70fa5450784cb9cae7 100644 --- a/lib/private/installer.php +++ b/lib/private/installer.php @@ -221,7 +221,7 @@ class OC_Installer{ /** * @brief checks whether or not an app is installed * @param string $app app - * @returns true/false + * @return bool * * Checks whether or not an app is installed, i.e. registered in apps table. */ @@ -313,7 +313,7 @@ class OC_Installer{ /** * @brief Removes an app * @param string $name name of the application to remove - * @param $options array with options + * @param array $options options * @return boolean|null * * This function removes an app. $options is an associative array. The diff --git a/lib/private/l10n.php b/lib/private/l10n.php index c1596a64163b5534ba6fc651281290ec8ed1d337..c9d9e8131b1d5b84df850b593896b532150afea7 100644 --- a/lib/private/l10n.php +++ b/lib/private/l10n.php @@ -183,7 +183,7 @@ class OC_L10N implements \OCP\IL10N { * * Parts of the code is copied from Habari: * https://github.com/habari/system/blob/master/classes/locale.php - * @param $string string + * @param string $string * @return string */ protected function createPluralFormFunction($string){ @@ -278,7 +278,7 @@ class OC_L10N implements \OCP\IL10N { /** * @brief getTranslations - * @returns array Fetch all translations + * @return array Fetch all translations * * Returns an associative array with all translations */ @@ -289,7 +289,7 @@ class OC_L10N implements \OCP\IL10N { /** * @brief getPluralFormString - * @returns string containing the gettext "Plural-Forms"-string + * @return string containing the gettext "Plural-Forms"-string * * Returns a string like "nplurals=2; plural=(n != 1);" */ @@ -300,7 +300,7 @@ class OC_L10N implements \OCP\IL10N { /** * @brief getPluralFormFunction - * @returns string the plural form function + * @return string the plural form function * * returned function accepts the argument $n */ @@ -314,7 +314,7 @@ class OC_L10N implements \OCP\IL10N { /** * @brief get localizations - * @returns array Fetch all localizations + * @return array Fetch all localizations * * Returns an associative array with all localizations */ @@ -327,7 +327,7 @@ class OC_L10N implements \OCP\IL10N { * @brief Localization * @param string $type Type of localization * @param array|int|string $data parameters for this localization - * @returns String or false + * @return String or false * * Returns the localized data. * @@ -381,7 +381,7 @@ class OC_L10N implements \OCP\IL10N { /** * @brief Choose a language * @param array $text Associative Array with possible strings - * @returns String + * @return String * * $text is an array 'de' => 'hallo welt', 'en' => 'hello world', ... * @@ -404,7 +404,7 @@ class OC_L10N implements \OCP\IL10N { /** * @brief find the best language * @param array|string $app details below - * @returns string language + * @return string language * * If $app is an array, ownCloud assumes that these are the available * languages. Otherwise ownCloud tries to find the files in the l10n @@ -477,7 +477,7 @@ class OC_L10N implements \OCP\IL10N { /** * @brief find the l10n directory * @param string $app App that needs to be translated - * @returns directory + * @return directory */ protected static function findI18nDir($app) { // find the i18n dir @@ -497,7 +497,7 @@ class OC_L10N implements \OCP\IL10N { /** * @brief find all available languages for an app * @param string $app App that needs to be translated - * @returns array an array of available languages + * @return array an array of available languages */ public static function findAvailableLanguages($app=null) { $available=array('en');//english is always available @@ -517,7 +517,7 @@ class OC_L10N implements \OCP\IL10N { /** * @param string $app * @param string $lang - * @returns bool + * @return bool */ public static function languageExists($app, $lang) { if ($lang == 'en') {//english is always available diff --git a/lib/private/l10n/factory.php b/lib/private/l10n/factory.php index 8c65f3681718db28b7e3b74beefa9067adfa6a86..d0c3799b9c2f55e39ecb4bfea7e525982fe231e0 100644 --- a/lib/private/l10n/factory.php +++ b/lib/private/l10n/factory.php @@ -20,8 +20,8 @@ class Factory { /** * get an L10N instance - * @param $app string - * @param $lang string|null + * @param string $app + * @param string|null $lang * @return \OC_L10N */ public function get($app) { diff --git a/lib/private/legacy/appconfig.php b/lib/private/legacy/appconfig.php index cb5cef7e350a889435322f4a3e4e0d771f7e739e..209f42ffe3896cfe3a578ec4eb53a7108b4a6bf4 100644 --- a/lib/private/legacy/appconfig.php +++ b/lib/private/legacy/appconfig.php @@ -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. diff --git a/lib/private/legacy/config.php b/lib/private/legacy/config.php index 6c2103179ab039e8c5a32fa802a16092c5c632c6..76a53d3f6270b16c052d17792104bb0fd8bcfa6c 100644 --- a/lib/private/legacy/config.php +++ b/lib/private/legacy/config.php @@ -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. diff --git a/lib/private/legacy/preferences.php b/lib/private/legacy/preferences.php index fcde12796ca1cdd7b108117222cf0aa8f2081a5b..eed6730a5294fae0afb92e9cb6684b9460e1a0bb 100644 --- a/lib/private/legacy/preferences.php +++ b/lib/private/legacy/preferences.php @@ -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. diff --git a/lib/private/migrate.php b/lib/private/migrate.php index 5bcc11b061bda624bd64e67eed4138b8ffa14788..98c825aafd80041e5e35fc2cafa5b48c7ee275ea 100644 --- a/lib/private/migrate.php +++ b/lib/private/migrate.php @@ -333,7 +333,7 @@ class OC_Migrate{ /** * @brief tries to extract the import zip - * @param $path string path to the zip + * @param string $path path to the zip * @return string path to extract location (with a trailing slash) or false on failure */ static private function extractZip( $path ) { @@ -536,9 +536,9 @@ class OC_Migrate{ /** * @brief imports a new user * @param string $db string path to migration.db - * @param $info object of migration info + * @param object $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 diff --git a/lib/private/migration/content.php b/lib/private/migration/content.php index b0e7a4e9528630c16cb4de0a13b69fdee1878bb3..d3b2fe836a470e3f2a6a93ced6dce711d40523e6 100644 --- a/lib/private/migration/content.php +++ b/lib/private/migration/content.php @@ -35,7 +35,7 @@ class OC_Migration_Content{ /** * @brief sets up the * @param ZipArchive $zip ZipArchive object - * @param $db a database object (required for exporttype user) + * @param object $db a database object (required for exporttype user) * @return bool|null */ public function __construct( $zip, $db=null ) { @@ -45,11 +45,9 @@ class OC_Migration_Content{ } - // @brief prepares the db - // @param $query the sql query to prepare - /** - * @param string $query + * @brief prepares the db + * @param string $query the sql query to prepare */ public function prepare( $query ) { @@ -88,7 +86,7 @@ class OC_Migration_Content{ /** * @brief copys rows to migration.db from the main database - * @param $options array of options. + * @param array $options array of options. * @return bool */ public function copyRows( $options ) { @@ -131,7 +129,7 @@ class OC_Migration_Content{ /** * @brief saves a sql data set into migration.db * @param OC_DB_StatementWrapper $data a sql data set returned from self::prepare()->query() - * @param $options array of copyRows options + * @param array $options array of copyRows options * @return void */ private function insertData( $data, $options ) { @@ -170,8 +168,8 @@ class OC_Migration_Content{ /** * @brief adds a directory to the zip object * @param boolean|string $dir string path of the directory to add - * @param $recursive bool - * @param $internaldir string path of folder to add dir to in zip + * @param bool $recursive + * @param string $internaldir path of folder to add dir to in zip * @return bool */ public function addDir( $dir, $recursive=true, $internaldir='' ) { diff --git a/lib/private/navigationmanager.php b/lib/private/navigationmanager.php index 1f657b9ad80fd8b47edf0c381efd09132dd1ae15..d7111af03cfd957e074815b38a966f77f15dfb3c 100644 --- a/lib/private/navigationmanager.php +++ b/lib/private/navigationmanager.php @@ -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; diff --git a/lib/private/ocs.php b/lib/private/ocs.php index 211e8222145c29add0b4140e46318b835b78f905..aeb3d259b30c697296bedf7f5d88dedc8d693bff 100644 --- a/lib/private/ocs.php +++ b/lib/private/ocs.php @@ -213,8 +213,8 @@ class OC_OCS { } /** - * @param $writer - * @param $data + * @param resource $writer + * @param array $data * @param string $node */ public static function toXml($writer, $data, $node) { diff --git a/lib/private/ocs/cloud.php b/lib/private/ocs/cloud.php index c8bb9425f1a1292f33d977c4c2096e6f8b25b0fa..3ced0af8ee129be2680857cf4a05bb861280f2fc 100644 --- a/lib/private/ocs/cloud.php +++ b/lib/private/ocs/cloud.php @@ -57,8 +57,8 @@ class OC_OCS_Cloud { * </quota> * </data> * - * @param $parameters object should contain parameter 'userid' which identifies - * the user from whom the information will be returned + * @param array $parameters should contain parameter 'userid' which identifies + * the user from whom the information will be returned */ public static function getUser($parameters) { $return = array(); diff --git a/lib/private/ocs/result.php b/lib/private/ocs/result.php index 0e3b85d5905b1de2e1fedaae9224d36c537098a7..567fe7f87feee820c08860e5ba9bac560a76144f 100644 --- a/lib/private/ocs/result.php +++ b/lib/private/ocs/result.php @@ -26,7 +26,7 @@ class OC_OCS_Result{ /** * create the OCS_Result object - * @param $data mixed the data to return + * @param mixed $data the data to return */ public function __construct($data=null, $code=100, $message=null) { if ($data === null) { @@ -42,7 +42,7 @@ class OC_OCS_Result{ /** * optionally set the total number of items available - * @param $items int + * @param int $items */ public function setTotalItems(int $items) { $this->items = $items; @@ -50,7 +50,7 @@ class OC_OCS_Result{ /** * optionally set the the number of items per page - * @param $items int + * @param int $items */ public function setItemsPerPage(int $items) { $this->perPage = $items; diff --git a/lib/private/ocsclient.php b/lib/private/ocsclient.php index b0480caf028d63a342173d436cd825f4147d30e9..fb8282747ebc4c02f22497540913f4a5511a391b 100644 --- a/lib/private/ocsclient.php +++ b/lib/private/ocsclient.php @@ -30,7 +30,7 @@ class OC_OCSClient{ /** * @brief Get the url of the OCS AppStore server. - * @returns string of the AppStore server + * @return string of the AppStore server * * This function returns the url of the OCS AppStore server. It´s possible * to set it in the config file or it will fallback to the default @@ -48,7 +48,7 @@ class OC_OCSClient{ /** * @brief Get the content of an OCS url call. - * @returns string of the response + * @return string of the response * This function calls an OCS server and returns the response. It also sets a sane timeout * @param string $url */ @@ -59,7 +59,7 @@ class OC_OCSClient{ /** * @brief Get all the categories from the OCS server - * @returns 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,10 +92,10 @@ class OC_OCSClient{ /** * @brief Get all the applications from the OCS server - * @returns 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 + * @param array|string $categories * @param int $page * @param string $filter */ @@ -150,7 +150,7 @@ class OC_OCSClient{ /** * @brief Get an the applications from the OCS server * @param string $id - * @returns 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 - * @returns 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 diff --git a/lib/private/preferences.php b/lib/private/preferences.php index d45e6e77089dea6fabfbb71141b54d0fc5d3dcaf..3cadb6a2e97d524d66379eb508696ebf1e74a6b7 100644 --- a/lib/private/preferences.php +++ b/lib/private/preferences.php @@ -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. diff --git a/lib/private/preview.php b/lib/private/preview.php index 2964b83c5081498fdb1a9c7905937e6e296c8801..eb932470a473dffc4b0d532c6c1acbd521ed9264 100755 --- a/lib/private/preview.php +++ b/lib/private/preview.php @@ -191,7 +191,7 @@ class Preview { /** * @brief set the path of the file you want a thumbnail from * @param string $file - * @return $this + * @return \OC\Preview $this */ public function setFile($file) { $this->file = $file; @@ -217,7 +217,7 @@ class Preview { * @brief set the the max width of the preview * @param int $maxX * @throws \Exception - * @return $this + * @return \OC\Preview $this */ public function setMaxX($maxX = 1) { if ($maxX <= 0) { @@ -238,7 +238,7 @@ class Preview { * @brief set the the max height of the preview * @param int $maxY * @throws \Exception - * @return $this + * @return \OC\Preview $this */ public function setMaxY($maxY = 1) { if ($maxY <= 0) { @@ -258,7 +258,7 @@ class Preview { /** * @brief set whether or not scalingup is enabled * @param bool $scalingUp - * @return $this + * @return \OC\Preview $this */ public function setScalingup($scalingUp) { if ($this->getMaxScaleFactor() === 1) { @@ -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) { @@ -750,7 +750,7 @@ class Preview { } /** - * @param $fileId + * @param int $fileId * @return string */ private function buildCachePath($fileId) { diff --git a/lib/private/request.php b/lib/private/request.php index 90f7488eea5b1e0a22e95867668c924343fb49ce..cf9a316b851e797646ff023ca23b088ee9810d4d 100755 --- a/lib/private/request.php +++ b/lib/private/request.php @@ -18,7 +18,7 @@ class OC_Request { /** * @brief Check overwrite condition * @param string $type - * @returns bool + * @return bool */ private static function isOverwriteCondition($type = '') { $regex = '/' . OC_Config::getValue('overwritecondaddr', '') . '/'; @@ -49,7 +49,7 @@ class OC_Request { /** * @brief Returns the unverified server host from the headers without checking * whether it is a trusted domain - * @returns string the server host + * @return string the server host * * Returns the server host, even if the website uses one or more * reverse proxies @@ -89,7 +89,7 @@ class OC_Request { /** * @brief Returns the server host from the headers, or the first configured * trusted domain if the host isn't in the trusted list - * @returns string the server host + * @return string the server host * * Returns the server host, even if the website uses one or more * reverse proxies @@ -121,7 +121,7 @@ class OC_Request { /** * @brief Returns the server protocol - * @returns string the server protocol + * @return string the server protocol * * Returns the server protocol. It respects reverse proxy servers and load balancers */ @@ -143,7 +143,7 @@ class OC_Request { /** * @brief Returns the request uri - * @returns string the request uri + * @return string the request uri * * Returns the request uri, even if the website uses one or more * reverse proxies diff --git a/lib/private/response.php b/lib/private/response.php index 4905c0a787b8736d8ae9dfb0cc26a0b0d6010dbe..f976925fb2e0336e46f114fba0321203bcdc1236 100644 --- a/lib/private/response.php +++ b/lib/private/response.php @@ -93,7 +93,7 @@ class OC_Response { /** * @brief Set reponse expire time - * @param $expires date-time when the response expires + * @param string|DateTime $expires date-time when the response expires * string for DateInterval from now * DateTime object when to expire response */ @@ -113,7 +113,7 @@ class OC_Response { /** * Checks and set ETag header, when the request matches sends a * 'not modified' response - * @param $etag token to use for modification check + * @param string $etag token to use for modification check */ static public function setETagHeader($etag) { if (empty($etag)) { @@ -131,7 +131,7 @@ class OC_Response { /** * Checks and set Last-Modified header, when the request matches sends a * 'not modified' response - * @param $lastModified time when the reponse was last modified + * @param int|DateTime|string $lastModified time when the reponse was last modified */ static public function setLastModifiedHeader($lastModified) { if (empty($lastModified)) { diff --git a/lib/private/route/route.php b/lib/private/route/route.php index df80facf9c15e6e09aeedaed244127853f952686..87030ad78530ee7da657efe64e9eb99e7cffe6df 100644 --- a/lib/private/route/route.php +++ b/lib/private/route/route.php @@ -124,7 +124,7 @@ class Route extends SymfonyRoute implements 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/private/route/router.php b/lib/private/route/router.php index 44b0b94150871b2a5edf10956580fc9d5e6a6b34..a72ac2bb3f16f732f7b9f8a48bd673d4319e42db 100644 --- a/lib/private/route/router.php +++ b/lib/private/route/router.php @@ -239,7 +239,7 @@ class Router implements IRouter { /** * To isolate the variable scope used inside the $file it is required in it's own method - * @param $file + * @param string $file */ private function requireRouteFile($file) { require_once $file; diff --git a/lib/private/share/helper.php b/lib/private/share/helper.php index 515ec85909aa1ff11146205c1bd156b930d574dd..bc83d56984021cc7feaaf685fab0bf08ad2bf142 100644 --- a/lib/private/share/helper.php +++ b/lib/private/share/helper.php @@ -25,13 +25,14 @@ class Helper extends \OC\Share\Constants { /** * Generate a unique target for the item - * @param string Item type - * @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 - * @param string User that is the owner of shared item - * @param string The suggested target originating from a reshare (optional) - * @param int The id of the parent group share (optional) + * @param string $itemType + * @param string $itemSource + * @param int $shareType SHARE_TYPE_USER, SHARE_TYPE_GROUP, or SHARE_TYPE_LINK + * @param string $shareWith User or group the item is being shared with + * @param string $uidOwner User that is the owner of shared item + * @param string $suggestedTarget The suggested target originating from a reshare (optional) + * @param int $groupParent The id of the parent group share (optional) + * @throws \Exception * @return string Item target */ public static function generateTarget($itemType, $itemSource, $shareType, $shareWith, $uidOwner, @@ -142,9 +143,9 @@ class Helper extends \OC\Share\Constants { /** * Delete all reshares of an item - * @param int Id of item to delete - * @param bool If true, exclude the parent from the delete (optional) - * @param string The user that the parent was shared with (optinal) + * @param int $parent Id of item to delete + * @param bool $excludeParent If true, exclude the parent from the delete (optional) + * @param string $uidOwner The user that the parent was shared with (optional) */ public static function delete($parent, $excludeParent = false, $uidOwner = null) { $ids = array($parent); diff --git a/lib/private/share/hooks.php b/lib/private/share/hooks.php index a33c71eedd2f80baf04a6907166a54b2a8b00a0a..9ac64d888ea8be7538ee15a00c588da8de015d86 100644 --- a/lib/private/share/hooks.php +++ b/lib/private/share/hooks.php @@ -22,9 +22,9 @@ namespace OC\Share; class Hooks extends \OC\Share\Constants { - /** + /** * Function that is called after a user is deleted. Cleans up the shares of that user. - * @param array arguments + * @param array $arguments */ public static function post_deleteUser($arguments) { // Delete any items shared with the deleted user @@ -42,7 +42,7 @@ class Hooks extends \OC\Share\Constants { /** * Function that is called after a user is added to a group. * TODO what does it do? - * @param array arguments + * @param array $arguments */ public static function post_addToGroup($arguments) { // Find the group shares and check if the user needs a unique target @@ -76,7 +76,7 @@ class Hooks extends \OC\Share\Constants { /** * Function that is called after a user is removed from a group. Shares are cleaned up. - * @param array arguments + * @param array $arguments */ public static function post_removeFromGroup($arguments) { $sql = 'SELECT `id`, `share_type` FROM `*PREFIX*share`' @@ -95,7 +95,7 @@ class Hooks extends \OC\Share\Constants { /** * Function that is called after a group is removed. Cleans up the shares to that group. - * @param array arguments + * @param array $arguments */ public static function post_deleteGroup($arguments) { $sql = 'SELECT `id` FROM `*PREFIX*share` WHERE `share_type` = ? AND `share_with` = ?'; diff --git a/lib/private/share/mailnotifications.php b/lib/private/share/mailnotifications.php index 4799db523303b682da3a832ece9e632554f89173..ca0dff6562d17e46d0f2509b05eb158c6a448bcc 100644 --- a/lib/private/share/mailnotifications.php +++ b/lib/private/share/mailnotifications.php @@ -21,11 +21,30 @@ namespace OC\Share; +use DateTime; + class MailNotifications { - private $senderId; // sender userId - private $from; // sender email address + /** + * sender userId + * @var null|string + */ + private $senderId; + + /** + * sender email address + * @var string + */ + private $from; + + /** + * @var string + */ private $senderDisplayName; + + /** + * @var \OC_L10N + */ private $l; /** @@ -50,8 +69,8 @@ class MailNotifications { * @brief inform users if a file was shared with them * * @param array $recipientList list of recipients - * @param type $itemSource shared item source - * @param type $itemType shared item type + * @param string $itemSource shared item source + * @param string $itemType shared item type * @return array list of user to whom the mail send operation failed */ public function sendInternalShareMail($recipientList, $itemSource, $itemType) { @@ -136,7 +155,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) { diff --git a/lib/private/share/searchresultsorter.php b/lib/private/share/searchresultsorter.php index 76abbf308460d076ad9ae5968e72c702f82c502c..91709902fffdf72ce000ec7a5dc0a9bf89aec62b 100644 --- a/lib/private/share/searchresultsorter.php +++ b/lib/private/share/searchresultsorter.php @@ -18,8 +18,8 @@ class SearchResultSorter { * @param string $search the search term as was given by the user * @param string $key the array key containing the value that should be compared * against - * @param $encoding optional, encoding to use, defaults to UTF-8 - * @param $log optional, an \OC\Log instance + * @param string $encoding optional, encoding to use, defaults to UTF-8 + * @param \OC\Log $log optional */ public function __construct($search, $key, \OC\Log $log = null, $encoding = 'UTF-8') { $this->encoding = $encoding; diff --git a/lib/private/share/share.php b/lib/private/share/share.php index 6f8830e73f27ec06c2656785346c8edd9616e924..a8537a916fbb2af513e6d75eef81a7816b93b89f 100644 --- a/lib/private/share/share.php +++ b/lib/private/share/share.php @@ -254,13 +254,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 boolean include collections (optional) - * @return Return depends on format + * @param string $itemType + * @param string $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 $limit Number of items to return (optional) Returns all by default + * @param boolean $includeCollections (optional) + * @return mixed Return depends on format */ public static function getItemsSharedWithUser($itemType, $user, $format = self::FORMAT_NONE, $parameters = null, $limit = -1, $includeCollections = false) { @@ -352,7 +352,7 @@ class Share extends \OC\Share\Constants { * @param string $itemType * @param string $itemSource * @param string $uidOwner Owner of link - * @return Item + * @return array */ public static function getItemSharedWithByLink($itemType, $itemSource, $uidOwner) { return self::getItems($itemType, $itemSource, self::SHARE_TYPE_LINK, null, $uidOwner, self::FORMAT_NONE, @@ -362,7 +362,7 @@ class Share extends \OC\Share\Constants { /** * Based on the given token the share information will be returned - password protected shares will be verified * @param string $token - * @return array | boolean false will be returned in case the token is unknown or unauthorized + * @return array|boolean false will be returned in case the token is unknown or unauthorized */ public static function getShareByToken($token, $checkPasswordProtection = true) { $query = \OC_DB::prepare('SELECT * FROM `*PREFIX*share` WHERE `token` = ?', 1); @@ -388,8 +388,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) { @@ -446,7 +446,7 @@ class Share extends \OC\Share\Constants { * @param string $uidOwner * @param boolean $includeCollections * @param boolean $checkExpireDate - * @return Return array of users + * @return array Return array of users */ public static function getUsersItemShared($itemType, $itemSource, $uidOwner, $includeCollections = false, $checkExpireDate = true) { @@ -926,6 +926,7 @@ class Share extends \OC\Share\Constants { /** * Get the backend class for the specified item type * @param string $itemType + * @throws \Exception * @return \OCP\Share_Backend */ public static function getBackend($itemType) { @@ -1000,10 +1001,10 @@ class Share extends \OC\Share\Constants { /** * Get shared items from the database * @param string $itemType - * @param string Item source or target (optional) + * @param string $item Item source or target (optional) * @param int $shareType SHARE_TYPE_USER, SHARE_TYPE_GROUP, SHARE_TYPE_LINK, $shareTypeUserAndGroups, or $shareTypeGroupUserUnique * @param string $shareWith User or group the item is being shared with - * @param string uidOwner User that is the owner of shared items (optional) + * @param string $uidOwner User that is the owner of shared items (optional) * @param int $format Format to convert items to with formatItems() (optional) * @param mixed $parameters to pass to formatItems() (optional) * @param int $limit Number of items to return, -1 to return all matches (optional) @@ -1353,6 +1354,7 @@ class Share extends \OC\Share\Constants { * @param boolean|array $parentFolder Parent folder target (optional) * @param string $token (optional) * @param string $itemSourceName name of the source item (optional) + * @throws \Exception * @return boolean Returns true on success or false on failure */ private static function put($itemType, $itemSource, $shareType, $shareWith, $uidOwner, @@ -1641,7 +1643,7 @@ class Share extends \OC\Share\Constants { } /** - * @breif construct select statement + * @brief construct select statement * @param int $format * @param boolean $fileDependent ist it a file/folder share or a generla share * @param string $uidOwner diff --git a/lib/private/subadmin.php b/lib/private/subadmin.php index 5b6072987ad54eb459f2beafd2b92f33a9942c57..3e8b73d55b0d5cea9b9bb2f81a64ef8147320e50 100644 --- a/lib/private/subadmin.php +++ b/lib/private/subadmin.php @@ -167,7 +167,7 @@ class OC_SubAdmin{ /** * @brief delete all SubAdmins by uid - * @param $parameters + * @param array $parameters * @return boolean */ public static function post_deleteUser($parameters) { @@ -178,7 +178,7 @@ class OC_SubAdmin{ /** * @brief delete all SubAdmins by gid - * @param $parameters + * @param array $parameters * @return boolean */ public static function post_deleteGroup($parameters) { diff --git a/lib/private/tags.php b/lib/private/tags.php index 2e786e3fd7bc6e451b75b2f5027890587416ad1c..0b62caf2dd89102d280228878b9d9e3fc4bb7481 100644 --- a/lib/private/tags.php +++ b/lib/private/tags.php @@ -393,7 +393,7 @@ class Tags implements \OCP\ITags { * * For hooking up on post_deleteUser * - * @param array + * @param array $arguments */ public static function post_deleteUser($arguments) { // Find all objectid/tagId pairs. diff --git a/lib/private/template/functions.php b/lib/private/template/functions.php index 3c42d441efacb2944aadd8778baecfeb597cacb1..3f5312c0a7b16894f087fff9c890e84cea994e90 100644 --- a/lib/private/template/functions.php +++ b/lib/private/template/functions.php @@ -70,8 +70,8 @@ function mimetype_icon( $mimetype ) { /** * @brief make preview_icon available as a simple function * Returns the path to the preview of the image. - * @param $path path of file - * @returns link to the preview + * @param string $path path of file + * @return link to the preview * * For further information have a look at OC_Helper::previewIcon */ diff --git a/lib/private/template/resourcelocator.php b/lib/private/template/resourcelocator.php index 8a3dd5e7fa90e5c0ed47f3e08634fa4062362ddf..900aa6a8f08d24d7659bdcbff1b251a7c1083c90 100644 --- a/lib/private/template/resourcelocator.php +++ b/lib/private/template/resourcelocator.php @@ -53,13 +53,9 @@ abstract class ResourceLocator { /* * @brief append the $file resource if exist at $root - * @param $root path to check - * @param $file the filename - * @param $web base for path, default map $root to $webroot - */ - /** - * @param string $file - * @param string|false $webroot + * @param string $root path to check + * @param string $file the filename + * @param string|null $webroot base for path, default map $root to $webroot */ protected function appendIfExist($root, $file, $webroot = null) { if (is_file($root.'/'.$file)) { diff --git a/lib/private/templatelayout.php b/lib/private/templatelayout.php index b7ac02a753d27f06474f48b1bad475f678d57890..0672ffc4a3d77641e42eec4cbbd703b7b15c0ef7 100644 --- a/lib/private/templatelayout.php +++ b/lib/private/templatelayout.php @@ -98,7 +98,7 @@ class OC_TemplateLayout extends OC_Template { } /** - * @param $styles + * @param array $styles * @return array */ static public function findStylesheetFiles($styles) { @@ -116,7 +116,7 @@ class OC_TemplateLayout extends OC_Template { } /** - * @param $scripts + * @param array $scripts * @return array */ static public function findJavascriptFiles($scripts) { @@ -175,7 +175,7 @@ class OC_TemplateLayout extends OC_Template { } /** - * @param $files + * @param array $files * @return string */ private static function hashScriptNames($files) diff --git a/lib/private/updater.php b/lib/private/updater.php index 7b09f58017615a2e0bb13df251152bb52adc782c..d8694ac6ed5dfdd37abf840f740714c7d59f4c8b 100644 --- a/lib/private/updater.php +++ b/lib/private/updater.php @@ -35,7 +35,7 @@ class Updater extends BasicEmitter { /** * Check if a new version is available * @param string $updaterUrl the url to check, i.e. 'http://apps.owncloud.com/updater.php' - * @return array | bool + * @return array|bool */ public function check($updaterUrl) { diff --git a/lib/private/urlgenerator.php b/lib/private/urlgenerator.php index a56b0fe3378040d3cc618d66e0cb862e042ed3e6..b37ef89d40d41e3b853e944b6c03c43c82e903b5 100644 --- a/lib/private/urlgenerator.php +++ b/lib/private/urlgenerator.php @@ -30,7 +30,7 @@ class URLGenerator implements IURLGenerator { /** * @brief 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 diff --git a/lib/private/user.php b/lib/private/user.php index 7106d664aca74a672f4bfe4829a5b5da75f4b65b..90aac88cdc8557c8894993e9daa91298b9a27c67 100644 --- a/lib/private/user.php +++ b/lib/private/user.php @@ -77,7 +77,7 @@ class OC_User { /** * @brief gets available backends * @deprecated - * @returns 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 - * @returns array of backends + * @return array an array of backends * * Returns the names of all used backends. */ @@ -98,7 +98,7 @@ class OC_User { /** * @brief Adds the backend to the list of used backends - * @param string | OC_User_Backend $backend default: database The backend to use for user management + * @param string|OC_User_Interface $backend default: database The backend to use for user management * @return bool * * Set the User Authentication Module @@ -321,7 +321,7 @@ class OC_User { /** * @brief Check if the user is logged in - * @returns bool + * @return bool * * Checks if the user is logged in */ @@ -517,7 +517,7 @@ class OC_User { /** * @brief Get a list of all users - * @returns array with all uids + * @return array an array of all uids * * Get a list of all users. * @param string $search diff --git a/lib/private/user/backend.php b/lib/private/user/backend.php index f4e5618e04ad11c93dff1e626596cc1fd3d900bb..8d2f0e935de3038d07221ec4c7c375d6e972f5db 100644 --- a/lib/private/user/backend.php +++ b/lib/private/user/backend.php @@ -103,7 +103,7 @@ abstract class OC_User_Backend implements OC_User_Interface { /** * @brief Get a list of all users - * @returns 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 - * @returns 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. */ diff --git a/lib/private/user/database.php b/lib/private/user/database.php index dec38464f987dc1cb6a32e1015af809646044845..747895a8a954ae1545689e2660219772cfe7d425 100644 --- a/lib/private/user/database.php +++ b/lib/private/user/database.php @@ -57,9 +57,9 @@ class OC_User_Database extends OC_User_Backend { /** * @brief Create a new user - * @param $uid The username of the user to create - * @param $password The password of the new user - * @returns true/false + * @param string $uid The username of the user to create + * @param string $password The password of the new user + * @return bool * * Creates a new user. Basic checking of username is done in OC_User * itself, not in its subclasses. @@ -79,8 +79,8 @@ class OC_User_Database extends OC_User_Backend { /** * @brief delete a user - * @param $uid The username of the user to delete - * @returns true/false + * @param string $uid The username of the user to delete + * @return bool * * Deletes a user */ @@ -98,9 +98,9 @@ class OC_User_Database extends OC_User_Backend { /** * @brief Set password - * @param $uid The username - * @param $password The new password - * @returns true/false + * @param string $uid The username + * @param string $password The new password + * @return bool * * Change the password of a user */ @@ -119,9 +119,9 @@ class OC_User_Database extends OC_User_Backend { /** * @brief Set display name - * @param $uid The username - * @param $displayName The new display name - * @returns true/false + * @param string $uid The username + * @param string $displayName The new display name + * @return bool * * Change the display name of a user */ @@ -139,7 +139,7 @@ class OC_User_Database extends OC_User_Backend { /** * @brief get display name of the user - * @param $uid user ID of the user + * @param string $uid user ID of the user * @return string display name */ public function getDisplayName($uid) { @@ -149,7 +149,7 @@ class OC_User_Database extends OC_User_Backend { /** * @brief Get a list of all display names - * @returns 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. */ @@ -169,9 +169,9 @@ class OC_User_Database extends OC_User_Backend { /** * @brief Check if the password is correct - * @param $uid The username - * @param $password The password - * @returns string + * @param string $uid The username + * @param string $password The password + * @return string * * Check if the password is correct without logging in the user * returns the user id or false @@ -203,7 +203,7 @@ class OC_User_Database extends OC_User_Backend { /** * @brief Load an user in the cache * @param string $uid the username - * @returns boolean + * @return boolean */ private function loadUser($uid) { if (empty($this->cache[$uid])) { @@ -226,7 +226,7 @@ class OC_User_Database extends OC_User_Backend { /** * @brief Get a list of all users - * @returns array with all uids + * @return array an array of all uids * * Get a list of all users. */ @@ -273,7 +273,7 @@ class OC_User_Database extends OC_User_Backend { /** * counts the users in the database * - * @return int | bool + * @return int|bool */ public function countUsers() { $query = OC_DB::prepare('SELECT COUNT(*) FROM `*PREFIX*users`'); diff --git a/lib/private/user/dummy.php b/lib/private/user/dummy.php index 2fb51d02de39ac24bcc5a65d0ef1d4e7b974b340..d2ada37c80faa837d1d7496b84459cf5ac8a6ed0 100644 --- a/lib/private/user/dummy.php +++ b/lib/private/user/dummy.php @@ -127,7 +127,7 @@ class OC_User_Dummy extends OC_User_Backend { /** * counts the users in the database * - * @return int | bool + * @return int|bool */ public function countUsers() { return 0; diff --git a/lib/private/user/example.php b/lib/private/user/example.php index b2d0dc2541036554630b1e93ca6837eaa05d4439..4bf3652330e8484f55aafa749e2f0899b21ed797 100644 --- a/lib/private/user/example.php +++ b/lib/private/user/example.php @@ -28,9 +28,9 @@ abstract class OC_User_Example extends OC_User_Backend { /** * @brief Create a new user - * @param $uid The username of the user to create - * @param $password The password of the new user - * @returns true/false + * @param string $uid The username of the user to create + * @param string $password The password of the new user + * @return bool * * Creates a new user. Basic checking of username is done in OC_User * itself, not in its subclasses. @@ -39,9 +39,9 @@ abstract class OC_User_Example extends OC_User_Backend { /** * @brief Set password - * @param $uid The username - * @param $password The new password - * @returns true/false + * @param string $uid The username + * @param string $password The new password + * @return bool * * Change the password of a user */ @@ -49,9 +49,9 @@ abstract class OC_User_Example extends OC_User_Backend { /** * @brief Check if the password is correct - * @param $uid The username - * @param $password The password - * @returns string + * @param string $uid The username + * @param string $password The password + * @return string * * Check if the password is correct without logging in the user * returns the user id or false @@ -60,8 +60,8 @@ abstract class OC_User_Example extends OC_User_Backend { /** * @brief get the user's home directory - * @param $uid The username - * @returns string + * @param string $uid The username + * @return string * * get the user's home directory * returns the path or false diff --git a/lib/private/user/http.php b/lib/private/user/http.php index a03945210120cd646e525d891dd629ca4355dd9b..67f7156b4982d91fc47d5e75ca5c6df82a650e22 100644 --- a/lib/private/user/http.php +++ b/lib/private/user/http.php @@ -27,7 +27,7 @@ class OC_User_HTTP extends OC_User_Backend { /** * split http://user@host/path into a user and url part - * @param string path + * @param string $url * @return array */ private function parseUrl($url) { @@ -46,7 +46,7 @@ class OC_User_HTTP extends OC_User_Backend { /** * check if an url is a valid login - * @param string url + * @param string $url * @return boolean */ private function matchUrl($url) { @@ -55,9 +55,9 @@ class OC_User_HTTP extends OC_User_Backend { /** * @brief Check if the password is correct - * @param $uid The username - * @param $password The password - * @returns string + * @param string $uid The username + * @param string $password The password + * @return string * * Check if the password is correct without logging in the user * returns the user id or false diff --git a/lib/private/user/interface.php b/lib/private/user/interface.php index cdcab3e5d00d9b58a29b0fc623579f33d4335ea8..e130e5b569c15746f7a32b1b30ee0ae022893cb9 100644 --- a/lib/private/user/interface.php +++ b/lib/private/user/interface.php @@ -26,27 +26,23 @@ interface OC_User_Interface { /** * @brief Check if backend implements actions * @param $actions bitwise-or'ed actions - * @returns boolean + * @return boolean * * Returns the supported actions as int to be * compared with OC_USER_BACKEND_CREATE_USER etc. - * @return boolean */ public function implementsActions($actions); /** * @brief delete a user - * @param $uid The username of the user to delete - * @returns true/false - * - * Deletes a user - * @return boolean + * @param string $uid The username of the user to delete + * @return bool */ public function deleteUser($uid); /** * @brief Get a list of all users - * @returns array with all uids + * @return array an array of all uids * * Get a list of all users. */ @@ -61,14 +57,14 @@ interface OC_User_Interface { /** * @brief get display name of the user - * @param $uid user ID of the user - * @return display name + * @param string $uid user ID of the user + * @return string display name */ public function getDisplayName($uid); /** * @brief Get a list of all display names - * @returns 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. */ diff --git a/lib/private/user/manager.php b/lib/private/user/manager.php index 6f6fd80a8ef4dc2c0866323e38c17e5538351a60..0fcf1ceb6ab76112f6aa0e50fb70e0eddf80bc99 100644 --- a/lib/private/user/manager.php +++ b/lib/private/user/manager.php @@ -26,7 +26,7 @@ use OC\Hooks\PublicEmitter; */ class Manager extends PublicEmitter { /** - * @var \OC_User_Backend[] $backends + * @var \OC_User_Interface[] $backends */ private $backends = array(); @@ -57,7 +57,7 @@ class Manager extends PublicEmitter { /** * register a user backend * - * @param \OC_User_Backend $backend + * @param \OC_User_Interface $backend */ public function registerBackend($backend) { $this->backends[] = $backend; @@ -66,7 +66,7 @@ class Manager extends PublicEmitter { /** * remove a user backend * - * @param \OC_User_Backend $backend + * @param \OC_User_Interface $backend */ public function removeBackend($backend) { $this->cachedUsers = array(); @@ -105,7 +105,7 @@ class Manager extends PublicEmitter { * get or construct the user object * * @param string $uid - * @param \OC_User_Backend $backend + * @param \OC_User_Interface $backend * @return \OC\User\User */ protected function getUserObject($uid, $backend) { @@ -222,7 +222,7 @@ class Manager extends PublicEmitter { * @param string $uid * @param string $password * @throws \Exception - * @return bool | \OC\User\User the created user of false + * @return bool|\OC\User\User the created user of false */ public function createUser($uid, $password) { $l = \OC_L10N::get('lib'); @@ -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(); diff --git a/lib/private/user/session.php b/lib/private/user/session.php index 1740bad5abec22b1fdfa0aaf078e1c7dbb4b7fb8..3d10b134b83c989a12d6bc4b06f9276fceff337b 100644 --- a/lib/private/user/session.php +++ b/lib/private/user/session.php @@ -82,7 +82,7 @@ class Session implements Emitter, \OCP\IUserSession { /** * set the currently active user * - * @param \OC\User\User $user + * @param \OC\User\User|null $user */ public function setUser($user) { if (is_null($user)) { @@ -115,7 +115,7 @@ class Session implements Emitter, \OCP\IUserSession { /** * set the login name * - * @param string $loginName for the logged in user + * @param string|null $loginName for the logged in user */ public function setLoginName($loginName) { if (is_null($loginName)) { @@ -191,7 +191,7 @@ class Session implements Emitter, \OCP\IUserSession { $expires = time() + \OC_Config::getValue('remember_login_cookie_lifetime', 60 * 60 * 24 * 15); setcookie("oc_username", $username, $expires, \OC::$WEBROOT, '', $secure_cookie); setcookie("oc_token", $token, $expires, \OC::$WEBROOT, '', $secure_cookie, true); - setcookie("oc_remember_login", true, $expires, \OC::$WEBROOT, '', $secure_cookie); + setcookie("oc_remember_login", "1", $expires, \OC::$WEBROOT, '', $secure_cookie); } /** diff --git a/lib/private/user/user.php b/lib/private/user/user.php index ef5364cbf7b50d3c0fdbd8332194a134ae5d8e21..229cbf68ff1399695b4d33f17997252931e7f68d 100644 --- a/lib/private/user/user.php +++ b/lib/private/user/user.php @@ -23,7 +23,7 @@ class User { private $displayName; /** - * @var \OC_User_Backend $backend + * @var \OC_User_Interface $backend */ private $backend; @@ -33,7 +33,7 @@ class User { private $enabled; /** - * @var Emitter | Manager $emitter + * @var Emitter|Manager $emitter */ private $emitter; @@ -49,7 +49,7 @@ class User { /** * @param string $uid - * @param \OC_User_Backend $backend + * @param \OC_User_Interface $backend * @param \OC\Hooks\Emitter $emitter * @param \OC\AllConfig $config */ diff --git a/lib/private/util.php b/lib/private/util.php index 96d80beb4d1a4b2959ea51775999669da05ef524..f76ee7b338a47984fbc8f07d87b04bd32c0e9e60 100755 --- a/lib/private/util.php +++ b/lib/private/util.php @@ -818,8 +818,8 @@ class OC_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 with sanitized strings or a single sanitized string, depends on the input parameter. + * @param string|array &$value + * @return string|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)) { @@ -1028,8 +1028,8 @@ class OC_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 * Please also update secureRNGAvailable if you change something here */ public static function generateRandomBytes($length = 30) { @@ -1113,7 +1113,7 @@ class OC_Util { curl_setopt($curl, CURLOPT_PROXYUSERPWD, OC_Config::getValue('proxyuserpwd')); } - if (ini_get('open_basedir') === '' && ini_get('safe_mode' === 'Off')) { + if (ini_get('open_basedir') === '' && ini_get('safe_mode') === 'Off') { curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); curl_setopt($curl, CURLOPT_MAXREDIRS, $max_redirects); $data = curl_exec($curl); @@ -1287,7 +1287,7 @@ class OC_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) { diff --git a/lib/private/vobject.php b/lib/private/vobject.php index a3e9f7ef790191f2655d891a3507c1c468230121..e472429b23eb8bece18280c4f93ad51f572672b8 100644 --- a/lib/private/vobject.php +++ b/lib/private/vobject.php @@ -25,28 +25,28 @@ */ class OC_VObject{ /** @var Sabre\VObject\Component */ - protected $vobject; + protected $vObject; /** - * @returns Sabre\VObject\Component + * @return Sabre\VObject\Component */ public function getVObject() { - return $this->vobject; + return $this->vObject; } /** * @brief Parses the VObject * @param string $data VObject as string - * @returns Sabre\VObject\Reader|null + * @return Sabre\VObject\Reader|null */ public static function parse($data) { try { Sabre\VObject\Property::$classMap['LAST-MODIFIED'] = 'Sabre\VObject\Property\DateTime'; - $vobject = Sabre\VObject\Reader::read($data); - if ($vobject instanceof Sabre\VObject\Component) { - $vobject = new OC_VObject($vobject); + $vObject = Sabre\VObject\Reader::read($data); + if ($vObject instanceof Sabre\VObject\Component) { + $vObject = new OC_VObject($vObject); } - return $vobject; + return $vObject; } catch (Exception $e) { OC_Log::write('vobject', $e->getMessage(), OC_Log::ERROR); return null; @@ -89,26 +89,26 @@ class OC_VObject{ /** * Constructor - * @param Sabre\VObject\Component or string + * @param Sabre\VObject\Component|string $vobject_or_name */ public function __construct($vobject_or_name) { if (is_object($vobject_or_name)) { - $this->vobject = $vobject_or_name; + $this->vObject = $vobject_or_name; } else { - $this->vobject = new Sabre\VObject\Component($vobject_or_name); + $this->vObject = new Sabre\VObject\Component($vobject_or_name); } } /** * @todo Write documentation - * @param $item + * @param \OC_VObject|\Sabre\VObject\Component $item * @param null $itemValue */ public function add($item, $itemValue = null) { if ($item instanceof OC_VObject) { $item = $item->getVObject(); } - $this->vobject->add($item, $itemValue); + $this->vObject->add($item, $itemValue); } /** @@ -116,7 +116,7 @@ class OC_VObject{ * @param object $name of property * @param object $value of property * @param array|object $parameters of property - * @returns Sabre\VObject\Property newly created + * @return Sabre\VObject\Property newly created */ public function addProperty($name, $value, $parameters=array()) { if(is_array($value)) { @@ -127,26 +127,26 @@ class OC_VObject{ $property->parameters[] = new Sabre\VObject\Parameter($name, $value); } - $this->vobject->add($property); + $this->vObject->add($property); return $property; } public function setUID() { $uid = substr(md5(rand().time()), 0, 10); - $this->vobject->add('UID', $uid); + $this->vObject->add('UID', $uid); } /** * @todo Write documentation - * @param mixed $name + * @param mixed $name * @param string $string */ public function setString($name, $string) { if ($string != '') { $string = strtr($string, array("\r\n"=>"\n")); - $this->vobject->__set($name, $string); + $this->vObject->__set($name, $string); }else{ - $this->vobject->__unset($name); + $this->vObject->__unset($name); } } @@ -167,31 +167,31 @@ class OC_VObject{ if ($datetime instanceof DateTime) { $datetime_element = new Sabre\VObject\Property\DateTime($name); $datetime_element->setDateTime($datetime, $dateType); - $this->vobject->__set($name, $datetime_element); + $this->vObject->__set($name, $datetime_element); }else{ - $this->vobject->__unset($name); + $this->vObject->__unset($name); } } /** * @todo Write documentation - * @param $name + * @param string $name * @return string */ public function getAsString($name) { - return $this->vobject->__isset($name) ? - $this->vobject->__get($name)->value : + return $this->vObject->__isset($name) ? + $this->vObject->__get($name)->value : ''; } /** * @todo Write documentation - * @param $name + * @param string $name * @return array */ public function getAsArray($name) { $values = array(); - if ($this->vobject->__isset($name)) { + if ($this->vObject->__isset($name)) { $values = explode(',', $this->getAsString($name)); $values = array_map('trim', $values); } @@ -200,14 +200,14 @@ class OC_VObject{ /** * @todo Write documentation - * @param $name + * @param string $name * @return array|OC_VObject|\Sabre\VObject\Property */ public function &__get($name) { if ($name == 'children') { - return $this->vobject->children; + return $this->vObject->children; } - $return = $this->vobject->__get($name); + $return = $this->vObject->__get($name); if ($return instanceof Sabre\VObject\Component) { $return = new OC_VObject($return); } @@ -220,7 +220,7 @@ class OC_VObject{ * @param string $value */ public function __set($name, $value) { - return $this->vobject->__set($name, $value); + return $this->vObject->__set($name, $value); } /** @@ -228,7 +228,7 @@ class OC_VObject{ * @param string $name */ public function __unset($name) { - return $this->vobject->__unset($name); + return $this->vObject->__unset($name); } /** @@ -237,16 +237,16 @@ class OC_VObject{ * @return bool */ public function __isset($name) { - return $this->vobject->__isset($name); + return $this->vObject->__isset($name); } /** * @todo Write documentation - * @param $function - * @param $arguments + * @param callable $function + * @param array $arguments * @return mixed */ public function __call($function, $arguments) { - return call_user_func_array(array($this->vobject, $function), $arguments); + return call_user_func_array(array($this->vObject, $function), $arguments); } } diff --git a/lib/public/app.php b/lib/public/app.php index 96162299ec492ea3ab42265a0df3a32c5d67550b..bef4e96ae02d0a5e605962df01646328416d5e2d 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 03b94403b4772995a8b248c865c2b27e4f135b22..562228e1e52f3e291d4245bda2cd45e3a453b913 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(); @@ -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(); diff --git a/lib/public/backgroundjob/ijoblist.php b/lib/public/backgroundjob/ijoblist.php index c9b546605b8cd5ce60caf9b6be060997b87cce98..366b0e373683bc940da2e2ec0049dc9483eb3a3f 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 1b61d7aa4ff22b6201a8bfe407eaec0b7f8ddf9b..fb88c13bd1b4067c945a3039fcf5baae3712c02c 100644 --- a/lib/public/contacts.php +++ b/lib/public/contacts.php @@ -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(); @@ -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,12 +111,12 @@ 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 - * @return array representing the contact just 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) { $cm = \OC::$server->getContactsManager(); - return $cm->search($properties, $address_book_key); + return $cm->createOrUpdate($properties, $address_book_key); } /** diff --git a/lib/public/contacts/imanager.php b/lib/public/contacts/imanager.php index 005b71f298bdfac8ee685b63d84f5e5c2b0195da..325592200912d6f0f4ff0f68c4505b30bef5424c 100644 --- a/lib/public/contacts/imanager.php +++ b/lib/public/contacts/imanager.php @@ -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); diff --git a/lib/public/db.php b/lib/public/db.php index cb876b4d1f9f1a66a269812da79abba01fb8619e..ba3a4724ce012fe3ad13d24bfe2afbf44f1462e6 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/files/fileinfo.php b/lib/public/files/fileinfo.php index 37162e09336ea79272a376df67ae7e6164ea0268..bf0c31918cbb36190191d52992e6602aa5a601db 100644 --- a/lib/public/files/fileinfo.php +++ b/lib/public/files/fileinfo.php @@ -104,7 +104,7 @@ interface FileInfo { /** * Check whether this is a file or a folder * - * @return \OCP\Files\FileInfo::TYPE_FILE | \OCP\Files\FileInfo::TYPE_FOLDER + * @return \OCP\Files\FileInfo::TYPE_FILE|\OCP\Files\FileInfo::TYPE_FOLDER */ public function getType(); diff --git a/lib/public/iaddressbook.php b/lib/public/iaddressbook.php index dcfe08012e67dbfc74a358883a30bcda976c90e4..70309e8c57a48082b72aeb982d823731e87bb4f7 100644 --- a/lib/public/iaddressbook.php +++ b/lib/public/iaddressbook.php @@ -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 diff --git a/lib/public/iappconfig.php b/lib/public/iappconfig.php index 2b014df2e420ded8bb221d7845c5948bb27d182c..16c0752f073908cd9cb668440461106bc280d539 100644 --- a/lib/public/iappconfig.php +++ b/lib/public/iappconfig.php @@ -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. diff --git a/lib/public/iavatar.php b/lib/public/iavatar.php index 43fa32556de5a8f284d6022035b9c45a5c9666b8..fc7e8e79fed64665f0f501e291e605fad71ad20b 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 9b185ae0467b90897327993fd00bf9e5b7f62d35..b09b456a0daa2780ad2570fc2d27428028585469 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 656b5e7e5b299723c76f6737f3a1a262d09509a5..3e6624e07e942079f2c2d771cc4f884d5203b76d 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 1388274c21af4cd2e15379b2e1edafad2293ccf0..c228be6a0a34799b6a334c3127fac6821eae0f80 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/itags.php b/lib/public/itags.php index f8ebaa668f1fddaf55ff5e718c287d4be74248dc..1cba07e9b5377555730531404df0b22ef7b68193 100644 --- a/lib/public/itags.php +++ b/lib/public/itags.php @@ -62,7 +62,7 @@ interface ITags { * ['id' => 1, 'name' = 'Second tag'], * ] * - * @returns array + * @return array */ public function getTags(); diff --git a/lib/public/route/iroute.php b/lib/public/route/iroute.php index d5610e762a82f0e94b701834155ce954448d41dc..f511e7af72097e28578bb92c926033623f07ed43 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 b21b3a7b9639b634a84af636210d693185139f78..33c5069ac577a09a8d7f525505693f0c78ef21b5 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, @@ -160,7 +160,7 @@ class Share extends \OC\Share\Constants { /** * Based on the given token the share information will be returned - password protected shares will be verified * @param string $token - * @return array | bool false will be returned in case the token is unknown or unauthorized + * @return array|bool false will be returned in case the token is unknown or unauthorized */ public static function getShareByToken($token, $checkPasswordProtection = true) { return \OC\Share\Share::getShareByToken($token, $checkPasswordProtection); @@ -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 6cc984b12d5f03ed119877db758553797133a261..b1264e0c3ad2c90e71f4c9332eebcc2b06b8acca 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 7bac938b838815eb628f8416b4d2bd46c5f84648..925410d37d54946122dcb1dc40bbc473ed30cf06 100644 --- a/lib/public/user.php +++ b/lib/public/user.php @@ -45,10 +45,10 @@ class User { /** * Get a list of all users - * @param string search pattern - * @param integer $limit - * @param integer $offset - * @return array with all uids + * @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 ) { return \OC_User::getUsers( $search, $limit, $offset ); @@ -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,10 +65,10 @@ class User { /** * Get a list of all display names and user ids. - * @param string search pattern - * @param int limit - * @param int offset - * @return array with all display names (value) and the correspondig uids (key) + * @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 ) { return \OC_User::getDisplayNames( $search, $limit, $offset ); diff --git a/lib/public/util.php b/lib/public/util.php index 3b0fc09f7e5a6baf59fe42f273a84629dc614372..8aeb03aef8ee6f41f9a25d8479af7f11f5d02e5a 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 @@ -293,7 +293,7 @@ class Util { /** * Returns the script name, even if the website uses one or more reverse proxies - * @returns string the script name + * @return string the script name */ public static function getScriptName() { return(\OC_Request::scriptName()); @@ -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 with 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); diff --git a/tests/lib/group/group.php b/tests/lib/group/group.php index 990f8ecc1d5146f5a8b5624da260f0b31845cd25..4d15999a8261b4fda30e1bc0716258285d4b616f 100644 --- a/tests/lib/group/group.php +++ b/tests/lib/group/group.php @@ -17,9 +17,10 @@ class Group extends \PHPUnit_Framework_TestCase { */ protected function getUserManager() { $userManager = $this->getMock('\OC\User\Manager'); - $user1 = new User('user1', null); - $user2 = new User('user2', null); - $user3 = new User('user3', null); + $backend = $this->getMock('\OC_User_Backend'); + $user1 = new User('user1', $backend); + $user2 = new User('user2', $backend); + $user3 = new User('user3', $backend); $userManager->expects($this->any()) ->method('get') ->will($this->returnValueMap(array( @@ -79,6 +80,7 @@ class Group extends \PHPUnit_Framework_TestCase { public function testInGroupSingleBackend() { $backend = $this->getMock('OC_Group_Database'); $userManager = $this->getUserManager(); + $userBackend = $this->getMock('\OC_User_Backend'); $group = new \OC\Group\Group('group1', array($backend), $userManager); $backend->expects($this->once()) @@ -86,13 +88,14 @@ class Group extends \PHPUnit_Framework_TestCase { ->with('user1', 'group1') ->will($this->returnValue(true)); - $this->assertTrue($group->inGroup(new User('user1', null))); + $this->assertTrue($group->inGroup(new User('user1', $userBackend))); } public function testInGroupMultipleBackends() { $backend1 = $this->getMock('OC_Group_Database'); $backend2 = $this->getMock('OC_Group_Database'); $userManager = $this->getUserManager(); + $userBackend = $this->getMock('\OC_User_Backend'); $group = new \OC\Group\Group('group1', array($backend1, $backend2), $userManager); $backend1->expects($this->once()) @@ -105,12 +108,13 @@ class Group extends \PHPUnit_Framework_TestCase { ->with('user1', 'group1') ->will($this->returnValue(true)); - $this->assertTrue($group->inGroup(new User('user1', null))); + $this->assertTrue($group->inGroup(new User('user1', $userBackend))); } public function testAddUser() { $backend = $this->getMock('OC_Group_Database'); $userManager = $this->getUserManager(); + $userBackend = $this->getMock('\OC_User_Backend'); $group = new \OC\Group\Group('group1', array($backend), $userManager); $backend->expects($this->once()) @@ -125,12 +129,13 @@ class Group extends \PHPUnit_Framework_TestCase { ->method('addToGroup') ->with('user1', 'group1'); - $group->addUser(new User('user1', null)); + $group->addUser(new User('user1', $userBackend)); } public function testAddUserAlreadyInGroup() { $backend = $this->getMock('OC_Group_Database'); $userManager = $this->getUserManager(); + $userBackend = $this->getMock('\OC_User_Backend'); $group = new \OC\Group\Group('group1', array($backend), $userManager); $backend->expects($this->once()) @@ -144,12 +149,13 @@ class Group extends \PHPUnit_Framework_TestCase { $backend->expects($this->never()) ->method('addToGroup'); - $group->addUser(new User('user1', null)); + $group->addUser(new User('user1', $userBackend)); } public function testRemoveUser() { $backend = $this->getMock('OC_Group_Database'); $userManager = $this->getUserManager(); + $userBackend = $this->getMock('\OC_User_Backend'); $group = new \OC\Group\Group('group1', array($backend), $userManager); $backend->expects($this->once()) @@ -164,12 +170,13 @@ class Group extends \PHPUnit_Framework_TestCase { ->method('removeFromGroup') ->with('user1', 'group1'); - $group->removeUser(new User('user1', null)); + $group->removeUser(new User('user1', $userBackend)); } public function testRemoveUserNotInGroup() { $backend = $this->getMock('OC_Group_Database'); $userManager = $this->getUserManager(); + $userBackend = $this->getMock('\OC_User_Backend'); $group = new \OC\Group\Group('group1', array($backend), $userManager); $backend->expects($this->once()) @@ -183,13 +190,14 @@ class Group extends \PHPUnit_Framework_TestCase { $backend->expects($this->never()) ->method('removeFromGroup'); - $group->removeUser(new User('user1', null)); + $group->removeUser(new User('user1', $userBackend)); } public function testRemoveUserMultipleBackends() { $backend1 = $this->getMock('OC_Group_Database'); $backend2 = $this->getMock('OC_Group_Database'); $userManager = $this->getUserManager(); + $userBackend = $this->getMock('\OC_User_Backend'); $group = new \OC\Group\Group('group1', array($backend1, $backend2), $userManager); $backend1->expects($this->once()) @@ -216,7 +224,7 @@ class Group extends \PHPUnit_Framework_TestCase { ->method('removeFromGroup') ->with('user1', 'group1'); - $group->removeUser(new User('user1', null)); + $group->removeUser(new User('user1', $userBackend)); } public function testSearchUsers() { diff --git a/tests/lib/group/manager.php b/tests/lib/group/manager.php index 9d1f175c1090e0c9261e8193d117f34e892e8488..061c9e7ea34d058dc6e5feaef183e13a2257fe0a 100644 --- a/tests/lib/group/manager.php +++ b/tests/lib/group/manager.php @@ -294,10 +294,11 @@ class Manager extends \PHPUnit_Framework_TestCase { * @var \OC\User\Manager $userManager */ $userManager = $this->getMock('\OC\User\Manager'); + $userBackend = $this->getMock('\OC_User_Backend'); $manager = new \OC\Group\Manager($userManager); $manager->addBackend($backend); - $groups = $manager->getUserGroups(new User('user1', null)); + $groups = $manager->getUserGroups(new User('user1', $userBackend)); $this->assertEquals(1, count($groups)); $group1 = $groups[0]; $this->assertEquals('group1', $group1->getGID()); @@ -332,11 +333,12 @@ class Manager extends \PHPUnit_Framework_TestCase { * @var \OC\User\Manager $userManager */ $userManager = $this->getMock('\OC\User\Manager'); + $userBackend = $this->getMock('\OC_User_Backend'); $manager = new \OC\Group\Manager($userManager); $manager->addBackend($backend1); $manager->addBackend($backend2); - $groups = $manager->getUserGroups(new User('user1', null)); + $groups = $manager->getUserGroups(new User('user1', $userBackend)); $this->assertEquals(2, count($groups)); $group1 = $groups[0]; $group2 = $groups[1]; @@ -345,10 +347,12 @@ class Manager extends \PHPUnit_Framework_TestCase { } public function testDisplayNamesInGroupMultipleUserBackends() { - $user1 = new User('user1', null); - $user2 = new User('user2', null); - $user3 = new User('user3', null); - $user4 = new User('user33', null); + $userBackend = $this->getMock('\OC_User_Backend'); + + $user1 = new User('user1', $userBackend); + $user2 = new User('user2', $userBackend); + $user3 = new User('user3', $userBackend); + $user4 = new User('user33', $userBackend); /** * @var \PHPUnit_Framework_MockObject_MockObject | \OC_Group_Backend $backend1 @@ -368,6 +372,7 @@ class Manager extends \PHPUnit_Framework_TestCase { * @var \OC\User\Manager $userManager */ $userManager = $this->getMock('\OC\User\Manager'); + $userBackend = $this->getMock('\OC_User_Backend'); $userManager->expects($this->once()) ->method('search') ->with('user3') @@ -375,12 +380,12 @@ class Manager extends \PHPUnit_Framework_TestCase { $userManager->expects($this->any()) ->method('get') - ->will($this->returnCallback(function($uid) { + ->will($this->returnCallback(function($uid) use ($userBackend) { switch($uid) { - case 'user1' : return new User('user1', null); - case 'user2' : return new User('user2', null); - case 'user3' : return new User('user3', null); - case 'user33': return new User('user33', null); + case 'user1' : return new User('user1', $userBackend); + case 'user2' : return new User('user2', $userBackend); + case 'user3' : return new User('user3', $userBackend); + case 'user33': return new User('user33', $userBackend); default: return null; }