diff options
Diffstat (limited to 'lib/private')
91 files changed, 421 insertions, 187 deletions
diff --git a/lib/private/activitymanager.php b/lib/private/activitymanager.php index 7e7e2257874..685809581ac 100755 --- a/lib/private/activitymanager.php +++ b/lib/private/activitymanager.php @@ -59,7 +59,6 @@ class ActivityManager implements IManager { * * $callable has to return an instance of OCA\Activity\IConsumer * - * @param string $key * @param \Closure $callable */ function registerConsumer(\Closure $callable) { diff --git a/lib/private/api.php b/lib/private/api.php index c713368125c..3f96196e6df 100644 --- a/lib/private/api.php +++ b/lib/private/api.php @@ -328,6 +328,9 @@ class OC_API { } } + /** + * @param XMLWriter $writer + */ private static function toXML($array, $writer) { foreach($array as $k => $v) { if ($k[0] === '@') { diff --git a/lib/private/app.php b/lib/private/app.php index da09021cf3f..e60a8a4e0b1 100644 --- a/lib/private/app.php +++ b/lib/private/app.php @@ -38,7 +38,7 @@ class OC_App{ /** * @brief clean the appid - * @param $app Appid that needs to be cleaned + * @param string|boolean $app Appid that needs to be cleaned * @return string */ public static function cleanAppId($app) { @@ -261,7 +261,7 @@ class OC_App{ /** * @brief disables an app * @param string $app app - * @return bool + * @return boolean|null * * This function set an app as disabled in appconfig. */ @@ -342,7 +342,7 @@ class OC_App{ /** * @brief Returns the Settings Navigation - * @return array + * @return string * * This function returns an array containing all settings pages added. The * entries are sorted by the key 'order' ascending. @@ -437,6 +437,7 @@ class OC_App{ /** * Get the path where to install apps + * @return string */ public static function getInstallPath() { if(OC_Config::getValue('appstoreenabled', true)==false) { @@ -490,6 +491,7 @@ class OC_App{ /** * get the last version of the app, either from appinfo/version or from appinfo/info.xml + * @return string */ public static function getAppVersion($appid) { $file= self::getAppPath($appid).'/appinfo/version'; @@ -570,7 +572,7 @@ class OC_App{ /** * @brief Returns the navigation - * @return array + * @return string * * This function returns an array containing all entries added. The * entries are sorted by the key 'order' ascending. Additional to the keys @@ -854,6 +856,7 @@ class OC_App{ /** * check if the app needs updating and update when needed + * @param string $app */ public static function checkUpgrade($app) { if (in_array($app, self::$checkedApps)) { diff --git a/lib/private/appconfig.php b/lib/private/appconfig.php index a47e1ad49e6..a32c1126c7b 100644 --- a/lib/private/appconfig.php +++ b/lib/private/appconfig.php @@ -185,8 +185,6 @@ class AppConfig implements \OCP\IAppConfig { * @param string $app app * @param string $key key * @return bool - * - * Deletes a key. */ public function deleteKey($app, $key) { $where = array( @@ -217,8 +215,8 @@ class AppConfig implements \OCP\IAppConfig { /** * get multiply values, either the app or key can be used as wildcard by setting it to false * - * @param app - * @param key + * @param boolean $app + * @param string $key * @return array */ public function getValues($app, $key) { diff --git a/lib/private/appframework/dependencyinjection/dicontainer.php b/lib/private/appframework/dependencyinjection/dicontainer.php index e2ea974e104..b6ccf60db4b 100644 --- a/lib/private/appframework/dependencyinjection/dicontainer.php +++ b/lib/private/appframework/dependencyinjection/dicontainer.php @@ -135,7 +135,7 @@ class DIContainer extends SimpleContainer implements IAppContainer{ /** * @param Middleware $middleWare - * @return boolean + * @return boolean|null */ function registerMiddleWare(Middleware $middleWare) { array_push($this->middleWares, $middleWare); diff --git a/lib/private/appframework/http.php b/lib/private/appframework/http.php index 41fc0db6b38..65d926105f1 100644 --- a/lib/private/appframework/http.php +++ b/lib/private/appframework/http.php @@ -108,7 +108,7 @@ class Http extends BaseHttp { * Gets the correct header * @param Http::CONSTANT $status the constant from the Http class * @param \DateTime $lastModified formatted last modified date - * @param string $Etag the etag + * @param string $ETag the etag */ public function getStatusHeader($status, \DateTime $lastModified=null, $ETag=null) { diff --git a/lib/private/appframework/http/redirectresponse.php b/lib/private/appframework/http/redirectresponse.php index c4e21059480..5c4e1c06dc3 100644 --- a/lib/private/appframework/http/redirectresponse.php +++ b/lib/private/appframework/http/redirectresponse.php @@ -25,7 +25,7 @@ namespace OC\AppFramework\Http; use OCP\AppFramework\Http\Response, - OCP\AppFramework\Http; + OCP\AppFramework\Http; /** diff --git a/lib/private/appframework/http/request.php b/lib/private/appframework/http/request.php index 3e1f4ff87ed..40f47a7bd2f 100644 --- a/lib/private/appframework/http/request.php +++ b/lib/private/appframework/http/request.php @@ -114,7 +114,7 @@ class Request implements \ArrayAccess, \Countable, IRequest { * $request['myvar'] = 'something'; // This throws an exception. * * @param string $offset The key to lookup - * @return string|null + * @return boolean */ public function offsetExists($offset) { return isset($this->items['parameters'][$offset]); diff --git a/lib/private/appframework/middleware/middlewaredispatcher.php b/lib/private/appframework/middleware/middlewaredispatcher.php index 681140c2242..598743e523f 100644 --- a/lib/private/appframework/middleware/middlewaredispatcher.php +++ b/lib/private/appframework/middleware/middlewaredispatcher.php @@ -56,7 +56,7 @@ class MiddlewareDispatcher { /** * Adds a new middleware - * @param Middleware $middleware the middleware which will be added + * @param Middleware $middleWare the middleware which will be added */ public function registerMiddleware(Middleware $middleWare){ array_push($this->middlewares, $middleWare); diff --git a/lib/private/appframework/middleware/security/securityexception.php b/lib/private/appframework/middleware/security/securityexception.php index b32a2769ff5..e551675acdf 100644 --- a/lib/private/appframework/middleware/security/securityexception.php +++ b/lib/private/appframework/middleware/security/securityexception.php @@ -32,7 +32,6 @@ class SecurityException extends \Exception { /** * @param string $msg the security error message - * @param bool $ajax true if it resulted because of an ajax request */ public function __construct($msg, $code = 0) { parent::__construct($msg, $code); diff --git a/lib/private/appframework/routing/routeactionhandler.php b/lib/private/appframework/routing/routeactionhandler.php index 2b9dc38dc43..6a5c64745ae 100644 --- a/lib/private/appframework/routing/routeactionhandler.php +++ b/lib/private/appframework/routing/routeactionhandler.php @@ -30,6 +30,10 @@ class RouteActionHandler { private $actionName; private $container; + /** + * @param string $controllerName + * @param string $actionName + */ public function __construct(DIContainer $container, $controllerName, $actionName) { $this->controllerName = $controllerName; $this->actionName = $actionName; diff --git a/lib/private/appframework/routing/routeconfig.php b/lib/private/appframework/routing/routeconfig.php index 53ab11bf2f5..716358444a2 100644 --- a/lib/private/appframework/routing/routeconfig.php +++ b/lib/private/appframework/routing/routeconfig.php @@ -37,7 +37,6 @@ class RouteConfig { /** * @param \OC\AppFramework\DependencyInjection\DIContainer $container * @param \OC_Router $router - * @param string $pathToYml * @internal param $appName */ public function __construct(DIContainer $container, \OC_Router $router, $routes) { diff --git a/lib/private/appframework/utility/simplecontainer.php b/lib/private/appframework/utility/simplecontainer.php index e631e657756..d08a4879e34 100644 --- a/lib/private/appframework/utility/simplecontainer.php +++ b/lib/private/appframework/utility/simplecontainer.php @@ -31,7 +31,7 @@ class SimpleContainer extends \Pimple implements \OCP\IContainer { * Created instance will be cached in case $shared is true. * * @param string $name name of the service to register another backend for - * @param callable $closure the closure to be called on service creation + * @param \Closure $closure the closure to be called on service creation */ function registerService($name, \Closure $closure, $shared = true) { diff --git a/lib/private/archive.php b/lib/private/archive.php index 85bfae57295..a18f8d3ffbd 100644 --- a/lib/private/archive.php +++ b/lib/private/archive.php @@ -9,7 +9,7 @@ abstract class OC_Archive{ /** * open any of the supported archive types - * @param string path + * @param string $path * @return OC_Archive */ public static function open($path) { @@ -32,39 +32,39 @@ abstract class OC_Archive{ abstract function __construct($source); /** * add an empty folder to the archive - * @param string path + * @param string $path * @return bool */ abstract function addFolder($path); /** * add a file to the archive - * @param string path + * @param string $path * @param string source either a local file or string data * @return bool */ abstract function addFile($path, $source=''); /** * rename a file or folder in the archive - * @param string source - * @param string dest + * @param string $source + * @param string $dest * @return bool */ abstract function rename($source, $dest); /** * get the uncompressed size of a file in the archive - * @param string path + * @param string $path * @return int */ abstract function filesize($path); /** * get the last modified time of a file in the archive - * @param string path + * @param string $path * @return int */ abstract function mtime($path); /** * get the files in a folder - * @param path + * @param string $path * @return array */ abstract function getFolder($path); @@ -75,48 +75,48 @@ abstract class OC_Archive{ abstract function getFiles(); /** * get the content of a file - * @param string path + * @param string $path * @return string */ abstract function getFile($path); /** * extract a single file from the archive - * @param string path - * @param string dest + * @param string $path + * @param string $dest * @return bool */ abstract function extractFile($path, $dest); /** * extract the archive - * @param string path - * @param string dest + * @param string $path + * @param string $dest * @return bool */ abstract function extract($dest); /** * check if a file or folder exists in the archive - * @param string path + * @param string $path * @return bool */ abstract function fileExists($path); /** * remove a file or folder from the archive - * @param string path + * @param string $path * @return bool */ abstract function remove($path); /** * get a file handler - * @param string path - * @param string mode + * @param string $path + * @param string $mode * @return resource */ abstract function getStream($path, $mode); /** * add a folder and all its content * @param string $path - * @param string source - * @return bool + * @param string $source + * @return boolean|null */ function addRecursive($path, $source) { $dh = opendir($source); diff --git a/lib/private/archive/tar.php b/lib/private/archive/tar.php index a1c0535b1c3..5538e027ab4 100644 --- a/lib/private/archive/tar.php +++ b/lib/private/archive/tar.php @@ -30,8 +30,8 @@ class OC_Archive_TAR extends OC_Archive{ /** * try to detect the type of tar compression - * @param string file - * @return str + * @param string $file + * @return integer */ static public function getTarType($file) { if(strpos($file, '.')) { @@ -53,7 +53,7 @@ class OC_Archive_TAR extends OC_Archive{ /** * add an empty folder to the archive - * @param string path + * @param string $path * @return bool */ function addFolder($path) { @@ -80,8 +80,8 @@ class OC_Archive_TAR extends OC_Archive{ } /** * add a file to the archive - * @param string path - * @param string source either a local file or string data + * @param string $path + * @param string $source either a local file or string data * @return bool */ function addFile($path, $source='') { @@ -103,8 +103,8 @@ class OC_Archive_TAR extends OC_Archive{ /** * rename a file or folder in the archive - * @param string source - * @param string dest + * @param string $source + * @param string $dest * @return bool */ function rename($source, $dest) { @@ -139,7 +139,7 @@ class OC_Archive_TAR extends OC_Archive{ /** * get the uncompressed size of a file in the archive - * @param string path + * @param string $path * @return int */ function filesize($path) { @@ -158,7 +158,7 @@ class OC_Archive_TAR extends OC_Archive{ /** * get the files in a folder - * @param path + * @param string $path * @return array */ function getFolder($path) { @@ -201,7 +201,7 @@ class OC_Archive_TAR extends OC_Archive{ } /** * get the content of a file - * @param string path + * @param string $path * @return string */ function getFile($path) { @@ -209,8 +209,8 @@ class OC_Archive_TAR extends OC_Archive{ } /** * extract a single file from the archive - * @param string path - * @param string dest + * @param string $path + * @param string $dest * @return bool */ function extractFile($path, $dest) { @@ -231,8 +231,7 @@ class OC_Archive_TAR extends OC_Archive{ } /** * extract the archive - * @param string path - * @param string dest + * @param string $dest * @return bool */ function extract($dest) { @@ -240,7 +239,7 @@ class OC_Archive_TAR extends OC_Archive{ } /** * check if a file or folder exists in the archive - * @param string path + * @param string $path * @return bool */ function fileExists($path) { @@ -268,7 +267,7 @@ class OC_Archive_TAR extends OC_Archive{ /** * remove a file or folder from the archive - * @param string path + * @param string $path * @return bool */ function remove($path) { @@ -289,8 +288,8 @@ class OC_Archive_TAR extends OC_Archive{ } /** * get a file handler - * @param string path - * @param string mode + * @param string $path + * @param string $mode * @return resource */ function getStream($path, $mode) { diff --git a/lib/private/archive/zip.php b/lib/private/archive/zip.php index 8a866716a79..cd5479299a1 100644 --- a/lib/private/archive/zip.php +++ b/lib/private/archive/zip.php @@ -23,7 +23,7 @@ class OC_Archive_ZIP extends OC_Archive{ } /** * add an empty folder to the archive - * @param string path + * @param string $path * @return bool */ function addFolder($path) { @@ -31,8 +31,8 @@ class OC_Archive_ZIP extends OC_Archive{ } /** * add a file to the archive - * @param string path - * @param string source either a local file or string data + * @param string $path + * @param string $source either a local file or string data * @return bool */ function addFile($path, $source='') { @@ -49,9 +49,9 @@ class OC_Archive_ZIP extends OC_Archive{ } /** * rename a file or folder in the archive - * @param string source - * @param string dest - * @return bool + * @param string $source + * @param string $dest + * @return boolean|null */ function rename($source, $dest) { $source=$this->stripPath($source); @@ -60,7 +60,7 @@ class OC_Archive_ZIP extends OC_Archive{ } /** * get the uncompressed size of a file in the archive - * @param string path + * @param string $path * @return int */ function filesize($path) { @@ -69,7 +69,7 @@ class OC_Archive_ZIP 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) { @@ -77,7 +77,7 @@ class OC_Archive_ZIP extends OC_Archive{ } /** * get the files in a folder - * @param path + * @param string $path * @return array */ function getFolder($path) { @@ -107,7 +107,7 @@ class OC_Archive_ZIP extends OC_Archive{ } /** * get the content of a file - * @param string path + * @param string $path * @return string */ function getFile($path) { @@ -115,9 +115,9 @@ class OC_Archive_ZIP extends OC_Archive{ } /** * extract a single file from the archive - * @param string path - * @param string dest - * @return bool + * @param string $path + * @param string $dest + * @return boolean|null */ function extractFile($path, $dest) { $fp = $this->zip->getStream($path); @@ -125,8 +125,8 @@ class OC_Archive_ZIP extends OC_Archive{ } /** * extract the archive - * @param string path - * @param string dest + * @param string $path + * @param string $dest * @return bool */ function extract($dest) { @@ -134,7 +134,7 @@ class OC_Archive_ZIP extends OC_Archive{ } /** * check if a file or folder exists in the archive - * @param string path + * @param string $path * @return bool */ function fileExists($path) { @@ -142,7 +142,7 @@ class OC_Archive_ZIP extends OC_Archive{ } /** * remove a file or folder from the archive - * @param string path + * @param string $path * @return bool */ function remove($path) { @@ -154,8 +154,8 @@ class OC_Archive_ZIP extends OC_Archive{ } /** * get a file handler - * @param string path - * @param string mode + * @param string $path + * @param string $mode * @return resource */ function getStream($path, $mode) { @@ -191,6 +191,10 @@ class OC_Archive_ZIP extends OC_Archive{ } } + /** + * @param string $path + * @return string + */ private function stripPath($path) { if(!$path || $path[0]=='/') { return substr($path, 1); diff --git a/lib/private/arrayparser.php b/lib/private/arrayparser.php index 3bb394a5163..c4ad1264fbb 100644 --- a/lib/private/arrayparser.php +++ b/lib/private/arrayparser.php @@ -30,6 +30,9 @@ class ArrayParser { const TYPE_STRING = 3; const TYPE_ARRAY = 4; + /** + * @param string $string + */ function parsePHP($string) { $string = $this->stripPHPTags($string); $string = $this->stripAssignAndReturn($string); @@ -47,6 +50,9 @@ class ArrayParser { return $string; } + /** + * @param string $string + */ function stripAssignAndReturn($string) { $string = trim($string); if (substr($string, 0, 6) === 'return') { @@ -74,6 +80,9 @@ class ArrayParser { return null; } + /** + * @param string $string + */ function getType($string) { $string = strtolower($string); $first = substr($string, 0, 1); @@ -90,19 +99,31 @@ class ArrayParser { } } + /** + * @param string $string + */ function parseString($string) { return substr($string, 1, -1); } + /** + * @param string $string + */ function parseNum($string) { return intval($string); } + /** + * @param string $string + */ function parseBool($string) { $string = strtolower($string); return $string === 'true'; } + /** + * @param string $string + */ function parseArray($string) { $body = substr($string, 5); $body = trim($body); @@ -131,6 +152,9 @@ class ArrayParser { return $result; } + /** + * @param string $body + */ function splitArray($body) { $inSingleQuote = false;//keep track if we are inside quotes $inDoubleQuote = false; diff --git a/lib/private/backgroundjob.php b/lib/private/backgroundjob.php index 9619dcb732c..aa740a89532 100644 --- a/lib/private/backgroundjob.php +++ b/lib/private/backgroundjob.php @@ -37,8 +37,8 @@ class OC_BackgroundJob{ /** * @brief sets the background jobs execution type - * @param $type execution type - * @return boolean + * @param string $type execution type + * @return boolean|null * * This method sets the execution type of the background jobs. Possible types * are "none", "ajax", "webcron", "cron" diff --git a/lib/private/backgroundjob/joblist.php b/lib/private/backgroundjob/joblist.php index 586e99a3cbc..2740d2bd856 100644 --- a/lib/private/backgroundjob/joblist.php +++ b/lib/private/backgroundjob/joblist.php @@ -48,7 +48,7 @@ class JobList implements IJobList { } /** - * @param Job|string $job + * @param Job $job * @param mixed $argument */ public function remove($job, $argument = null) { @@ -168,7 +168,7 @@ class JobList implements IJobList { /** * get the id of the last ran job * - * @return int + * @return string */ public function getLastJob() { return $this->config->getAppValue('backgroundjob', 'lastjob', 0); diff --git a/lib/private/cache/file.php b/lib/private/cache/file.php index b0738d2a92b..8a6ef39f61b 100644 --- a/lib/private/cache/file.php +++ b/lib/private/cache/file.php @@ -29,6 +29,9 @@ class File { } } + /** + * @param string $key + */ public function get($key) { $result = null; $proxyStatus = \OC_FileProxy::$enabled; @@ -59,6 +62,9 @@ class File { return $result; } + /** + * @param string $key + */ public function set($key, $value, $ttl=0) { $storage = $this->getStorage(); $result = false; @@ -87,6 +93,9 @@ class File { return false; } + /** + * @param string $key + */ public function remove($key) { $storage = $this->getStorage(); if(!$storage) { diff --git a/lib/private/cache/fileglobal.php b/lib/private/cache/fileglobal.php index 95b7ceb099f..d9e0fd46d37 100644 --- a/lib/private/cache/fileglobal.php +++ b/lib/private/cache/fileglobal.php @@ -21,6 +21,9 @@ class FileGlobal { return str_replace('/', '_', $key); } + /** + * @param string $key + */ public function get($key) { $key = $this->fixKey($key); if ($this->hasKey($key)) { @@ -30,6 +33,10 @@ class FileGlobal { return null; } + /** + * @param string $key + * @param string $value + */ public function set($key, $value, $ttl=0) { $key = $this->fixKey($key); $cache_dir = self::getCacheDir(); diff --git a/lib/private/connector/sabre/file.php b/lib/private/connector/sabre/file.php index ed27cef440d..5ef6365f657 100644 --- a/lib/private/connector/sabre/file.php +++ b/lib/private/connector/sabre/file.php @@ -206,6 +206,9 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements Sabre_D } + /** + * @param resource $data + */ private function createFileChunked($data) { list($path, $name) = \Sabre_DAV_URLUtil::splitPath($this->path); diff --git a/lib/private/connector/sabre/node.php b/lib/private/connector/sabre/node.php index 993aa73faeb..05d2d2291ec 100644 --- a/lib/private/connector/sabre/node.php +++ b/lib/private/connector/sabre/node.php @@ -153,9 +153,8 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr /** * @brief Updates properties on this node, - * @param array $mutations * @see Sabre_DAV_IProperties::updateProperties - * @return bool|array + * @return boolean */ public function updateProperties($properties) { $existing = $this->getProperties(array()); @@ -267,7 +266,7 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr } /** - * @return mixed + * @return string|null */ public function getFileId() { diff --git a/lib/private/connector/sabre/principal.php b/lib/private/connector/sabre/principal.php index 59a96797c16..2075aa55c86 100644 --- a/lib/private/connector/sabre/principal.php +++ b/lib/private/connector/sabre/principal.php @@ -62,7 +62,7 @@ class OC_Connector_Sabre_Principal implements Sabre_DAVACL_IPrincipalBackend { * Returns the list of members for a group-principal * * @param string $principal - * @return array + * @return string[] */ public function getGroupMemberSet($principal) { // TODO: for now the group principal has only one member, the user itself diff --git a/lib/private/connector/sabre/quotaplugin.php b/lib/private/connector/sabre/quotaplugin.php index ea2cb81d1f7..d6255325343 100644 --- a/lib/private/connector/sabre/quotaplugin.php +++ b/lib/private/connector/sabre/quotaplugin.php @@ -45,7 +45,6 @@ class OC_Connector_Sabre_QuotaPlugin extends Sabre_DAV_ServerPlugin { /** * This method is called before any HTTP method and validates there is enough free space to store the file * - * @param string $method * @throws Sabre_DAV_Exception * @return bool */ diff --git a/lib/private/connector/sabre/server.php b/lib/private/connector/sabre/server.php index 41e8885917a..2660b043f46 100644 --- a/lib/private/connector/sabre/server.php +++ b/lib/private/connector/sabre/server.php @@ -67,6 +67,7 @@ class OC_Connector_Sabre_Server extends Sabre_DAV_Server { /** * Small helper to support PROPFIND with DEPTH_INFINITY. + * @param string $path */ private function addPathNodesRecursively(&$nodes, $path) { foreach($this->tree->getChildren($path) as $childNode) { diff --git a/lib/private/davclient.php b/lib/private/davclient.php index 28f48f3b921..afa4e1103b4 100644 --- a/lib/private/davclient.php +++ b/lib/private/davclient.php @@ -31,7 +31,7 @@ class OC_DAVClient extends \Sabre_DAV_Client { /** * @brief Sets the request timeout or 0 to disable timeout. - * @param int timeout in seconds or 0 to disable + * @param integer $timeout in seconds or 0 to disable */ public function setRequestTimeout($timeout) { $this->requestTimeout = (int)$timeout; diff --git a/lib/private/db.php b/lib/private/db.php index 723c1ee07a3..23e9593a579 100644 --- a/lib/private/db.php +++ b/lib/private/db.php @@ -51,7 +51,7 @@ class OC_DB { /** * @brief connects to the database - * @return bool true if connection can be established or false on error + * @return boolean|null true if connection can be established or false on error * * Connects to the database as specified in config.php */ @@ -196,7 +196,7 @@ class OC_DB { * @param int $offset * @param bool $isManipulation * @throws DatabaseException - * @return \Doctrine\DBAL\Statement prepared SQL query + * @return OC_DB_StatementWrapper prepared SQL query * * SQL query via Doctrine prepare(), needs to be execute()'d! */ @@ -298,7 +298,7 @@ class OC_DB { /** * @brief gets last value of autoincrement * @param string $table The optional table name (will replace *PREFIX*) and add sequence suffix - * @return int id + * @return string id * @throws DatabaseException * * \Doctrine\DBAL\Connection lastInsertId @@ -315,7 +315,7 @@ class OC_DB { * @brief Insert a row if a matching row doesn't exists. * @param string $table. The table to insert into in the form '*PREFIX*tableName' * @param array $input. An array of fieldname/value pairs - * @return int number of updated rows + * @return boolean number of updated rows */ public static function insertIfNotExist($table, $input) { self::connect(); @@ -368,7 +368,7 @@ class OC_DB { * @brief update the database schema * @param string $file file to read structure from * @throws Exception - * @return bool + * @return string|boolean */ public static function updateDbFromStructure($file) { $schemaManager = self::getMDB2SchemaManager(); diff --git a/lib/private/db/connection.php b/lib/private/db/connection.php index 2581969dbd0..2bd7b093020 100644 --- a/lib/private/db/connection.php +++ b/lib/private/db/connection.php @@ -94,7 +94,7 @@ class Connection extends \Doctrine\DBAL\Connection { * If an SQLLogger is configured, the execution is logged. * * @param string $query The SQL query to execute. - * @param array $params The parameters to bind to the query, if any. + * @param string[] $params The parameters to bind to the query, if any. * @param array $types The types the previous parameters are in. * @param QueryCacheProfile $qcp * @return \Doctrine\DBAL\Driver\Statement The executed statement. diff --git a/lib/private/db/connectionwrapper.php b/lib/private/db/connectionwrapper.php index 93d4fb57f74..c2cfc21d204 100644 --- a/lib/private/db/connectionwrapper.php +++ b/lib/private/db/connectionwrapper.php @@ -31,8 +31,8 @@ class ConnectionWrapper implements \OCP\IDBConnection { /** * Used to get the id of the just inserted element - * @param string $tableName the name of the table where we inserted the item - * @return int the id of the inserted element + * @param string $table the name of the table where we inserted the item + * @return string the id of the inserted element */ public function lastInsertId($table = null) { diff --git a/lib/private/db/mdb2schemamanager.php b/lib/private/db/mdb2schemamanager.php index 6378c769055..c050d47b499 100644 --- a/lib/private/db/mdb2schemamanager.php +++ b/lib/private/db/mdb2schemamanager.php @@ -53,7 +53,7 @@ class MDB2SchemaManager { /** * @brief update the database scheme * @param string $file file to read structure from - * @return bool + * @return string|boolean */ public function updateDbFromStructure($file, $generateSql = false) { $sm = $this->conn->getSchemaManager(); diff --git a/lib/private/db/mdb2schemawriter.php b/lib/private/db/mdb2schemawriter.php index 21b43cbfe80..42d5bbab112 100644 --- a/lib/private/db/mdb2schemawriter.php +++ b/lib/private/db/mdb2schemawriter.php @@ -9,7 +9,7 @@ class OC_DB_MDB2SchemaWriter { /** - * @param $file + * @param string $file * @param \Doctrine\DBAL\Schema\AbstractSchemaManager $sm * @return bool */ @@ -26,6 +26,9 @@ class OC_DB_MDB2SchemaWriter { return true; } + /** + * @param SimpleXMLElement $xml + */ private static function saveTable($table, $xml) { $xml->addChild('name', $table->getName()); $declaration = $xml->addChild('declaration'); diff --git a/lib/private/db/statementwrapper.php b/lib/private/db/statementwrapper.php index f98bfb716dc..eaf215c7231 100644 --- a/lib/private/db/statementwrapper.php +++ b/lib/private/db/statementwrapper.php @@ -17,6 +17,9 @@ class OC_DB_StatementWrapper { private $isManipulation = false; private $lastArguments = array(); + /** + * @param boolean $isManipulation + */ public function __construct($statement, $isManipulation) { $this->statement = $statement; $this->isManipulation = $isManipulation; diff --git a/lib/private/defaults.php b/lib/private/defaults.php index cec9a65c7f3..0b97497baa1 100644 --- a/lib/private/defaults.php +++ b/lib/private/defaults.php @@ -39,6 +39,9 @@ class OC_Defaults { } } + /** + * @param string $method + */ private function themeExist($method) { if (OC_Util::getTheme() !== '' && method_exists('OC_Theme', $method)) { return true; diff --git a/lib/private/filechunking.php b/lib/private/filechunking.php index aa4f73c7c05..09b30af48b2 100644 --- a/lib/private/filechunking.php +++ b/lib/private/filechunking.php @@ -16,6 +16,9 @@ class OC_FileChunking { return $matches; } + /** + * @param string[] $info + */ public function __construct($info) { $this->info = $info; } @@ -37,7 +40,7 @@ class OC_FileChunking { /** * Stores the given $data under the given $key - the number of stored bytes is returned * - * @param $index + * @param string $index * @param $data * @return int */ @@ -87,7 +90,7 @@ class OC_FileChunking { /** * Removes one specific chunk - * @param $index + * @param string $index */ public function remove($index) { $cache = $this->getCache(); @@ -124,6 +127,9 @@ class OC_FileChunking { ); } + /** + * @param string $path + */ public function file_assemble($path) { $absolutePath = \OC\Files\Filesystem::normalizePath(\OC\Files\Filesystem::getView()->getAbsolutePath($path)); $data = ''; diff --git a/lib/private/fileproxy.php b/lib/private/fileproxy.php index 2997aaf81b6..62187e1ec74 100644 --- a/lib/private/fileproxy.php +++ b/lib/private/fileproxy.php @@ -67,6 +67,9 @@ class OC_FileProxy{ self::$proxies[]=$proxy; } + /** + * @param string $operation + */ public static function getProxies($operation = null) { if ($operation === null) { // return all @@ -81,6 +84,10 @@ class OC_FileProxy{ return $proxies; } + /** + * @param string $operation + * @param string|boolean $filepath + */ public static function runPreProxies($operation,&$filepath,&$filepath2=null) { if(!self::$enabled) { return true; @@ -101,6 +108,11 @@ class OC_FileProxy{ return true; } + /** + * @param string $operation + * + * @return string + */ public static function runPostProxies($operation, $path, $result) { if(!self::$enabled) { return $result; diff --git a/lib/private/files.php b/lib/private/files.php index 24fca4a5df3..4a6b9d8ca0e 100644 --- a/lib/private/files.php +++ b/lib/private/files.php @@ -40,7 +40,7 @@ class OC_Files { * return the content of a file or return a zip file containing multiple files * * @param string $dir - * @param string $file ; separated list of files to download + * @param string $files ; separated list of files to download * @param boolean $only_header ; boolean to only send header of the request */ public static function get($dir, $files, $only_header = false) { @@ -170,6 +170,9 @@ class OC_Files { } } + /** + * @param false|string $filename + */ private static function addSendfileHeader($filename) { if (isset($_SERVER['MOD_X_SENDFILE_ENABLED'])) { header("X-Sendfile: " . $filename); @@ -194,6 +197,10 @@ class OC_Files { } } + /** + * @param string $dir + * @param ZipArchive $zip + */ public static function zipAddDir($dir, $zip, $internalDir='') { $dirname=basename($dir); $zip->addEmptyDir($internalDir.$dirname); @@ -215,7 +222,7 @@ class OC_Files { /** * checks if the selected files are within the size constraint. If not, outputs an error page. * - * @param dir $dir + * @param string $dir * @param files $files */ static function validateZipDownload($dir, $files) { diff --git a/lib/private/files/cache/backgroundwatcher.php b/lib/private/files/cache/backgroundwatcher.php index 923804f48d0..2194651233d 100644 --- a/lib/private/files/cache/backgroundwatcher.php +++ b/lib/private/files/cache/backgroundwatcher.php @@ -24,6 +24,9 @@ class BackgroundWatcher { return $row['id']; } + /** + * @param integer $id + */ static private function checkUpdate($id) { $cacheItem = Cache::getById($id); if (is_null($cacheItem)) { diff --git a/lib/private/files/cache/cache.php b/lib/private/files/cache/cache.php index 1e7936ca26d..4cab4619149 100644 --- a/lib/private/files/cache/cache.php +++ b/lib/private/files/cache/cache.php @@ -487,7 +487,7 @@ class Cache { /** * update the folder size and the size of all parent folders * - * @param $path + * @param string|boolean $path */ public function correctFolderSize($path) { $this->calculateFolderSize($path); diff --git a/lib/private/files/cache/homecache.php b/lib/private/files/cache/homecache.php index 71bb944da71..a7c310a3782 100644 --- a/lib/private/files/cache/homecache.php +++ b/lib/private/files/cache/homecache.php @@ -38,6 +38,9 @@ class HomeCache extends Cache { return $totalSize; } + /** + * @param string $path + */ public function get($path) { $data = parent::get($path); if ($path === '' or $path === '/') { diff --git a/lib/private/files/cache/legacy.php b/lib/private/files/cache/legacy.php index 8eed1f67a5d..4d5f58741e9 100644 --- a/lib/private/files/cache/legacy.php +++ b/lib/private/files/cache/legacy.php @@ -16,6 +16,9 @@ class Legacy { private $cacheHasItems = null; + /** + * @param string $user + */ public function __construct($user) { $this->user = $user; } @@ -69,7 +72,7 @@ class Legacy { /** * get an item from the legacy cache * - * @param string|int $path + * @param string $path * @return array */ function get($path) { diff --git a/lib/private/files/cache/storage.php b/lib/private/files/cache/storage.php index 5b1b30176e8..6b6b0bce9d7 100644 --- a/lib/private/files/cache/storage.php +++ b/lib/private/files/cache/storage.php @@ -47,6 +47,9 @@ class Storage { return $this->numericId; } + /** + * @return string + */ public static function getStorageId($numericId) { $sql = 'SELECT `id` FROM `*PREFIX*storages` WHERE `numeric_id` = ?'; @@ -58,6 +61,9 @@ class Storage { } } + /** + * @param string $storageId + */ public static function exists($storageId) { if (strlen($storageId) > 64) { $storageId = md5($storageId); diff --git a/lib/private/files/cache/updater.php b/lib/private/files/cache/updater.php index 73bc30e538f..e4114e572fe 100644 --- a/lib/private/files/cache/updater.php +++ b/lib/private/files/cache/updater.php @@ -112,7 +112,7 @@ class Updater { /** * @brief get file owner and path * @param string $filename - * @return array with the oweners uid and the owners path + * @return string[] with the oweners uid and the owners path */ private static function getUidAndFilename($filename) { diff --git a/lib/private/files/filesystem.php b/lib/private/files/filesystem.php index a83e9aa86d2..d1ebad3490c 100644 --- a/lib/private/files/filesystem.php +++ b/lib/private/files/filesystem.php @@ -614,6 +614,9 @@ class Filesystem { return self::$defaultInstance->touch($path, $mtime); } + /** + * @return string + */ static public function file_get_contents($path) { return self::$defaultInstance->file_get_contents($path); } @@ -638,6 +641,9 @@ class Filesystem { return self::$defaultInstance->fopen($path, $mode); } + /** + * @return string + */ static public function toTmpFile($path) { return self::$defaultInstance->toTmpFile($path); } diff --git a/lib/private/files/mapper.php b/lib/private/files/mapper.php index 47abd4e52fe..833d4bd8d1c 100644 --- a/lib/private/files/mapper.php +++ b/lib/private/files/mapper.php @@ -44,7 +44,7 @@ class Mapper /** * @param string $path * @param bool $isLogicPath indicates if $path is logical or physical - * @param $recursive + * @param boolean $recursive * @return void */ public function removePath($path, $isLogicPath, $recursive) { @@ -60,8 +60,8 @@ class Mapper } /** - * @param $path1 - * @param $path2 + * @param string $path1 + * @param string $path2 * @throws \Exception */ public function copy($path1, $path2) @@ -99,7 +99,7 @@ class Mapper /** * @param $path * @param $root - * @return bool|string + * @return false|string */ public function stripRootFolder($path, $root) { if (strpos($path, $root) !== 0) { @@ -120,6 +120,9 @@ class Mapper return $path; } + /** + * @param string $logicPath + */ private function resolveLogicPath($logicPath) { $logicPath = $this->stripLast($logicPath); $sql = 'SELECT * FROM `*PREFIX*file_map` WHERE `logic_path_hash` = ?'; @@ -141,6 +144,10 @@ class Mapper return $result['logic_path']; } + /** + * @param string $logicPath + * @param boolean $store + */ private function create($logicPath, $store) { $logicPath = $this->stripLast($logicPath); $index = 0; @@ -167,6 +174,9 @@ class Mapper \OC_DB::executeAudited($sql, array($logicPath, $physicalPath, md5($logicPath), md5($physicalPath))); } + /** + * @param integer $index + */ public function slugifyPath($path, $index=null) { $path = $this->stripRootFolder($path, $this->unchangedPhysicalRoot); diff --git a/lib/private/files/mount/manager.php b/lib/private/files/mount/manager.php index 4c432dcf724..ff4a336f347 100644 --- a/lib/private/files/mount/manager.php +++ b/lib/private/files/mount/manager.php @@ -106,7 +106,7 @@ class Manager { * Find mounts by numeric storage id * * @param string $id - * @return Mount + * @return Mount[] */ public function findByNumericId($id) { $storageId = \OC\Files\Cache\Storage::getStorageId($id); diff --git a/lib/private/files/node/node.php b/lib/private/files/node/node.php index 063e2424a64..643a587dfc2 100644 --- a/lib/private/files/node/node.php +++ b/lib/private/files/node/node.php @@ -31,7 +31,7 @@ class Node implements \OCP\Files\Node { /** * @param \OC\Files\View $view - * @param \OC\Files\Node\Root Root $root + * @param \OC\Files\Node\Root $root * @param string $path */ public function __construct($root, $view, $path) { diff --git a/lib/private/files/node/root.php b/lib/private/files/node/root.php index e3d58476e9c..a22a2aaf4e9 100644 --- a/lib/private/files/node/root.php +++ b/lib/private/files/node/root.php @@ -95,7 +95,7 @@ class Root extends Folder implements Emitter { /** * @param string $scope * @param string $method - * @param array $arguments + * @param Node[] $arguments */ public function emit($scope, $method, $arguments = array()) { $this->emitter->emit($scope, $method, $arguments); @@ -154,7 +154,7 @@ class Root extends Folder implements Emitter { * @param string $path * @throws \OCP\Files\NotFoundException * @throws \OCP\Files\NotPermittedException - * @return Node + * @return string */ public function get($path) { $path = $this->normalizePath($path); diff --git a/lib/private/files/storage/common.php b/lib/private/files/storage/common.php index 55b1471593d..d4dca780ff3 100644 --- a/lib/private/files/storage/common.php +++ b/lib/private/files/storage/common.php @@ -202,6 +202,9 @@ abstract class Common implements \OC\Files\Storage\Storage { return $this->toTmpFile($path); } + /** + * @param string $path + */ private function toTmpFile($path) { //no longer in the storage api, still useful here $source = $this->fopen($path, 'r'); if (!$source) { @@ -224,6 +227,10 @@ abstract class Common implements \OC\Files\Storage\Storage { return $baseDir; } + /** + * @param string $path + * @param string $target + */ private function addLocalFolder($path, $target) { $dh = $this->opendir($path); if (is_resource($dh)) { @@ -241,6 +248,9 @@ abstract class Common implements \OC\Files\Storage\Storage { } } + /** + * @param string $query + */ protected function searchInDir($query, $dir = '') { $files = array(); $dh = $this->opendir($dir); diff --git a/lib/private/files/storage/loader.php b/lib/private/files/storage/loader.php index 2572ef443bc..734131261c8 100644 --- a/lib/private/files/storage/loader.php +++ b/lib/private/files/storage/loader.php @@ -25,6 +25,10 @@ class Loader { $this->storageWrappers[] = $callback; } + /** + * @param string|boolean $mountPoint + * @param string $class + */ public function load($mountPoint, $class, $arguments) { return $this->wrap($mountPoint, new $class($arguments)); } diff --git a/lib/private/files/storage/local.php b/lib/private/files/storage/local.php index fa0788f2377..a62230bdba5 100644 --- a/lib/private/files/storage/local.php +++ b/lib/private/files/storage/local.php @@ -203,6 +203,9 @@ if (\OC_Util::runningOnWindows()) { return $return; } + /** + * @param string $dir + */ private function delTree($dir) { $dirRelative = $dir; $dir = $this->datadir . $dir; @@ -224,6 +227,9 @@ if (\OC_Util::runningOnWindows()) { return $return; } + /** + * @param string $fullPath + */ private static function getFileSizeFromOS($fullPath) { $name = strtolower(php_uname('s')); // Windows OS: we use COM to access the filesystem @@ -274,6 +280,9 @@ if (\OC_Util::runningOnWindows()) { return $this->datadir . $path; } + /** + * @param string $query + */ protected function searchInDir($query, $dir = '') { $files = array(); foreach (scandir($this->datadir . $dir) as $item) { diff --git a/lib/private/files/storage/mappedlocal.php b/lib/private/files/storage/mappedlocal.php index 6c37d445867..c8b22cfb39f 100644 --- a/lib/private/files/storage/mappedlocal.php +++ b/lib/private/files/storage/mappedlocal.php @@ -210,6 +210,9 @@ class MappedLocal extends \OC\Files\Storage\Common{ return $return; } + /** + * @param string $dir + */ private function delTree($dir, $isLogicPath=true) { $dirRelative=$dir; if ($isLogicPath) { @@ -244,6 +247,9 @@ class MappedLocal extends \OC\Files\Storage\Common{ return $return; } + /** + * @param string $fullPath + */ private static function getFileSizeFromOS($fullPath) { $name = strtolower(php_uname('s')); // Windows OS: we use COM to access the filesystem @@ -288,6 +294,9 @@ class MappedLocal extends \OC\Files\Storage\Common{ return $this->buildPath($path); } + /** + * @param string $query + */ protected function searchInDir($query, $dir='') { $files=array(); $physicalDir = $this->buildPath($dir); @@ -331,6 +340,10 @@ class MappedLocal extends \OC\Files\Storage\Common{ $this->mapper->removePath($fullPath, $isLogicPath, $recursive); } + /** + * @param string $path1 + * @param string $path2 + */ private function copyMapping($path1, $path2) { $path1 = $this->stripLeading($path1); $path2 = $this->stripLeading($path2); diff --git a/lib/private/files/storage/wrapper/quota.php b/lib/private/files/storage/wrapper/quota.php index a430e3e4617..1bcdca7f47a 100644 --- a/lib/private/files/storage/wrapper/quota.php +++ b/lib/private/files/storage/wrapper/quota.php @@ -23,6 +23,9 @@ class Quota extends Wrapper { $this->quota = $parameters['quota']; } + /** + * @param string $path + */ protected function getSize($path) { $cache = $this->getCache(); $data = $cache->get($path); diff --git a/lib/private/files/stream/close.php b/lib/private/files/stream/close.php index 80de3497c36..0e1f088fcf9 100644 --- a/lib/private/files/stream/close.php +++ b/lib/private/files/stream/close.php @@ -94,6 +94,9 @@ class Close { return unlink($path); } + /** + * @param string $path + */ public static function registerCallback($path, $callback) { self::$callBacks[$path] = $callback; } diff --git a/lib/private/files/stream/dir.php b/lib/private/files/stream/dir.php index 6ca884fc994..2483385c1d8 100644 --- a/lib/private/files/stream/dir.php +++ b/lib/private/files/stream/dir.php @@ -41,6 +41,9 @@ class Dir { return true; } + /** + * @param string $path + */ public static function register($path, $content) { self::$dirs[$path] = $content; } diff --git a/lib/private/files/utils/scanner.php b/lib/private/files/utils/scanner.php index 2cad7dd77bd..558bc60cf06 100644 --- a/lib/private/files/utils/scanner.php +++ b/lib/private/files/utils/scanner.php @@ -81,6 +81,9 @@ class Scanner extends PublicEmitter { } } + /** + * @param string $dir + */ public function scan($dir) { $mounts = $this->getMounts($dir); foreach ($mounts as $mount) { diff --git a/lib/private/files/view.php b/lib/private/files/view.php index 6fc534757b2..530aa8f7514 100644 --- a/lib/private/files/view.php +++ b/lib/private/files/view.php @@ -48,7 +48,7 @@ class View { * change the root to a fake root * * @param string $fakeRoot - * @return bool + * @return boolean|null */ public function chroot($fakeRoot) { if (!$fakeRoot == '') { @@ -352,6 +352,9 @@ class View { return $this->basicOperation('unlink', $path, array('delete')); } + /** + * @param string $directory + */ public function deleteAll($directory, $empty = false) { return $this->rmdir($directory); } @@ -735,6 +738,9 @@ class View { return (strlen($this->fakeRoot) > strlen($defaultRoot)) && (substr($this->fakeRoot, 0, strlen($defaultRoot) + 1) === $defaultRoot . '/'); } + /** + * @param string $path + */ private function runHooks($hooks, $path, $post = false) { $path = $this->getHookPath($path); $prefix = ($post) ? 'post_' : ''; diff --git a/lib/private/hooks/emitter.php b/lib/private/hooks/emitter.php index 8e9074bad67..8d58dd936cc 100644 --- a/lib/private/hooks/emitter.php +++ b/lib/private/hooks/emitter.php @@ -20,6 +20,7 @@ interface Emitter { * @param string $scope * @param string $method * @param callable $callback + * @return void */ public function listen($scope, $method, $callback); @@ -27,6 +28,7 @@ interface Emitter { * @param string $scope optional * @param string $method optional * @param callable $callback optional + * @return void */ public function removeListener($scope = null, $method = null, $callback = null); } diff --git a/lib/private/image.php b/lib/private/image.php index 91a9f91e1d6..42afa35ea56 100644 --- a/lib/private/image.php +++ b/lib/private/image.php @@ -396,7 +396,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 $handle + * @param resource $handle * @returns An image resource or false on error */ public function loadFromFileHandle($handle) { @@ -563,7 +563,7 @@ class OC_Image { * Create a new image from file or URL * @link http://www.programmierer-forum.de/function-imagecreatefrombmp-laeuft-mit-allen-bitraten-t143137.htm * @version 1.00 - * @param string $filename <p> + * @param string $fileName <p> * Path to the BMP image. * </p> * @return resource an image resource identifier on success, <b>FALSE</b> on errors. @@ -704,7 +704,7 @@ class OC_Image { /** * @brief Resizes the image preserving ratio. - * @param $maxsize The maximum size of either the width or height. + * @param integer $maxsize The maximum size of either the width or height. * @returns bool */ public function resize($maxSize) { @@ -891,8 +891,7 @@ if ( ! function_exists( 'imagebmp') ) { * @link http://www.programmierer-forum.de/imagebmp-gute-funktion-gefunden-t143716.htm * @author mgutt <marc@gutt.it> * @version 1.00 - * @param resource $image - * @param string $filename [optional] <p>The path to save the file to.</p> + * @param string $fileName [optional] <p>The path to save the file to.</p> * @param int $bit [optional] <p>Bit depth, (default is 24).</p> * @param int $compression [optional] * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. @@ -1008,7 +1007,7 @@ if ( ! function_exists( 'exif_imagetype' ) ) { /** * Workaround if exif_imagetype does not exist * @link http://www.php.net/manual/en/function.exif-imagetype.php#80383 - * @param string $filename + * @param string $fileName * @return string|boolean */ function exif_imagetype ( $fileName ) { diff --git a/lib/private/installer.php b/lib/private/installer.php index 835b6b4c01a..1b974c6e5a5 100644 --- a/lib/private/installer.php +++ b/lib/private/installer.php @@ -25,10 +25,6 @@ */ class OC_Installer{ /** - * @brief Installs an app - * @param $data array with all information - * @throws \Exception - * @returns integer * * This function installs an app. All information needed are passed in the * associative array $data. @@ -55,6 +51,11 @@ class OC_Installer{ * * It is the task of oc_app_install to create the tables and do whatever is * needed to get the app working. + * + * @brief Installs an app + * @param array $data with all information + * @throws \Exception + * @return integer */ public static function installApp( $data = array()) { $l = \OC_L10N::get('lib'); @@ -219,7 +220,7 @@ class OC_Installer{ /** * @brief checks whether or not an app is installed - * @param $app app + * @param string $app app * @returns true/false * * Checks whether or not an app is installed, i.e. registered in apps table. @@ -235,7 +236,7 @@ class OC_Installer{ /** * @brief Update an application - * @param $data array with all information + * @param array $data with all information * * This function installs an app. All information needed are passed in the * associative array $data. @@ -269,8 +270,8 @@ class OC_Installer{ /** * @brief Check if an update for the app is available - * @param $name name of the application - * @return boolean false or the version number of the update + * @param string $name name of the application + * @return string|false false or the version number of the update * * The function will check if an update for a version is available */ @@ -297,8 +298,8 @@ class OC_Installer{ /** * @brief Check if app is already downloaded - * @param $name name of the application to remove - * @returns true/false + * @param string $name name of the application to remove + * @return boolean * * The function will check if the app is already downloaded in the apps repository */ @@ -313,9 +314,9 @@ class OC_Installer{ /** * @brief Removes an app - * @param $name name of the application to remove + * @param string $name name of the application to remove * @param $options array with options - * @returns true/false + * @return boolean * * This function removes an app. $options is an associative array. The * following keys are optional:ja @@ -394,7 +395,7 @@ class OC_Installer{ /** * install an app already placed in the app folder * @param string $app id of the app to install - * @returns array see OC_App::getAppInfo + * @return integer */ public static function installShippedApp($app) { //install the database @@ -429,7 +430,7 @@ class OC_Installer{ /** * check the code of an app with some static code checks * @param string $folder the folder of the app to check - * @returns true for app is o.k. and false for app is not o.k. + * @return boolean true for app is o.k. and false for app is not o.k. */ public static function checkCode($appname, $folder) { diff --git a/lib/private/json.php b/lib/private/json.php index 5c5d7e3a3da..4ccdb490a6c 100644 --- a/lib/private/json.php +++ b/lib/private/json.php @@ -21,6 +21,7 @@ class OC_JSON{ /** * Check if the app is enabled, send json error msg if not + * @param string $app */ public static function checkAppEnabled($app) { if( !OC_App::isEnabled($app)) { diff --git a/lib/private/l10n.php b/lib/private/l10n.php index 1aa1dc5ea28..1d8152c5844 100644 --- a/lib/private/l10n.php +++ b/lib/private/l10n.php @@ -529,6 +529,9 @@ class OC_L10N implements \OCP\IL10N { return $available; } + /** + * @param string $lang + */ public static function languageExists($app, $lang) { if ($lang == 'en') {//english is always available return true; diff --git a/lib/private/l10n/string.php b/lib/private/l10n/string.php index 88c85b32e70..04eaacab57b 100644 --- a/lib/private/l10n/string.php +++ b/lib/private/l10n/string.php @@ -27,6 +27,9 @@ class OC_L10N_String{ */ protected $count; + /** + * @param OC_L10N $l10n + */ public function __construct($l10n, $text, $parameters, $count = 1) { $this->l10n = $l10n; $this->text = $text; diff --git a/lib/private/mail.php b/lib/private/mail.php index b339b33e962..90c3e343199 100644 --- a/lib/private/mail.php +++ b/lib/private/mail.php @@ -25,7 +25,7 @@ class OC_Mail { * @param string $mailtext * @param string $fromaddress * @param string $fromname - * @param bool|int $html + * @param integer $html * @param string $altbody * @param string $ccaddress * @param string $ccname diff --git a/lib/private/memcache/factory.php b/lib/private/memcache/factory.php index 334cf9a1f0e..d60b157efe2 100644 --- a/lib/private/memcache/factory.php +++ b/lib/private/memcache/factory.php @@ -57,7 +57,7 @@ class Factory implements ICacheFactory { * get a in-server cache instance, will return null if no backend is available * * @param string $prefix - * @return \OC\Memcache\Cache + * @return null|Cache */ public static function createLowLatency($prefix = '') { if (XCache::isAvailable()) { diff --git a/lib/private/migrate.php b/lib/private/migrate.php index 948b3d4572d..b930b719289 100644 --- a/lib/private/migrate.php +++ b/lib/private/migrate.php @@ -46,7 +46,7 @@ class OC_Migrate{ /** * register a new migration provider - * @param OC_Migrate_Provider $provider + * @param OC_Migration_Provider $provider */ public static function registerProvider($provider) { self::$providers[]=$provider; @@ -72,7 +72,7 @@ class OC_Migrate{ * @param optional $uid string user id of user to export if export type is user, defaults to current * @param ootional $type string type of export, defualts to user * @param otional $path string path to zip output folder - * @return false on error, path to zip on success + * @return string on error, path to zip on success */ public static function export( $uid=null, $type='user', $path=null ) { $datadir = OC_Config::getValue( 'datadirectory' ); @@ -307,7 +307,7 @@ class OC_Migrate{ /** * @brief recursively deletes a directory - * @param $dir string path of dir to delete + * @param string $dir string path of dir to delete * $param optional $deleteRootToo bool delete the root directory * @return bool */ @@ -407,7 +407,7 @@ class OC_Migrate{ /** * @brief generates json containing export info, and merges any data supplied * @param optional $array array of data to include in the returned json - * @return bool + * @return string */ static private function getExportInfo( $array=array() ) { $info = array( @@ -535,7 +535,7 @@ class OC_Migrate{ /** * @brief imports a new user - * @param $db string path to migration.db + * @param string $db string path to migration.db * @param $info object of migration info * @param $uid optional uid to use * @return array of apps with import statuses, or false on failure. diff --git a/lib/private/migration/content.php b/lib/private/migration/content.php index d6eee40786e..e7b6543171a 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 $zip ZipArchive object - * @param optional $db a database object (required for exporttype user) + * @param $db a database object (required for exporttype user) * @return bool */ public function __construct( $zip, $db=null ) { @@ -47,6 +47,10 @@ class OC_Migration_Content{ // @brief prepares the db // @param $query the sql query to prepare + + /** + * @param string $query + */ public function prepare( $query ) { // Only add database to tmpfiles if actually used @@ -165,7 +169,7 @@ class OC_Migration_Content{ /** * @brief adds a directory to the zip object - * @param $dir string path of the directory to add + * @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 * @return bool @@ -200,8 +204,8 @@ class OC_Migration_Content{ /** * @brief adds a file to the zip from a given string - * @param $data string of data to add - * @param $path the relative path inside of the zip to save the file to + * @param string $data string of data to add + * @param string $path the relative path inside of the zip to save the file to * @return bool */ public function addFromString( $data, $path ) { diff --git a/lib/private/ocs.php b/lib/private/ocs.php index e067196cf11..2305b3eccfe 100644 --- a/lib/private/ocs.php +++ b/lib/private/ocs.php @@ -35,11 +35,11 @@ class OC_OCS { /** * reads input date from get/post/cookies and converts the date to a special data-type * - * @param string HTTP method to read the key from - * @param string Parameter to read - * @param string Variable type to format data - * @param mixed Default value to return if the key is not found - * @return mixed Data or if the key is not found and no default is set it will exit with a 400 Bad request + * @param string $method HTTP method to read the key from + * @param string $key Parameter to read + * @param string $type Variable type to format data + * @param mixed $default Default value to return if the key is not found + * @return string Data or if the key is not found and no default is set it will exit with a 400 Bad request */ public static function readData($method, $key, $type = 'raw', $default = null) { if ($method == 'get') { @@ -96,7 +96,7 @@ class OC_OCS { /** * generated some debug information to make it easier to find faild API calls - * @return debug data string + * @return string data string */ private static function getDebugOutput() { $txt=''; @@ -214,6 +214,9 @@ class OC_OCS { } } + /** + * @param string $node + */ public static function toXml($writer, $data, $node) { foreach($data as $key => $value) { if (is_numeric($key)) { diff --git a/lib/private/ocsclient.php b/lib/private/ocsclient.php index e35556d92b8..fa6e3fac1bb 100644 --- a/lib/private/ocsclient.php +++ b/lib/private/ocsclient.php @@ -50,6 +50,7 @@ class OC_OCSClient{ * @brief Get the content of an OCS url call. * @returns string of the response * This function calls an OCS server and returns the response. It also sets a sane timeout + * @param string $url */ private static function getOCSresponse($url) { $data = \OC_Util::getUrlContent($url); @@ -92,6 +93,8 @@ class OC_OCSClient{ * @returns array with application data * * This function returns a list of all the applications on the OCS server + * @param integer $page + * @param string $filter */ public static function getApplications($categories, $page, $filter) { if(OC_Config::getValue('appstoreenabled', true)==false) { @@ -184,6 +187,7 @@ class OC_OCSClient{ * @returns array with application data * * This function returns an download url for an applications from the OCS server + * @param integer $item */ public static function getApplicationDownload($id, $item) { if(OC_Config::getValue('appstoreenabled', true)==false) { diff --git a/lib/private/preview.php b/lib/private/preview.php index ff93f438f73..80fd003ed8d 100755 --- a/lib/private/preview.php +++ b/lib/private/preview.php @@ -138,7 +138,7 @@ class Preview { /** * @brief returns the max scale factor - * @return integer + * @return string */ public function getMaxScaleFactor() { return $this->maxScaleFactor; @@ -146,7 +146,7 @@ class Preview { /** * @brief returns the max width set in ownCloud's config - * @return integer + * @return string */ public function getConfigMaxX() { return $this->configMaxX; @@ -154,7 +154,7 @@ class Preview { /** * @brief returns the max height set in ownCloud's config - * @return integer + * @return string */ public function getConfigMaxY() { return $this->configMaxY; @@ -570,7 +570,6 @@ class Preview { /** * @brief register a new preview provider to be used - * @param string $provider class name of a Preview_Provider * @param array $options * @return void */ @@ -619,6 +618,9 @@ class Preview { $preview->deleteAllPreviews(); } + /** + * @param string $mimetype + */ public static function isMimeSupported($mimetype) { if(!\OC_Config::getValue('enable_previews', true)) { return false; diff --git a/lib/private/preview/provider.php b/lib/private/preview/provider.php index 65d09705f40..88337d64e4b 100644 --- a/lib/private/preview/provider.php +++ b/lib/private/preview/provider.php @@ -15,7 +15,7 @@ abstract class Provider { * @param string $path Path of file * @param int $maxX The maximum X size of the thumbnail. It can be smaller depending on the shape of the image * @param int $maxY The maximum Y size of the thumbnail. It can be smaller depending on the shape of the image - * @param bool $scalingUp Disable/Enable upscaling of previews + * @param bool $scalingup Disable/Enable upscaling of previews * @param object $fileview fileview object of user folder * @return mixed * false if no preview was generated diff --git a/lib/private/request.php b/lib/private/request.php index 2c5b907846e..a7e7bd0ea1d 100755 --- a/lib/private/request.php +++ b/lib/private/request.php @@ -87,6 +87,7 @@ class OC_Request { * * Returns the request uri, even if the website uses one or more * reverse proxies + * @return string */ public static function requestUri() { $uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : ''; @@ -98,7 +99,7 @@ class OC_Request { /** * @brief Returns the script name - * @returns string the script name + * @return string the script name * * Returns the script name, even if the website uses one or more * reverse proxies @@ -115,7 +116,7 @@ class OC_Request { /** * @brief get Path info from request - * @returns string Path info or false when not found + * @return string Path info or false when not found */ public static function getPathInfo() { if (array_key_exists('PATH_INFO', $_SERVER)) { @@ -139,7 +140,7 @@ class OC_Request { /** * @brief get Path info from request, not urldecoded - * @returns string Path info or false when not found + * @return string Path info or false when not found */ public static function getRawPathInfo() { $requestUri = $_SERVER['REQUEST_URI']; @@ -180,7 +181,7 @@ class OC_Request { /** * @brief Check if this is a no-cache request - * @returns boolean true for no-cache + * @return boolean true for no-cache */ static public function isNoCache() { if (!isset($_SERVER['HTTP_CACHE_CONTROL'])) { @@ -191,7 +192,7 @@ class OC_Request { /** * @brief Check if the requestor understands gzip - * @returns boolean true for gzip encoding supported + * @return boolean true for gzip encoding supported */ static public function acceptGZip() { if (!isset($_SERVER['HTTP_ACCEPT_ENCODING'])) { @@ -207,7 +208,7 @@ class OC_Request { /** * @brief Check if the requester sent along an mtime - * @returns false or an mtime + * @return false or an mtime */ static public function hasModificationTime () { if (isset($_SERVER['HTTP_X_OC_MTIME'])) { diff --git a/lib/private/response.php b/lib/private/response.php index 52dbb9d90f8..71c538fb311 100644 --- a/lib/private/response.php +++ b/lib/private/response.php @@ -15,7 +15,7 @@ class OC_Response { /** * @brief Enable response caching by sending correct HTTP headers - * @param $cache_time time to cache the response + * @param integer $cache_time time to cache the response * >0 cache time in seconds * 0 and <0 enable default browser caching * null cache indefinitly @@ -80,7 +80,7 @@ class OC_Response { /** * @brief Send redirect response - * @param $location to redirect to + * @param string $location to redirect to */ static public function redirect($location) { self::setStatus(self::STATUS_TEMPORARY_REDIRECT); @@ -167,7 +167,7 @@ class OC_Response { /** * @brief Send file as response, checking and setting caching headers - * @param $filepath of file to send + * @param string $filepath of file to send */ static public function sendFile($filepath) { $fp = fopen($filepath, 'rb'); diff --git a/lib/private/search.php b/lib/private/search.php index b9c75dfc333..70d670e048e 100644 --- a/lib/private/search.php +++ b/lib/private/search.php @@ -38,7 +38,6 @@ class OC_Search{ /** * register a new search provider to be used - * @param string $provider class name of a OC_Search_Provider */ public static function registerProvider($class, $options=array()) { self::$registeredProviders[]=array('class'=>$class, 'options'=>$options); diff --git a/lib/private/search/result.php b/lib/private/search/result.php index 42275c2df11..ceefeab2dae 100644 --- a/lib/private/search/result.php +++ b/lib/private/search/result.php @@ -15,6 +15,7 @@ class OC_Search_Result{ * @param string $text some more information about the result * @param string $link link for the result * @param string $type the type of result as human readable string ('File', 'Music', etc) + * @param string $container */ public function __construct($name, $text, $link, $type, $container) { $this->name=$name; diff --git a/lib/private/session/memory.php b/lib/private/session/memory.php index 134cee582ed..1b9ac452575 100644 --- a/lib/private/session/memory.php +++ b/lib/private/session/memory.php @@ -25,7 +25,7 @@ class Memory extends Session { /** * @param string $key - * @param mixed $value + * @param integer $value */ public function set($key, $value) { $this->data[$key] = $value; diff --git a/lib/private/tags.php b/lib/private/tags.php index fe7de1073a0..06550068f76 100644 --- a/lib/private/tags.php +++ b/lib/private/tags.php @@ -73,6 +73,7 @@ class Tags implements \OCP\ITags { * Constructor. * * @param string $user The user whos data the object will operate on. + * @param string $type */ public function __construct($user, $type, $defaultTags = array()) { $this->user = $user; @@ -83,8 +84,6 @@ class Tags implements \OCP\ITags { /** * Load tags from db. * - * @param string $type The type identifier e.g. 'contact' or 'event'. - * @param array $defaultTags An array of default tags to be used if none are stored. */ protected function loadTags($defaultTags=array()) { $this->tags = array(); @@ -176,7 +175,7 @@ class Tags implements \OCP\ITags { * * Throws an exception if the tag could not be found. * - * @param string|integer $tag Tag id or name. + * @param string $tag Tag id or name. * @return array An array of object ids or false on error. */ public function getIdsForTag($tag) { @@ -235,7 +234,7 @@ class Tags implements \OCP\ITags { * Add a new tag. * * @param string $name A string with a name of the tag - * @return int the id of the added tag or false if it already exists. + * @return false|string the id of the added tag or false if it already exists. */ public function add($name) { $name = trim($name); @@ -512,7 +511,7 @@ class Tags implements \OCP\ITags { * Creates a tag/object relation. * * @param int $objid The id of the object - * @param int|string $tag The id or name of the tag + * @param string $tag The id or name of the tag * @return boolean Returns false on database error. */ public function tagAs($objid, $tag) { @@ -544,7 +543,7 @@ class Tags implements \OCP\ITags { * Delete single tag/object relation from the db * * @param int $objid The id of the object - * @param int|string $tag The id or name of the tag + * @param string $tag The id or name of the tag * @return boolean */ public function unTag($objid, $tag) { diff --git a/lib/private/template.php b/lib/private/template.php index b2c3a20f281..c6851c6cc8d 100644 --- a/lib/private/template.php +++ b/lib/private/template.php @@ -156,6 +156,9 @@ class OC_Template extends \OC\Template\Base { * * Will select the template file for the selected theme and formfactor. * Checking all the possible locations. + * @param string $theme + * @param string $app + * @param string $fext */ protected function findTemplate($theme, $app, $name, $fext) { // Check if it is a app template or not. @@ -182,7 +185,7 @@ class OC_Template extends \OC\Template\Base { /** * @brief Process the template - * @return bool + * @return boolean|string * * This function process the template. If $this->renderas is set, it * will produce a full page. @@ -223,7 +226,7 @@ class OC_Template extends \OC\Template\Base { * @param string $application The application we render the template for * @param string $name Name of the template * @param array $parameters Parameters for the template - * @return bool + * @return boolean|null */ public static function printUserPage( $application, $name, $parameters = array() ) { $content = new OC_Template( $application, $name, "user" ); diff --git a/lib/private/template/base.php b/lib/private/template/base.php index 88941bc7132..e698d855a91 100644 --- a/lib/private/template/base.php +++ b/lib/private/template/base.php @@ -14,6 +14,11 @@ class Base { private $l10n; // The l10n-Object private $theme; // theme defaults + /** + * @param string $template + * @param \OC_L10N $l10n + * @param \OC_Defaults $theme + */ public function __construct( $template, $requesttoken, $l10n, $theme ) { $this->vars = array(); $this->vars['requesttoken'] = $requesttoken; @@ -22,6 +27,10 @@ class Base { $this->theme = $theme; } + /** + * @param string $serverroot + * @param string|false $app_dir + */ protected function getAppTemplateDirs($theme, $app, $serverroot, $app_dir) { // Check if the app is in the app folder or in the root if( file_exists($app_dir.'/templates/' )) { @@ -36,6 +45,9 @@ class Base { ); } + /** + * @param string $serverroot + */ protected function getCoreTemplateDirs($theme, $serverroot) { return array( $serverroot.'/themes/'.$theme.'/core/templates/', @@ -63,7 +75,7 @@ class Base { * @brief Appends a variable * @param string $key key * @param string $value value - * @return bool + * @return boolean|null * * This function assigns a variable in an array context. If the key already * exists, the value will be appended. It can be accessed via @@ -97,7 +109,7 @@ class Base { /** * @brief Process the template - * @return bool + * @return string * * This function processes the template. */ diff --git a/lib/private/template/functions.php b/lib/private/template/functions.php index ce42633b364..a72d41f72da 100644 --- a/lib/private/template/functions.php +++ b/lib/private/template/functions.php @@ -78,6 +78,9 @@ function preview_icon( $path ) { return OC_Helper::previewIcon( $path ); } +/** + * @param string $path + */ function publicPreview_icon ( $path, $token ) { return OC_Helper::publicPreviewIcon( $path, $token ); } @@ -110,7 +113,7 @@ function strip_time($timestamp){ * @param int $timestamp timestamp to format * @param int $fromTime timestamp to compare from, defaults to current time * @param bool $dateOnly whether to strip time information - * @return formatted timestamp + * @return OC_L10N_String timestamp */ function relative_modified_date($timestamp, $fromTime = null, $dateOnly = false) { $l=OC_L10N::get('lib'); diff --git a/lib/private/template/resourcelocator.php b/lib/private/template/resourcelocator.php index 9f83673664d..8a3dd5e7fa9 100644 --- a/lib/private/template/resourcelocator.php +++ b/lib/private/template/resourcelocator.php @@ -19,6 +19,10 @@ abstract class ResourceLocator { protected $resources = array(); + /** + * @param string $theme + * @param string $form_factor + */ public function __construct( $theme, $form_factor, $core_map, $party_map ) { $this->theme = $theme; $this->form_factor = $form_factor; @@ -53,6 +57,10 @@ abstract class ResourceLocator { * @param $file the filename * @param $web base for path, default map $root to $webroot */ + /** + * @param string $file + * @param string|false $webroot + */ protected function appendIfExist($root, $file, $webroot = null) { if (is_file($root.'/'.$file)) { if (!$webroot) { diff --git a/lib/private/template/templatefilelocator.php b/lib/private/template/templatefilelocator.php index d5a484b1a14..05cd752cd4f 100644 --- a/lib/private/template/templatefilelocator.php +++ b/lib/private/template/templatefilelocator.php @@ -13,11 +13,17 @@ class TemplateFileLocator { protected $dirs; private $path; + /** + * @param string[] $dirs + */ public function __construct( $form_factor, $dirs ) { $this->form_factor = $form_factor; $this->dirs = $dirs; } + /** + * @param string $template + */ public function find( $template ) { if ($template === '') { throw new \InvalidArgumentException('Empty template name'); diff --git a/lib/private/templatelayout.php b/lib/private/templatelayout.php index d5cd5039753..7bca5bc4836 100644 --- a/lib/private/templatelayout.php +++ b/lib/private/templatelayout.php @@ -7,6 +7,10 @@ */ class OC_TemplateLayout extends OC_Template { + + /** + * @param string $renderas + */ public function __construct( $renderas ) { // Decide which page we show diff --git a/lib/private/user.php b/lib/private/user.php index 2519200d0f0..a8e7967783e 100644 --- a/lib/private/user.php +++ b/lib/private/user.php @@ -222,7 +222,7 @@ class OC_User { * @brief Try to login a user * @param $uid The username of the user to log in * @param $password The password of the user - * @return bool + * @return boolean|null * * Log in a user and regenerate a new session - if the password is ok */ @@ -290,6 +290,7 @@ class OC_User { /** * @brief Sets user display name for session + * @param string $uid */ public static function setDisplayName($uid, $displayName = null) { if (is_null($displayName)) { @@ -481,7 +482,7 @@ class OC_User { * @brief Check if the password is correct * @param string $uid The username * @param string $password The password - * @return mixed user id a string on success, false otherwise + * @return string|false user id a string on success, false otherwise * * Check if the password is correct without logging in the user * returns the user id or false @@ -609,7 +610,7 @@ class OC_User { /** * @brief Returns the first active backend from self::$_usedBackends. - * @return null if no backend active, otherwise OCP\Authentication\IApacheBackend + * @return OCP\Authentication\IApacheBackend|null if no backend active, otherwise OCP\Authentication\IApacheBackend */ private static function findFirstActiveUsedBackend() { foreach (self::$_usedBackends as $backend) { diff --git a/lib/private/user/database.php b/lib/private/user/database.php index 1a63755b980..094a8f2e2a4 100644 --- a/lib/private/user/database.php +++ b/lib/private/user/database.php @@ -236,7 +236,7 @@ class OC_User_Database extends OC_User_Backend { /** * @brief get the user's home directory * @param string $uid the username - * @return boolean + * @return string|false */ public function getHome($uid) { if ($this->userExists($uid)) { diff --git a/lib/private/user/dummy.php b/lib/private/user/dummy.php index fc15a630cf3..2fb51d02de3 100644 --- a/lib/private/user/dummy.php +++ b/lib/private/user/dummy.php @@ -100,7 +100,7 @@ class OC_User_Dummy extends OC_User_Backend { * @param string $search * @param int $limit * @param int $offset - * @return array with all uids + * @return string[] with all uids * * Get a list of all users. */ diff --git a/lib/private/user/http.php b/lib/private/user/http.php index e99afe59ba7..a0394521012 100644 --- a/lib/private/user/http.php +++ b/lib/private/user/http.php @@ -98,7 +98,7 @@ class OC_User_HTTP extends OC_User_Backend { /** * @brief get the user's home directory * @param string $uid the username - * @return boolean + * @return string|false */ public function getHome($uid) { if($this->userExists($uid)) { diff --git a/lib/private/user/interface.php b/lib/private/user/interface.php index c72bdfaf3fd..cdcab3e5d00 100644 --- a/lib/private/user/interface.php +++ b/lib/private/user/interface.php @@ -30,6 +30,7 @@ interface OC_User_Interface { * * Returns the supported actions as int to be * compared with OC_USER_BACKEND_CREATE_USER etc. + * @return boolean */ public function implementsActions($actions); @@ -39,6 +40,7 @@ interface OC_User_Interface { * @returns true/false * * Deletes a user + * @return boolean */ public function deleteUser($uid); diff --git a/lib/private/user/manager.php b/lib/private/user/manager.php index 90970ef9963..8583a451f2d 100644 --- a/lib/private/user/manager.php +++ b/lib/private/user/manager.php @@ -144,8 +144,8 @@ class Manager extends PublicEmitter { /** * Check if the password is valid for the user * - * @param $loginname - * @param $password + * @param string $loginname + * @param string $password * @return mixed the User object on success, false otherwise */ public function checkPassword($loginname, $password) { diff --git a/lib/private/user/session.php b/lib/private/user/session.php index 1e299416fb3..1740bad5abe 100644 --- a/lib/private/user/session.php +++ b/lib/private/user/session.php @@ -149,7 +149,7 @@ class Session implements Emitter, \OCP\IUserSession { * * @param string $uid * @param string $password - * @return bool + * @return boolean|null */ public function login($uid, $password) { $this->manager->emit('\OC\User', 'preLogin', array($uid, $password)); diff --git a/lib/private/util.php b/lib/private/util.php index 246c82a26c7..af39d983f67 100755 --- a/lib/private/util.php +++ b/lib/private/util.php @@ -90,6 +90,9 @@ class OC_Util { return true; } + /** + * @param string $user + */ public static function getUserQuota($user){ $config = \OC::$server->getConfig(); $userQuota = $config->getUserValue($user, 'files', 'quota', 'default'); @@ -215,7 +218,7 @@ class OC_Util { * @brief add a javascript file * * @param string $application - * @param filename $file + * @param mixed $file filename * @return void */ public static function addScript( $application, $file = null ) { @@ -234,7 +237,7 @@ class OC_Util { * @brief add a css file * * @param string $application - * @param filename $file + * @param mixed $file filename * @return void */ public static function addStyle( $application, $file = null ) { @@ -513,7 +516,7 @@ class OC_Util { /** * @brief Check for correct file permissions of data directory - * @paran string $dataDirectory + * @param string $dataDirectory * @return array arrays with error messages and hints */ public static function checkDataDirectoryPermissions($dataDirectory) { @@ -626,7 +629,7 @@ class OC_Util { /** * @brief Check if the user is a subadmin, redirects to home if not - * @return array $groups where the current user is subadmin + * @return null|boolean $groups where the current user is subadmin */ public static function checkSubAdminUser() { OC_Util::checkLoggedIn(); @@ -925,7 +928,7 @@ class OC_Util { /** * @brief Check if the connection to the internet is disabled on purpose - * @return bool + * @return string */ public static function isInternetConnectionEnabled(){ return \OC_Config::getValue("has_internet_connection", true); @@ -1130,6 +1133,7 @@ class OC_Util { } /** + * @param boolean|string $file * @return string */ public static function basename($file) { |