More PHPDoc fixes, using scrutinizer patches as hints

This commit is contained in:
Bart Visscher 2014-02-28 13:53:41 +01:00
parent 89e0763d3d
commit 35a8dfb2fa
12 changed files with 20 additions and 22 deletions

View file

@ -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) {

View file

@ -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) {

View file

@ -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) {

View file

@ -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) {

View file

@ -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) {

View file

@ -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

View file

@ -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) {

View file

@ -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));

View file

@ -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);

View file

@ -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);

View file

@ -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)

View file

@ -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' )) {