Commit 35a8dfb2 authored by Bart Visscher's avatar Bart Visscher
Browse files

More PHPDoc fixes, using scrutinizer patches as hints

parent 89e0763d
......@@ -218,8 +218,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 boolean $app
* @param string $key
* @param string|false $app
* @param string|false $key
* @return array
*/
public function getValues($app, $key) {
......
......@@ -97,7 +97,7 @@ class Cache {
/**
* creates cache key based on the files given
* @param $files
* @param string[] $files
* @return string
*/
static public function generateCacheKeyFromFiles($files) {
......
......@@ -47,7 +47,7 @@ namespace OC {
* This function can be used to delete the contact identified by the given id
*
* @param object $id the unique identifier to a contact
* @param $address_book_key
* @param string $address_book_key identifier of the address book in which the contact shall be deleted
* @return bool successful or not
*/
public function delete($id, $address_book_key) {
......@@ -66,7 +66,7 @@ namespace OC {
* Otherwise the contact will be updated by replacing the entire data set.
*
* @param array $properties this array if key-value-pairs defines a contact
* @param $address_book_key string to identify the address book in which the contact shall be created or updated
* @param string $address_book_key identifier of the address book in which the contact shall be created or updated
* @return array representing the contact just created or updated
*/
public function createOrUpdate($properties, $address_book_key) {
......
......@@ -313,9 +313,8 @@ 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
* @param string $table
* @param string $table The table to insert into in the form '*PREFIX*tableName'
* @param array $input An array of fieldname/value pairs
* @return boolean number of updated rows
*/
public static function insertIfNotExist($table, $input) {
......
......@@ -34,7 +34,7 @@ class OC_Image {
/**
* @brief Get mime type for an image file.
* @param string|null $filepath The path to a local image file.
* @param string|null $filePath The path to a local image file.
* @returns string The mime type if the it could be determined, otherwise an empty string.
*/
static public function getMimeTypeForFile($filePath) {
......
......@@ -116,8 +116,6 @@ class OC_Appconfig {
/**
* get multiply values, either the app or key can be used as wildcard by setting it to false
*
* @param app
* @param key
* @param string|false $app
* @param string|false $key
* @return array
......
......@@ -26,7 +26,7 @@ class OC_Request {
/**
* @brief Checks whether a domain is considered as trusted. This is used to prevent Host Header Poisoning.
* @param string $host
* @param string $domain
* @return bool
*/
public static function isTrustedDomain($domain) {
......
......@@ -30,7 +30,6 @@ class MailNotifications {
/**
*
* @param string $recipient user id
* @param string $sender user id (if nothing is set we use the currently logged-in user)
*/
public function __construct($sender = null) {
......@@ -113,7 +112,7 @@ class MailNotifications {
* @param string $filename the shared file
* @param string $link the public link
* @param int $expiration expiration date (timestamp)
* @return mixed $result true or error message
* @return string|boolean $result true or error message
*/
public function sendLinkShareMail($recipient, $filename, $link, $expiration) {
$subject = (string)$this->l->t('%s shared »%s« with you', array($this->senderDisplayName, $filename));
......
......@@ -96,7 +96,7 @@ namespace OCP\Contacts {
* This function can be used to delete the contact identified by the given id
*
* @param object $id the unique identifier to a contact
* @param $address_book_key
* @param string $address_book_key identifier of the address book in which the contact shall be deleted
* @return bool successful or not
*/
function delete($id, $address_book_key);
......@@ -106,7 +106,7 @@ namespace OCP\Contacts {
* Otherwise the contact will be updated by replacing the entire data set.
*
* @param array $properties this array if key-value-pairs defines a contact
* @param $address_book_key string to identify the address book in which the contact shall be created or updated
* @param string $address_book_key identifier of the address book in which the contact shall be created or updated
* @return array representing the contact just created or updated
*/
function createOrUpdate($properties, $address_book_key);
......
......@@ -55,9 +55,8 @@ interface IAppConfig {
/**
* get multiply values, either the app or key can be used as wildcard by setting it to false
*
* @param app
* @param key
* @param string $key
* @param string|false $key
* @param string|false $app
* @return array
*/
public function getValues($app, $key);
......
......@@ -166,9 +166,9 @@ class RouteConfigTest extends \PHPUnit_Framework_TestCase
}
/**
* @param $verb
* @param $controllerName
* @param $actionName
* @param string $verb
* @param string $controllerName
* @param string $actionName
* @return \PHPUnit_Framework_MockObject_MockObject
*/
private function mockRoute($verb, $controllerName, $actionName)
......
......@@ -71,6 +71,9 @@ class Test_DBSchema extends PHPUnit_Framework_TestCase {
$this->assertTableNotExist($this->table2);
}
/**
* @param string $table
*/
public function tableExist($table) {
switch (OC_Config::getValue( 'dbtype', 'sqlite' )) {
......
Supports Markdown
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