More PHPDoc fixes, using scrutinizer patches as hints
This commit is contained in:
parent
89e0763d3d
commit
35a8dfb2fa
|
@ -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
|
* get multiply values, either the app or key can be used as wildcard by setting it to false
|
||||||
*
|
*
|
||||||
* @param boolean $app
|
* @param string|false $app
|
||||||
* @param string $key
|
* @param string|false $key
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getValues($app, $key) {
|
public function getValues($app, $key) {
|
||||||
|
|
|
@ -97,7 +97,7 @@ class Cache {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* creates cache key based on the files given
|
* creates cache key based on the files given
|
||||||
* @param $files
|
* @param string[] $files
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
static public function generateCacheKeyFromFiles($files) {
|
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
|
* This function can be used to delete the contact identified by the given id
|
||||||
*
|
*
|
||||||
* @param object $id the unique identifier to a contact
|
* @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
|
* @return bool successful or not
|
||||||
*/
|
*/
|
||||||
public function delete($id, $address_book_key) {
|
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.
|
* 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 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
|
* @return array representing the contact just created or updated
|
||||||
*/
|
*/
|
||||||
public function createOrUpdate($properties, $address_book_key) {
|
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.
|
* @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 string $table The table to insert into in the form '*PREFIX*tableName'
|
||||||
* @param array $input. An array of fieldname/value pairs
|
* @param array $input An array of fieldname/value pairs
|
||||||
* @param string $table
|
|
||||||
* @return boolean number of updated rows
|
* @return boolean number of updated rows
|
||||||
*/
|
*/
|
||||||
public static function insertIfNotExist($table, $input) {
|
public static function insertIfNotExist($table, $input) {
|
||||||
|
|
|
@ -34,7 +34,7 @@ class OC_Image {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get mime type for an image file.
|
* @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.
|
* @returns string The mime type if the it could be determined, otherwise an empty string.
|
||||||
*/
|
*/
|
||||||
static public function getMimeTypeForFile($filePath) {
|
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
|
* 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 $app
|
||||||
* @param string|false $key
|
* @param string|false $key
|
||||||
* @return array
|
* @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.
|
* @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
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public static function isTrustedDomain($domain) {
|
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)
|
* @param string $sender user id (if nothing is set we use the currently logged-in user)
|
||||||
*/
|
*/
|
||||||
public function __construct($sender = null) {
|
public function __construct($sender = null) {
|
||||||
|
@ -113,7 +112,7 @@ class MailNotifications {
|
||||||
* @param string $filename the shared file
|
* @param string $filename the shared file
|
||||||
* @param string $link the public link
|
* @param string $link the public link
|
||||||
* @param int $expiration expiration date (timestamp)
|
* @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) {
|
public function sendLinkShareMail($recipient, $filename, $link, $expiration) {
|
||||||
$subject = (string)$this->l->t('%s shared »%s« with you', array($this->senderDisplayName, $filename));
|
$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
|
* This function can be used to delete the contact identified by the given id
|
||||||
*
|
*
|
||||||
* @param object $id the unique identifier to a contact
|
* @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
|
* @return bool successful or not
|
||||||
*/
|
*/
|
||||||
function delete($id, $address_book_key);
|
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.
|
* 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 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
|
* @return array representing the contact just created or updated
|
||||||
*/
|
*/
|
||||||
function createOrUpdate($properties, $address_book_key);
|
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
|
* get multiply values, either the app or key can be used as wildcard by setting it to false
|
||||||
*
|
*
|
||||||
* @param app
|
* @param string|false $key
|
||||||
* @param key
|
* @param string|false $app
|
||||||
* @param string $key
|
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getValues($app, $key);
|
public function getValues($app, $key);
|
||||||
|
|
|
@ -166,9 +166,9 @@ class RouteConfigTest extends \PHPUnit_Framework_TestCase
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $verb
|
* @param string $verb
|
||||||
* @param $controllerName
|
* @param string $controllerName
|
||||||
* @param $actionName
|
* @param string $actionName
|
||||||
* @return \PHPUnit_Framework_MockObject_MockObject
|
* @return \PHPUnit_Framework_MockObject_MockObject
|
||||||
*/
|
*/
|
||||||
private function mockRoute($verb, $controllerName, $actionName)
|
private function mockRoute($verb, $controllerName, $actionName)
|
||||||
|
|
|
@ -71,6 +71,9 @@ class Test_DBSchema extends PHPUnit_Framework_TestCase {
|
||||||
$this->assertTableNotExist($this->table2);
|
$this->assertTableNotExist($this->table2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $table
|
||||||
|
*/
|
||||||
public function tableExist($table) {
|
public function tableExist($table) {
|
||||||
|
|
||||||
switch (OC_Config::getValue( 'dbtype', 'sqlite' )) {
|
switch (OC_Config::getValue( 'dbtype', 'sqlite' )) {
|
||||||
|
|
Loading…
Reference in New Issue