Commit 87b548ed authored by Robin McCorkell's avatar Robin McCorkell
Browse files

Fix all PHPDoc types and variable names, in /lib

parent a7ae2e87
......@@ -190,8 +190,8 @@ class DIContainer extends SimpleContainer implements IAppContainer{
}
/**
* @param $message
* @param $level
* @param string $message
* @param string $level
* @return mixed
*/
function log($message, $level) {
......
......@@ -33,7 +33,7 @@ class Http extends BaseHttp {
protected $headers;
/**
* @param $_SERVER $server
* @param array $server $_SERVER
* @param string $protocolVersion the http version to use defaults to HTTP/1.1
*/
public function __construct($server, $protocolVersion='HTTP/1.1') {
......
......@@ -61,7 +61,7 @@ class RouteConfig {
/**
* Creates one route base on the give configuration
* @param $routes
* @param array $routes
* @throws \UnexpectedValueException
*/
private function processSimpleRoutes($routes)
......@@ -105,7 +105,7 @@ class RouteConfig {
* - update
* - destroy
*
* @param $routes
* @param array $routes
*/
private function processResources($routes)
{
......@@ -151,7 +151,7 @@ class RouteConfig {
/**
* Based on a given route name the controller name is generated
* @param $controller
* @param string $controller
* @return string
*/
private function buildControllerName($controller)
......@@ -161,7 +161,7 @@ class RouteConfig {
/**
* Based on the action part of the route name the controller method name is generated
* @param $action
* @param string $action
* @return string
*/
private function buildActionName($action) {
......@@ -170,7 +170,7 @@ class RouteConfig {
/**
* Generates the id used in the url part o the route url
* @param $resource
* @param string $resource
* @return string
*/
private function buildResourceId($resource) {
......@@ -179,7 +179,7 @@ class RouteConfig {
/**
* Underscored strings are converted to camel case strings
* @param $str string
* @param string $str
* @return string
*/
private function underScoreToCamelCase($str) {
......
......@@ -154,7 +154,7 @@ class OC_Archive_TAR extends OC_Archive{
}
/**
* get the last modified time of a file in the archive
* @param string path
* @param string $path
* @return int
*/
function mtime($path) {
......
......@@ -16,7 +16,7 @@ class OC_Avatar implements \OCP\IAvatar {
/**
* @brief constructor
* @param $user string user to do avatar-management with
* @param string $user user to do avatar-management with
*/
public function __construct ($user) {
$this->view = new \OC\Files\View('/'.$user);
......@@ -24,7 +24,7 @@ class OC_Avatar implements \OCP\IAvatar {
/**
* @brief get the users avatar
* @param $size integer size in px of the avatar, avatars are square, defaults to 64
* @param int $size size in px of the avatar, avatars are square, defaults to 64
* @return boolean|\OC_Image containing the avatar or false if there's no image
*/
public function get ($size = 64) {
......@@ -44,7 +44,7 @@ class OC_Avatar implements \OCP\IAvatar {
/**
* @brief sets the users avatar
* @param $data mixed OC_Image, imagedata or path to set a new avatar
* @param \OC_Image|resource|string $data OC_Image, imagedata or path to set a new avatar
* @throws Exception if the provided file is not a jpg or png image
* @throws Exception if the provided image is not valid
* @throws \OC\NotSquareException if the image is not square
......
......@@ -17,7 +17,7 @@ class AvatarManager implements IAvatarManager {
/**
* @brief return a user specific instance of \OCP\IAvatar
* @see \OCP\IAvatar
* @param $user string the ownCloud user id
* @param string $user the ownCloud user id
* @return \OCP\IAvatar
*/
function getAvatar($user) {
......
......@@ -31,7 +31,7 @@ class JobList implements IJobList {
}
/**
* @param \Test\BackgroundJob\TestJob $job
* @param Job|string $job
* @param mixed $argument
*/
public function add($job, $argument = null) {
......@@ -48,7 +48,7 @@ class JobList implements IJobList {
}
/**
* @param Job $job
* @param Job|string $job
* @param mixed $argument
*/
public function remove($job, $argument = null) {
......@@ -70,7 +70,7 @@ class JobList implements IJobList {
/**
* check if a job is in the list
*
* @param $job
* @param Job|string $job
* @param mixed $argument
* @return bool
*/
......@@ -126,7 +126,7 @@ class JobList implements IJobList {
/**
* @param int $id
* @return Job
* @return Job|null
*/
public function getById($id) {
$query = $this->conn->prepare('SELECT `id`, `class`, `last_run`, `argument` FROM `*PREFIX*jobs` WHERE `id` = ?');
......
......@@ -48,7 +48,7 @@ class File {
/**
* Returns the size of the stored/cached data
*
* @param $key
* @param string $key
* @return int
*/
public function size($key) {
......
......@@ -69,6 +69,8 @@ class OC_Connector_Sabre_Auth extends Sabre_DAV_Auth_Backend_AbstractBasic {
* even if there are no HTTP Basic Auth headers.
* In other case, just fallback to the parent implementation.
*
* @param Sabre_DAV_Server $server
* @param $realm
* @return bool
*/
public function authenticate(Sabre_DAV_Server $server, $realm) {
......
......@@ -73,7 +73,7 @@ class OC_Connector_Sabre_FilesPlugin extends Sabre_DAV_ServerPlugin
}
/**
* @param $filePath
* @param string $filePath
* @param Sabre_DAV_INode $node
* @throws Sabre_DAV_Exception_BadRequest
*/
......
......@@ -97,7 +97,7 @@ class OC_Connector_Sabre_QuotaPlugin extends Sabre_DAV_ServerPlugin {
}
/**
* @param $parentUri
* @param string $parentUri
* @return mixed
*/
public function getFreeSpace($parentUri) {
......
......@@ -401,7 +401,7 @@ class OC_DB {
/**
* @brief replaces the ownCloud tables with a new set
* @param $file string path to the MDB2 xml db export file
* @param string $file path to the MDB2 xml db export file
*/
public static function replaceDB( $file ) {
$schemaManager = self::getMDB2SchemaManager();
......
......@@ -41,8 +41,8 @@ class ConnectionWrapper implements \OCP\IDBConnection {
/**
* Insert a row if a matching row doesn't exists.
* @param string The table name (will replace *PREFIX*) to perform the replace on.
* @param array
* @param string $table The table name (will replace *PREFIX*) to perform the replace on.
* @param array $input
*
* The input array if in the form:
*
......
......@@ -126,7 +126,7 @@ class MDB2SchemaManager {
/**
* @brief replaces the ownCloud tables with a new set
* @param $file string path to the MDB2 xml db export file
* @param string $file path to the MDB2 xml db export file
*/
public function replaceDB( $file ) {
$apps = \OC_App::getAllApps();
......
......@@ -66,7 +66,7 @@ class MDB2SchemaReader {
}
/**
* @param\Doctrine\DBAL\Schema\Schema $schema
* @param \Doctrine\DBAL\Schema\Schema $schema
* @param \SimpleXMLElement $xml
* @throws \DomainException
*/
......
......@@ -185,7 +185,7 @@ class OC_Defaults {
/**
* Returns mail header color
* @return mail header color
* @return string
*/
public function getMailHeaderColor() {
if ($this->themeExist('getMailHeaderColor')) {
......
......@@ -47,7 +47,7 @@ class OC_FileProxy{
/**
* fallback function when a proxy operation is not implemented
* @param string $function the name of the proxy operation
* @param mixed
* @param mixed $arguments
*
* this implements a dummy proxy for all operations
*/
......
......@@ -640,7 +640,7 @@ class Cache {
/**
* normalize the given path
* @param $path
* @param string $path
* @return string
*/
public function normalize($path) {
......
......@@ -273,7 +273,7 @@ class Scanner extends BasicEmitter {
* @brief check if the file should be ignored when scanning
* NOTE: files with a '.part' extension are ignored as well!
* prevents unfinished put requests to be scanned
* @param String $file
* @param string $file
* @return boolean
*/
public static function isPartialFile($file) {
......
......@@ -245,7 +245,7 @@ class Filesystem {
}
/**
* @param $id
* @param string $id
* @return Mount\Mount[]
*/
public static function getMountByStorageId($id) {
......@@ -256,7 +256,7 @@ class Filesystem {
}
/**
* @param $id
* @param int $id
* @return Mount\Mount[]
*/
public static function getMountByNumericId($id) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment