summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2014-04-21 15:44:54 +0200
committerLukas Reschke <lukas@statuscode.ch>2014-04-21 15:44:54 +0200
commite88731a477991f54120939724da3c8a455c48b97 (patch)
treeb33e14f6bce285890135bce4bdd3ab8099d6819b /lib/private
parent4fe5ca1908757781872133c7140f4c8848e94ac6 (diff)
downloadnextcloud-server-e88731a477991f54120939724da3c8a455c48b97.tar.gz
nextcloud-server-e88731a477991f54120939724da3c8a455c48b97.zip
Some more PHPDoc fixes
Diffstat (limited to 'lib/private')
-rwxr-xr-xlib/private/activitymanager.php2
-rw-r--r--lib/private/api.php4
-rw-r--r--lib/private/app.php2
-rw-r--r--lib/private/appconfig.php1
-rw-r--r--lib/private/archive.php7
-rw-r--r--lib/private/arrayparser.php13
-rw-r--r--lib/private/geo.php12
-rw-r--r--lib/private/group.php11
-rw-r--r--lib/private/helper.php2
-rw-r--r--lib/private/json.php5
-rw-r--r--lib/private/l10n.php33
-rw-r--r--lib/private/migrate.php39
-rw-r--r--lib/private/migration/content.php2
-rw-r--r--lib/private/ocs.php29
-rw-r--r--lib/private/ocsclient.php17
-rwxr-xr-xlib/private/preview.php16
-rwxr-xr-xlib/private/request.php1
-rw-r--r--lib/private/response.php2
-rw-r--r--lib/private/search.php2
-rw-r--r--lib/private/template.php4
-rw-r--r--lib/private/templatelayout.php14
-rw-r--r--lib/private/urlgenerator.php1
-rw-r--r--lib/private/user.php11
-rwxr-xr-xlib/private/util.php15
-rw-r--r--lib/private/vobject.php59
25 files changed, 194 insertions, 110 deletions
diff --git a/lib/private/activitymanager.php b/lib/private/activitymanager.php
index 685809581ac..66aa039eb18 100755
--- a/lib/private/activitymanager.php
+++ b/lib/private/activitymanager.php
@@ -46,7 +46,7 @@ class ActivityManager implements IManager {
$type,
$priority);
} catch (\Exception $ex) {
- // TODO: log the excepetion
+ // TODO: log the exception
}
}
diff --git a/lib/private/api.php b/lib/private/api.php
index b3b5eb1067b..74887690952 100644
--- a/lib/private/api.php
+++ b/lib/private/api.php
@@ -127,9 +127,9 @@ class OC_API {
/**
* merge the returned result objects into one response
* @param array $responses
+ * @return array|\OC_OCS_Result
*/
public static function mergeResponses($responses) {
- $response = array();
// Sort into shipped and thirdparty
$shipped = array(
'succeeded' => array(),
@@ -191,7 +191,7 @@ class OC_API {
// Merge the successful responses
$data = array();
- foreach($responses as $app => $response) {
+ foreach($responses as $response) {
if($response['shipped']) {
$data = array_merge_recursive($response['response']->getData(), $data);
} else {
diff --git a/lib/private/app.php b/lib/private/app.php
index c5fcad8f005..2f55b54b328 100644
--- a/lib/private/app.php
+++ b/lib/private/app.php
@@ -568,7 +568,7 @@ class OC_App{
/**
* @brief Returns the navigation
- * @return string
+ * @return array
*
* This function returns an array containing all entries added. The
* entries are sorted by the key 'order' ascending. Additional to the keys
diff --git a/lib/private/appconfig.php b/lib/private/appconfig.php
index fed6989a438..0cd6b3bc35b 100644
--- a/lib/private/appconfig.php
+++ b/lib/private/appconfig.php
@@ -71,6 +71,7 @@ class AppConfig implements \OCP\IAppConfig {
/**
* @param string $app
+ * @return \string[]
*/
private function getAppValues($app) {
$appCache = $this->getAppCache($app);
diff --git a/lib/private/archive.php b/lib/private/archive.php
index 6f51066ddf8..a62f22cf6d7 100644
--- a/lib/private/archive.php
+++ b/lib/private/archive.php
@@ -10,7 +10,7 @@ abstract class OC_Archive{
/**
* open any of the supported archive types
* @param string $path
- * @return OC_Archive
+ * @return OC_Archive|void
*/
public static function open($path) {
$ext=substr($path, strrpos($path, '.'));
@@ -29,6 +29,9 @@ abstract class OC_Archive{
}
}
+ /**
+ * @param $source
+ */
abstract function __construct($source);
/**
* add an empty folder to the archive
@@ -39,7 +42,7 @@ abstract class OC_Archive{
/**
* add a file to the archive
* @param string $path
- * @param string source either a local file or string data
+ * @param string $source either a local file or string data
* @return bool
*/
abstract function addFile($path, $source='');
diff --git a/lib/private/arrayparser.php b/lib/private/arrayparser.php
index d353e486577..a5e1f6653fc 100644
--- a/lib/private/arrayparser.php
+++ b/lib/private/arrayparser.php
@@ -32,6 +32,7 @@ class ArrayParser {
/**
* @param string $string
+ * @return array|bool|int|null|string
*/
function parsePHP($string) {
$string = $this->stripPHPTags($string);
@@ -41,6 +42,7 @@ class ArrayParser {
/**
* @param string $string
+ * @return string
*/
function stripPHPTags($string) {
$string = trim($string);
@@ -55,6 +57,7 @@ class ArrayParser {
/**
* @param string $string
+ * @return string
*/
function stripAssignAndReturn($string) {
$string = trim($string);
@@ -67,6 +70,10 @@ class ArrayParser {
return $string;
}
+ /**
+ * @param string $string
+ * @return array|bool|int|null|string
+ */
function parse($string) {
$string = trim($string);
$string = trim($string, ';');
@@ -85,6 +92,7 @@ class ArrayParser {
/**
* @param string $string
+ * @return int
*/
function getType($string) {
$string = strtolower($string);
@@ -104,6 +112,7 @@ class ArrayParser {
/**
* @param string $string
+ * @return string
*/
function parseString($string) {
return substr($string, 1, -1);
@@ -111,6 +120,7 @@ class ArrayParser {
/**
* @param string $string
+ * @return int
*/
function parseNum($string) {
return intval($string);
@@ -118,6 +128,7 @@ class ArrayParser {
/**
* @param string $string
+ * @return bool
*/
function parseBool($string) {
$string = strtolower($string);
@@ -126,6 +137,7 @@ class ArrayParser {
/**
* @param string $string
+ * @return array
*/
function parseArray($string) {
$body = substr($string, 5);
@@ -157,6 +169,7 @@ class ArrayParser {
/**
* @param string $body
+ * @return array
*/
function splitArray($body) {
$inSingleQuote = false;//keep track if we are inside quotes
diff --git a/lib/private/geo.php b/lib/private/geo.php
index 7094d885af6..cd62511f0c1 100644
--- a/lib/private/geo.php
+++ b/lib/private/geo.php
@@ -6,15 +6,11 @@
* See the COPYING-README file.
*/
class OC_Geo{
- /*
- * @brief returns the closest timezone to coordinates
- * @param (string) $latitude - Latitude
- * @param (string) $longitude - Longitude
- * @return (string) $timezone - closest timezone
- */
/**
- * @param integer $latitude
- * @param integer $longitude
+ * @brief returns the closest timezone to coordinates
+ * @param $latitude
+ * @param $longitude
+ * @return mixed Closest timezone
*/
public static function timezone($latitude, $longitude) {
$alltimezones = DateTimeZone::listIdentifiers();
diff --git a/lib/private/group.php b/lib/private/group.php
index 4c187b538af..d9f430f833b 100644
--- a/lib/private/group.php
+++ b/lib/private/group.php
@@ -200,6 +200,9 @@ class OC_Group {
/**
* @brief get a list of all groups
+ * @param string $search
+ * @param int|null $limit
+ * @param int|null $offset
* @returns array with group names
*
* Returns a list with all groups
@@ -225,6 +228,10 @@ class OC_Group {
/**
* @brief get a list of all users in a group
+ * @param string $gid
+ * @param string $search
+ * @param int $limit
+ * @param int $offset
* @returns array with user ids
*/
public static function usersInGroup($gid, $search = '', $limit = -1, $offset = 0) {
@@ -260,6 +267,10 @@ class OC_Group {
/**
* @brief get a list of all display names in a group
+ * @param string $gid
+ * @param string $search
+ * @param int $limit
+ * @param int $offset
* @returns array with display names (value) and user ids(key)
*/
public static function displayNamesInGroup($gid, $search = '', $limit = -1, $offset = 0) {
diff --git a/lib/private/helper.php b/lib/private/helper.php
index d5214823de9..ab1e0d38924 100644
--- a/lib/private/helper.php
+++ b/lib/private/helper.php
@@ -36,7 +36,7 @@ class OC_Helper {
* @param array $parameters
* @return
* @internal param array $args with param=>value, will be appended to the returned url
- * @returns the url
+ * @returns string the url
*
* Returns a url to the given app and file.
*/
diff --git a/lib/private/json.php b/lib/private/json.php
index 34f81c3b8cf..4634d7adfea 100644
--- a/lib/private/json.php
+++ b/lib/private/json.php
@@ -43,8 +43,7 @@ class OC_JSON{
}
/**
- * @brief Check an ajax get/post call if the request token is valid.
- * @return json Error msg if not valid.
+ * Check an ajax get/post call if the request token is valid, send json error msg if not.
*/
public static function callCheck() {
if( !OC_Util::isCallRegistered()) {
@@ -55,7 +54,7 @@ class OC_JSON{
}
/**
- * Check if the user is a admin, send json error msg if not
+ * Check if the user is a admin, send json error msg if not.
*/
public static function checkAdminUser() {
if( !OC_User::isAdminUser(OC_User::getUser())) {
diff --git a/lib/private/l10n.php b/lib/private/l10n.php
index a397945b829..c7e4328161e 100644
--- a/lib/private/l10n.php
+++ b/lib/private/l10n.php
@@ -267,43 +267,18 @@ class OC_L10N implements \OCP\IL10N {
$identifier = "_${text_singular}_::_${text_plural}_";
if( array_key_exists($identifier, $this->translations)) {
return new OC_L10N_String( $this, $identifier, $parameters, $count );
- }
- else{
+ }else{
if($count === 1) {
return new OC_L10N_String($this, $text_singular, $parameters, $count);
- }
- else{
+ }else{
return new OC_L10N_String($this, $text_plural, $parameters, $count);
}
}
}
/**
- * @brief Translating
- * @param $textArray The text array we need a translation for
- * @returns Translation or the same text
- *
- * Returns the translation. If no translation is found, $textArray will be
- * returned.
- *
- *
- * @deprecated deprecated since ownCloud version 5.0
- * This method will probably be removed with ownCloud 6.0
- *
- *
- */
- public function tA($textArray) {
- OC_Log::write('core', 'DEPRECATED: the method tA is deprecated and will be removed soon.', OC_Log::WARN);
- $result = array();
- foreach($textArray as $key => $text) {
- $result[$key] = (string)$this->t($text);
- }
- return $result;
- }
-
- /**
* @brief getTranslations
- * @returns Fetch all translations
+ * @returns array Fetch all translations
*
* Returns an associative array with all translations
*/
@@ -339,7 +314,7 @@ class OC_L10N implements \OCP\IL10N {
/**
* @brief get localizations
- * @returns Fetch all localizations
+ * @returns array Fetch all localizations
*
* Returns an associative array with all localizations
*/
diff --git a/lib/private/migrate.php b/lib/private/migrate.php
index 3fb3e334ea2..5bcc11b061b 100644
--- a/lib/private/migrate.php
+++ b/lib/private/migrate.php
@@ -69,9 +69,9 @@ class OC_Migrate{
/**
* @brief exports a user, or owncloud instance
- * @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
+ * @param string $uid user id of user to export if export type is user, defaults to current
+ * @param string $type type of export, defualts to user
+ * @param string $path path to zip output folder
* @return string on error, path to zip on success
*/
public static function export( $uid=null, $type='user', $path=null ) {
@@ -192,11 +192,12 @@ class OC_Migrate{
}
/**
- * @brief imports a user, or owncloud instance
- * @param $path string path to zip
- * @param optional $type type of import (user or instance)
- * @param optional $uid userid of new user
- */
+ * @brief imports a user, or owncloud instance
+ * @param string $path path to zip
+ * @param string $type type of import (user or instance)
+ * @param string|null|int $uid userid of new user
+ * @return string
+ */
public static function import( $path, $type='user', $uid=null ) {
$datadir = OC_Config::getValue( 'datadirectory' );
@@ -307,8 +308,8 @@ class OC_Migrate{
/**
* @brief recursively deletes a directory
- * @param string $dir string path of dir to delete
- * $param optional $deleteRootToo bool delete the root directory
+ * @param string $dir path of dir to delete
+ * @param bool $deleteRootToo delete the root directory
* @return bool
*/
private static function unlink_r( $dir, $deleteRootToo=true ) {
@@ -406,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
+ * @param array $array of data to include in the returned json
* @return string
*/
static private function getExportInfo( $array=array() ) {
@@ -430,8 +431,7 @@ class OC_Migrate{
/**
* @brief connects to migration.db, or creates if not found
- * @param $db optional path to migration.db, defaults to user data dir
- * @param string $path
+ * @param string $path to migration.db, defaults to user data dir
* @return bool whether the operation was successful
*/
static private function connectDB( $path=null ) {
@@ -461,7 +461,7 @@ class OC_Migrate{
/**
* @brief creates the tables in migration.db from an apps database.xml
- * @param string $appid string id of the app
+ * @param string $appid id of the app
* @return bool whether the operation was successful
*/
static private function createAppTables( $appid ) {
@@ -499,7 +499,6 @@ class OC_Migrate{
/**
* @brief tries to create the zip
- * @param $path string path to zip destination
* @return bool
*/
static private function createZip() {
@@ -538,7 +537,7 @@ class OC_Migrate{
* @brief imports a new user
* @param string $db string path to migration.db
* @param $info object of migration info
- * @param $uid optional uid to use
+ * @param string|null|int $uid uid to use
* @return array of apps with import statuses, or false on failure.
*/
public static function importAppData( $db, $info, $uid=null ) {
@@ -601,10 +600,10 @@ class OC_Migrate{
}
- /*
- * @brief creates a new user in the database
- * @param $uid string user_id of the user to be created
- * @param $hash string hash of the user to be created
+ /**
+ * creates a new user in the database
+ * @param string $uid user_id of the user to be created
+ * @param string $hash hash of the user to be created
* @return bool result of user creation
*/
public static function createUser( $uid, $hash ) {
diff --git a/lib/private/migration/content.php b/lib/private/migration/content.php
index 43eba89b8d5..b0e7a4e9528 100644
--- a/lib/private/migration/content.php
+++ b/lib/private/migration/content.php
@@ -36,7 +36,7 @@ class OC_Migration_Content{
* @brief sets up the
* @param ZipArchive $zip ZipArchive object
* @param $db a database object (required for exporttype user)
- * @return boolean|null
+ * @return bool|null
*/
public function __construct( $zip, $db=null ) {
diff --git a/lib/private/ocs.php b/lib/private/ocs.php
index bbe965ce561..211e8222145 100644
--- a/lib/private/ocs.php
+++ b/lib/private/ocs.php
@@ -39,6 +39,7 @@ class OC_OCS {
* @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) {
+ $data = false;
if ($method == 'get') {
if (isset($_GET[$key])) {
$data = $_GET[$key];
@@ -107,19 +108,19 @@ class OC_OCS {
/**
- * generates the xml or json response for the API call from an multidimenional data array.
- * @param string $format
- * @param string $status
- * @param string $statuscode
- * @param string $message
- * @param array $data
- * @param string $tag
- * @param string $tagattribute
- * @param int $dimension
- * @param int $itemscount
- * @param int $itemsperpage
- * @return string xml/json
- */
+ * generates the xml or json response for the API call from an multidimenional data array.
+ * @param string $format
+ * @param string $status
+ * @param string $statuscode
+ * @param string $message
+ * @param array $data
+ * @param string $tag
+ * @param string $tagattribute
+ * @param int $dimension
+ * @param int|string $itemscount
+ * @param int|string $itemsperpage
+ * @return string xml/json
+ */
private static function generateXml($format, $status, $statuscode,
$message, $data=array(), $tag='', $tagattribute='', $dimension=-1, $itemscount='', $itemsperpage='') {
if($format=='json') {
@@ -212,6 +213,8 @@ class OC_OCS {
}
/**
+ * @param $writer
+ * @param $data
* @param string $node
*/
public static function toXml($writer, $data, $node) {
diff --git a/lib/private/ocsclient.php b/lib/private/ocsclient.php
index 68dc2c2d6ec..b0480caf028 100644
--- a/lib/private/ocsclient.php
+++ b/lib/private/ocsclient.php
@@ -95,7 +95,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 $categories
+ * @param int $page
* @param string $filter
*/
public static function getApplications($categories, $page, $filter) {
@@ -148,6 +149,7 @@ class OC_OCSClient{
/**
* @brief Get an the applications from the OCS server
+ * @param string $id
* @returns array with application data
*
* This function returns an applications from the OCS server
@@ -189,12 +191,13 @@ class OC_OCSClient{
}
/**
- * @brief Get the download url for an application from the OCS server
- * @returns array with application data
- *
- * This function returns an download url for an applications from the OCS server
- * @param integer $item
- */
+ * @brief Get the download url for an application from the OCS server
+ * @returns array with application data
+ *
+ * This function returns an download url for an applications from the OCS server
+ * @param string $id
+ * @param integer $item
+ */
public static function getApplicationDownload($id, $item) {
if(OC_Config::getValue('appstoreenabled', true)==false) {
return null;
diff --git a/lib/private/preview.php b/lib/private/preview.php
index 0187b4aacbb..cdf22240382 100755
--- a/lib/private/preview.php
+++ b/lib/private/preview.php
@@ -72,6 +72,7 @@ class Preview {
* @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
+ * @throws \Exception
* @return mixed (bool / string)
* false if thumbnail does not exist
* path to thumbnail if thumbnail exists
@@ -172,6 +173,9 @@ class Preview {
return $this->configMaxY;
}
+ /**
+ * @return false|Files\FileInfo|\OCP\Files\FileInfo
+ */
protected function getFileInfo() {
$absPath = $this->fileView->getAbsolutePath($this->file);
$absPath = Files\Filesystem::normalizePath($absPath);
@@ -211,6 +215,7 @@ class Preview {
/**
* @brief set the the max width of the preview
* @param int $maxX
+ * @throws \Exception
* @return $this
*/
public function setMaxX($maxX = 1) {
@@ -231,6 +236,7 @@ class Preview {
/**
* @brief set the the max height of the preview
* @param int $maxY
+ * @throws \Exception
* @return $this
*/
public function setMaxY($maxY = 1) {
@@ -401,6 +407,10 @@ class Preview {
return $possibleThumbnails;
}
+ /**
+ * @param string $name
+ * @return array
+ */
private function getDimensionsFromFilename($name) {
$size = explode('-', $name);
$x = (int) $size[0];
@@ -409,6 +419,11 @@ class Preview {
return array($x, $y, $aspectRatio);
}
+ /**
+ * @param int $x
+ * @param int $y
+ * @return bool
+ */
private function unscalable($x, $y) {
$maxX = $this->getMaxX();
@@ -707,6 +722,7 @@ class Preview {
/**
* @param string $mimeType
+ * @return bool
*/
public static function isMimeSupported($mimeType) {
if (!\OC_Config::getValue('enable_previews', true)) {
diff --git a/lib/private/request.php b/lib/private/request.php
index 93cb322f1b3..90f7488eea5 100755
--- a/lib/private/request.php
+++ b/lib/private/request.php
@@ -201,6 +201,7 @@ class OC_Request {
/**
* @brief get Path info from request, not urldecoded
+ * @throws Exception
* @return string Path info or false when not found
*/
public static function getRawPathInfo() {
diff --git a/lib/private/response.php b/lib/private/response.php
index 983c682bf3f..1aa5e629b8b 100644
--- a/lib/private/response.php
+++ b/lib/private/response.php
@@ -50,7 +50,7 @@ class OC_Response {
/**
* @brief Set response status
- * @param $status a HTTP status code, see also the STATUS constants
+ * @param int $status a HTTP status code, see also the STATUS constants
*/
static public function setStatus($status) {
$protocol = $_SERVER['SERVER_PROTOCOL'];
diff --git a/lib/private/search.php b/lib/private/search.php
index 70d670e048e..3f540090fdd 100644
--- a/lib/private/search.php
+++ b/lib/private/search.php
@@ -45,7 +45,7 @@ class OC_Search{
/**
* search all provider for $query
- * @param string query
+ * @param string $query
* @return array An array of OC_Search_Result's
*/
public static function search($query) {
diff --git a/lib/private/template.php b/lib/private/template.php
index 610d5fbc8e5..3d18b52bac9 100644
--- a/lib/private/template.php
+++ b/lib/private/template.php
@@ -136,6 +136,7 @@ class OC_Template extends \OC\Template\Base {
* @param string $theme
* @param string $app
* @param string $fext
+ * @return array
*/
protected function findTemplate($theme, $app, $name, $fext) {
// Check if it is a app template or not.
@@ -232,7 +233,7 @@ class OC_Template extends \OC\Template\Base {
* @brief Shortcut to print a simple page for guests
* @param string $application The application we render the template for
* @param string $name Name of the template
- * @param string $parameters Parameters for the template
+ * @param array|string $parameters Parameters for the template
* @return bool
*/
public static function printGuestPage( $application, $name, $parameters = array() ) {
@@ -261,7 +262,6 @@ class OC_Template extends \OC\Template\Base {
* print error page using Exception details
* @param Exception $exception
*/
-
public static function printExceptionErrorPage(Exception $exception) {
$error_msg = $exception->getMessage();
if ($exception->getCode()) {
diff --git a/lib/private/templatelayout.php b/lib/private/templatelayout.php
index 0c0c8d9c8d7..b7ac02a753d 100644
--- a/lib/private/templatelayout.php
+++ b/lib/private/templatelayout.php
@@ -1,8 +1,6 @@
<?php
use Assetic\Asset\AssetCollection;
use Assetic\Asset\FileAsset;
-use Assetic\Asset\GlobAsset;
-use Assetic\AssetManager;
use Assetic\AssetWriter;
use Assetic\Filter\CssRewriteFilter;
@@ -99,6 +97,10 @@ class OC_TemplateLayout extends OC_Template {
}
}
+ /**
+ * @param $styles
+ * @return array
+ */
static public function findStylesheetFiles($styles) {
// Read the selected theme from the config file
$theme = OC_Util::getTheme();
@@ -113,6 +115,10 @@ class OC_TemplateLayout extends OC_Template {
return $locator->getResources();
}
+ /**
+ * @param $scripts
+ * @return array
+ */
static public function findJavascriptFiles($scripts) {
// Read the selected theme from the config file
$theme = OC_Util::getTheme();
@@ -168,6 +174,10 @@ class OC_TemplateLayout extends OC_Template {
$this->append('cssfiles', OC_Helper::linkTo('assets', "$cssHash.css"));
}
+ /**
+ * @param $files
+ * @return string
+ */
private static function hashScriptNames($files)
{
$files = array_map(function ($item) {
diff --git a/lib/private/urlgenerator.php b/lib/private/urlgenerator.php
index c28e6a7cb4c..a56b0fe3378 100644
--- a/lib/private/urlgenerator.php
+++ b/lib/private/urlgenerator.php
@@ -95,6 +95,7 @@ class URLGenerator implements IURLGenerator {
* @brief Creates path to an image
* @param string $app app
* @param string $image image name
+ * @throws \RuntimeException If the image does not exist
* @return string the url
*
* Returns the path to the image.
diff --git a/lib/private/user.php b/lib/private/user.php
index dc4c7ec3b61..7106d664aca 100644
--- a/lib/private/user.php
+++ b/lib/private/user.php
@@ -37,6 +37,10 @@
* logout()
*/
class OC_User {
+
+ /**
+ * @return \OC\User\Session
+ */
public static function getUserSession() {
return OC::$server->getUserSession();
}
@@ -220,8 +224,8 @@ 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
+ * @param string $uid The username of the user to log in
+ * @param string $password The password of the user
* @return boolean|null
*
* Log in a user and regenerate a new session - if the password is ok
@@ -291,6 +295,8 @@ class OC_User {
/**
* @brief Sets user display name for session
* @param string $uid
+ * @param null $displayName
+ * @return bool Whether the display name could get set
*/
public static function setDisplayName($uid, $displayName = null) {
if (is_null($displayName)) {
@@ -514,6 +520,7 @@ class OC_User {
* @returns array with all uids
*
* Get a list of all users.
+ * @param string $search
* @param integer $limit
* @param integer $offset
*/
diff --git a/lib/private/util.php b/lib/private/util.php
index e20de308e87..e6aa7b061b5 100755
--- a/lib/private/util.php
+++ b/lib/private/util.php
@@ -87,7 +87,9 @@ class OC_Util {
}
/**
+ * Get the quota of a user
* @param string $user
+ * @return int Quota bytes
*/
public static function getUserQuota($user){
$config = \OC::$server->getConfig();
@@ -301,8 +303,6 @@ class OC_Util {
return $errors;
}
- $defaults = new \OC_Defaults();
-
$webServerRestart = false;
//check for database drivers
if(!(is_callable('sqlite_open') or class_exists('SQLite3'))
@@ -598,11 +598,11 @@ class OC_Util {
}
/**
- * @return void
+ * @param array $errors
*/
public static function displayLoginPage($errors = array()) {
$parameters = array();
- foreach( $errors as $key => $value ) {
+ foreach( $errors as $value ) {
$parameters[$value] = true;
}
if (!empty($_POST['user'])) {
@@ -827,12 +827,13 @@ class OC_Util {
}
/**
- * @brief Check if the htaccess file is working
+ * @brief Check if the .htaccess file is working
+ * @throws OC\HintException If the testfile can't get written.
* @return bool
- * @description Check if the htaccess file is working by creating a test
+ * @description Check if the .htaccess file is working by creating a test
* file in the data directory and trying to access via http
*/
- public static function isHtAccessWorking() {
+ public static function isHtaccessWorking() {
if (!\OC_Config::getValue("check_for_working_htaccess", true)) {
return true;
}
diff --git a/lib/private/vobject.php b/lib/private/vobject.php
index 267176ebc07..a3e9f7ef790 100644
--- a/lib/private/vobject.php
+++ b/lib/private/vobject.php
@@ -36,8 +36,8 @@ class OC_VObject{
/**
* @brief Parses the VObject
- * @param string VObject as string
- * @returns Sabre_VObject or null
+ * @param string $data VObject as string
+ * @returns Sabre\VObject\Reader|null
*/
public static function parse($data) {
try {
@@ -55,7 +55,7 @@ class OC_VObject{
/**
* @brief Escapes semicolons
- * @param string $value
+ * @param array $value
* @return string
*/
public static function escapeSemicolons($value) {
@@ -88,7 +88,7 @@ class OC_VObject{
}
/**
- * Constuctor
+ * Constructor
* @param Sabre\VObject\Component or string
*/
public function __construct($vobject_or_name) {
@@ -99,6 +99,11 @@ class OC_VObject{
}
}
+ /**
+ * @todo Write documentation
+ * @param $item
+ * @param null $itemValue
+ */
public function add($item, $itemValue = null) {
if ($item instanceof OC_VObject) {
$item = $item->getVObject();
@@ -110,8 +115,8 @@ class OC_VObject{
* @brief Add property to vobject
* @param object $name of property
* @param object $value of property
- * @param object $parameters of property
- * @returns Sabre_VObject_Property newly created
+ * @param array|object $parameters of property
+ * @returns Sabre\VObject\Property newly created
*/
public function addProperty($name, $value, $parameters=array()) {
if(is_array($value)) {
@@ -131,6 +136,11 @@ class OC_VObject{
$this->vobject->add('UID', $uid);
}
+ /**
+ * @todo Write documentation
+ * @param mixed $name
+ * @param string $string
+ */
public function setString($name, $string) {
if ($string != '') {
$string = strtr($string, array("\r\n"=>"\n"));
@@ -145,7 +155,7 @@ class OC_VObject{
* When $datetime is set to 'now', use the current time
* When $datetime is null, unset the property
*
- * @param string property name
+ * @param string $name
* @param DateTime $datetime
* @param int $dateType
* @return void
@@ -163,12 +173,22 @@ class OC_VObject{
}
}
+ /**
+ * @todo Write documentation
+ * @param $name
+ * @return string
+ */
public function getAsString($name) {
return $this->vobject->__isset($name) ?
$this->vobject->__get($name)->value :
'';
}
+ /**
+ * @todo Write documentation
+ * @param $name
+ * @return array
+ */
public function getAsArray($name) {
$values = array();
if ($this->vobject->__isset($name)) {
@@ -178,6 +198,11 @@ class OC_VObject{
return $values;
}
+ /**
+ * @todo Write documentation
+ * @param $name
+ * @return array|OC_VObject|\Sabre\VObject\Property
+ */
public function &__get($name) {
if ($name == 'children') {
return $this->vobject->children;
@@ -189,18 +214,38 @@ class OC_VObject{
return $return;
}
+ /**
+ * @todo Write documentation
+ * @param string $name
+ * @param string $value
+ */
public function __set($name, $value) {
return $this->vobject->__set($name, $value);
}
+ /**
+ * @todo Write documentation
+ * @param string $name
+ */
public function __unset($name) {
return $this->vobject->__unset($name);
}
+ /**
+ * @todo Write documentation
+ * @param string $name
+ * @return bool
+ */
public function __isset($name) {
return $this->vobject->__isset($name);
}
+ /**
+ * @todo Write documentation
+ * @param $function
+ * @param $arguments
+ * @return mixed
+ */
public function __call($function, $arguments) {
return call_user_func_array(array($this->vobject, $function), $arguments);
}