diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-04-08 22:24:54 +0200 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-04-08 22:24:54 +0200 |
commit | 85e369cddb7b347cccd597ab2f65fc201632091d (patch) | |
tree | 862221861771a6fdb0394312f8af8a0b4d8c7abc /lib | |
parent | bbba7bc45acdbfb7d69edf7998db2cd8871682bd (diff) | |
download | nextcloud-server-85e369cddb7b347cccd597ab2f65fc201632091d.tar.gz nextcloud-server-85e369cddb7b347cccd597ab2f65fc201632091d.zip |
Fix multiline comments
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib')
28 files changed, 331 insertions, 339 deletions
diff --git a/lib/private/Activity/Event.php b/lib/private/Activity/Event.php index dcd854b9fe0..85f896622b9 100644 --- a/lib/private/Activity/Event.php +++ b/lib/private/Activity/Event.php @@ -524,10 +524,10 @@ class Event implements IEvent { $this->getTimestamp() !== 0 /** * Disabled for BC with old activities - && - $this->getObjectType() !== '' - && - $this->getObjectId() !== 0 + * && + * $this->getObjectType() !== '' + * && + * $this->getObjectId() !== 0 */ ; } diff --git a/lib/private/AppFramework/Http/Request.php b/lib/private/AppFramework/Http/Request.php index 6554250902d..41bfbd82506 100644 --- a/lib/private/AppFramework/Http/Request.php +++ b/lib/private/AppFramework/Http/Request.php @@ -187,25 +187,25 @@ class Request implements \ArrayAccess, \Countable, IRequest { } /** - * ArrayAccess methods - * - * Gives access to the combined GET, POST and urlParams arrays - * - * Examples: - * - * $var = $request['myvar']; - * - * or - * - * if(!isset($request['myvar']) { - * // Do something - * } - * - * $request['myvar'] = 'something'; // This throws an exception. - * - * @param string $offset The key to lookup - * @return boolean - */ + * ArrayAccess methods + * + * Gives access to the combined GET, POST and urlParams arrays + * + * Examples: + * + * $var = $request['myvar']; + * + * or + * + * if(!isset($request['myvar']) { + * // Do something + * } + * + * $request['myvar'] = 'something'; // This throws an exception. + * + * @param string $offset The key to lookup + * @return boolean + */ public function offsetExists($offset): bool { return isset($this->items['parameters'][$offset]); } @@ -248,20 +248,20 @@ class Request implements \ArrayAccess, \Countable, IRequest { } /** - * Access request variables by method and name. - * Examples: - * - * $request->post['myvar']; // Only look for POST variables - * $request->myvar; or $request->{'myvar'}; or $request->{$myvar} - * Looks in the combined GET, POST and urlParams array. - * - * If you access e.g. ->post but the current HTTP request method - * is GET a \LogicException will be thrown. - * - * @param string $name The key to look for. - * @throws \LogicException - * @return mixed|null - */ + * Access request variables by method and name. + * Examples: + * + * $request->post['myvar']; // Only look for POST variables + * $request->myvar; or $request->{'myvar'}; or $request->{$myvar} + * Looks in the combined GET, POST and urlParams array. + * + * If you access e.g. ->post but the current HTTP request method + * is GET a \LogicException will be thrown. + * + * @param string $name The key to look for. + * @throws \LogicException + * @return mixed|null + */ public function __get($name) { switch($name) { case 'put': diff --git a/lib/private/Authentication/Login/LoggedInCheckCommand.php b/lib/private/Authentication/Login/LoggedInCheckCommand.php index 78f27bfa937..5701f2970a8 100644 --- a/lib/private/Authentication/Login/LoggedInCheckCommand.php +++ b/lib/private/Authentication/Login/LoggedInCheckCommand.php @@ -27,11 +27,9 @@ namespace OC\Authentication\Login; use OC\Authentication\Events\LoginFailed; use OC\Core\Controller\LoginController; -use OCP\Authentication\Events\LoginFailedEvent; use OCP\EventDispatcher\IEventDispatcher; use OCP\ILogger; use OCP\IUserManager; -use OCP\Util; class LoggedInCheckCommand extends ALoginCommand { diff --git a/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialEntity.php b/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialEntity.php index 3b0413aef00..cd5da83805a 100644 --- a/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialEntity.php +++ b/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialEntity.php @@ -27,7 +27,6 @@ namespace OC\Authentication\WebAuthn\Db; use JsonSerializable; use OCP\AppFramework\Db\Entity; use Webauthn\PublicKeyCredentialSource; -use Webauthn\TrustPath\TrustPathLoader; /** * @since 19.0.0 diff --git a/lib/private/Authentication/WebAuthn/Manager.php b/lib/private/Authentication/WebAuthn/Manager.php index 32a90345b5c..180eb1543b2 100644 --- a/lib/private/Authentication/WebAuthn/Manager.php +++ b/lib/private/Authentication/WebAuthn/Manager.php @@ -49,7 +49,6 @@ use Webauthn\PublicKeyCredentialLoader; use Webauthn\PublicKeyCredentialParameters; use Webauthn\PublicKeyCredentialRequestOptions; use Webauthn\PublicKeyCredentialRpEntity; -use Webauthn\PublicKeyCredentialSource; use Webauthn\PublicKeyCredentialUserEntity; use Webauthn\TokenBinding\TokenBindingNotSupportedHandler; diff --git a/lib/private/CapabilitiesManager.php b/lib/private/CapabilitiesManager.php index d49c55bb80d..8034b90567f 100644 --- a/lib/private/CapabilitiesManager.php +++ b/lib/private/CapabilitiesManager.php @@ -48,7 +48,7 @@ class CapabilitiesManager { /** * Get an array of al the capabilities that are registered at this manager - * + * * @param bool $public get public capabilities only * @throws \InvalidArgumentException * @return array diff --git a/lib/private/DB/MySqlTools.php b/lib/private/DB/MySqlTools.php index 69d95d4eed6..957afbaa06f 100644 --- a/lib/private/DB/MySqlTools.php +++ b/lib/private/DB/MySqlTools.php @@ -26,8 +26,8 @@ namespace OC\DB; use OCP\IDBConnection; /** -* Various MySQL specific helper functions. -*/ + * Various MySQL specific helper functions. + */ class MySqlTools { /** diff --git a/lib/private/DB/PgSqlTools.php b/lib/private/DB/PgSqlTools.php index 5a9128bc5b2..27b6bbc9aeb 100644 --- a/lib/private/DB/PgSqlTools.php +++ b/lib/private/DB/PgSqlTools.php @@ -28,8 +28,8 @@ namespace OC\DB; use OCP\IConfig; /** -* Various PostgreSQL specific helper functions. -*/ + * Various PostgreSQL specific helper functions. + */ class PgSqlTools { /** @var \OCP\IConfig */ @@ -43,11 +43,11 @@ class PgSqlTools { } /** - * @brief Resynchronizes all sequences of a database after using INSERTs - * without leaving out the auto-incremented column. - * @param \OC\DB\Connection $conn - * @return null - */ + * @brief Resynchronizes all sequences of a database after using INSERTs + * without leaving out the auto-incremented column. + * @param \OC\DB\Connection $conn + * @return null + */ public function resynchronizeDatabaseSequences(Connection $conn) { $filterExpression = '/^' . preg_quote($this->config->getSystemValue('dbtableprefix', 'oc_')) . '/'; $databaseName = $conn->getDatabase(); diff --git a/lib/private/Encryption/Manager.php b/lib/private/Encryption/Manager.php index 63d35e6dd86..52fc23de947 100644 --- a/lib/private/Encryption/Manager.php +++ b/lib/private/Encryption/Manager.php @@ -128,7 +128,7 @@ class Manager implements IManager { return true; } - /** + /** * Registers an callback function which must return an encryption module instance * * @param string $id diff --git a/lib/private/Group/Backend.php b/lib/private/Group/Backend.php index 024366a46be..6c2973542cf 100644 --- a/lib/private/Group/Backend.php +++ b/lib/private/Group/Backend.php @@ -45,12 +45,12 @@ abstract class Backend implements \OCP\GroupInterface { ]; /** - * Get all supported actions - * @return int bitwise-or'ed actions - * - * Returns the supported actions as int to be - * compared with \OC\Group\Backend::CREATE_GROUP etc. - */ + * Get all supported actions + * @return int bitwise-or'ed actions + * + * Returns the supported actions as int to be + * compared with \OC\Group\Backend::CREATE_GROUP etc. + */ public function getSupportedActions() { $actions = 0; foreach($this->possibleActions AS $action => $methodName) { @@ -63,13 +63,13 @@ abstract class Backend implements \OCP\GroupInterface { } /** - * Check if backend implements actions - * @param int $actions bitwise-or'ed actions - * @return bool - * - * Returns the supported actions as int to be - * compared with \OC\Group\Backend::CREATE_GROUP etc. - */ + * Check if backend implements actions + * @param int $actions bitwise-or'ed actions + * @return bool + * + * Returns the supported actions as int to be + * compared with \OC\Group\Backend::CREATE_GROUP etc. + */ public function implementsActions($actions) { return (bool)($this->getSupportedActions() & $actions); } diff --git a/lib/private/LargeFileHelper.php b/lib/private/LargeFileHelper.php index 7f6a329c22d..fb4ef1ce4f7 100755 --- a/lib/private/LargeFileHelper.php +++ b/lib/private/LargeFileHelper.php @@ -34,23 +34,23 @@ namespace OC; */ class LargeFileHelper { /** - * pow(2, 53) as a base-10 string. - * @var string - */ + * pow(2, 53) as a base-10 string. + * @var string + */ const POW_2_53 = '9007199254740992'; /** - * pow(2, 53) - 1 as a base-10 string. - * @var string - */ + * pow(2, 53) - 1 as a base-10 string. + * @var string + */ const POW_2_53_MINUS_1 = '9007199254740991'; /** - * @brief Checks whether our assumptions hold on the PHP platform we are on. - * - * @throws \RunTimeException if our assumptions do not hold on the current - * PHP platform. - */ + * @brief Checks whether our assumptions hold on the PHP platform we are on. + * + * @throws \RunTimeException if our assumptions do not hold on the current + * PHP platform. + */ public function __construct() { $pow_2_53 = (float)self::POW_2_53_MINUS_1 + 1.0; if ($this->formatUnsignedInteger($pow_2_53) !== self::POW_2_53) { @@ -61,16 +61,16 @@ class LargeFileHelper { } /** - * @brief Formats a signed integer or float as an unsigned integer base-10 - * string. Passed strings will be checked for being base-10. - * - * @param int|float|string $number Number containing unsigned integer data - * - * @throws \UnexpectedValueException if $number is not a float, not an int - * and not a base-10 string. - * - * @return string Unsigned integer base-10 string - */ + * @brief Formats a signed integer or float as an unsigned integer base-10 + * string. Passed strings will be checked for being base-10. + * + * @param int|float|string $number Number containing unsigned integer data + * + * @throws \UnexpectedValueException if $number is not a float, not an int + * and not a base-10 string. + * + * @return string Unsigned integer base-10 string + */ public function formatUnsignedInteger($number) { if (is_float($number)) { // Undo the effect of the php.ini setting 'precision'. @@ -88,14 +88,14 @@ class LargeFileHelper { } /** - * @brief Tries to get the size of a file via various workarounds that - * even work for large files on 32-bit platforms. - * - * @param string $filename Path to the file. - * - * @return null|int|float Number of bytes as number (float or int) or - * null on failure. - */ + * @brief Tries to get the size of a file via various workarounds that + * even work for large files on 32-bit platforms. + * + * @param string $filename Path to the file. + * + * @return null|int|float Number of bytes as number (float or int) or + * null on failure. + */ public function getFileSize($filename) { $fileSize = $this->getFileSizeViaCurl($filename); if (!is_null($fileSize)) { @@ -109,13 +109,13 @@ class LargeFileHelper { } /** - * @brief Tries to get the size of a file via a CURL HEAD request. - * - * @param string $fileName Path to the file. - * - * @return null|int|float Number of bytes as number (float or int) or - * null on failure. - */ + * @brief Tries to get the size of a file via a CURL HEAD request. + * + * @param string $fileName Path to the file. + * + * @return null|int|float Number of bytes as number (float or int) or + * null on failure. + */ public function getFileSizeViaCurl($fileName) { if (\OC::$server->getIniWrapper()->getString('open_basedir') === '') { $encodedFileName = rawurlencode($fileName); @@ -137,13 +137,13 @@ class LargeFileHelper { } /** - * @brief Tries to get the size of a file via an exec() call. - * - * @param string $filename Path to the file. - * - * @return null|int|float Number of bytes as number (float or int) or - * null on failure. - */ + * @brief Tries to get the size of a file via an exec() call. + * + * @param string $filename Path to the file. + * + * @return null|int|float Number of bytes as number (float or int) or + * null on failure. + */ public function getFileSizeViaExec($filename) { if (\OC_Helper::is_function_enabled('exec')) { $os = strtolower(php_uname('s')); @@ -160,15 +160,15 @@ class LargeFileHelper { } /** - * @brief Gets the size of a file via a filesize() call and converts - * negative signed int to positive float. As the result of filesize() - * will wrap around after a file size of 2^32 bytes = 4 GiB, this - * should only be used as a last resort. - * - * @param string $filename Path to the file. - * - * @return int|float Number of bytes as number (float or int). - */ + * @brief Gets the size of a file via a filesize() call and converts + * negative signed int to positive float. As the result of filesize() + * will wrap around after a file size of 2^32 bytes = 4 GiB, this + * should only be used as a last resort. + * + * @param string $filename Path to the file. + * + * @return int|float Number of bytes as number (float or int). + */ public function getFileSizeNative($filename) { $result = filesize($filename); if ($result < 0) { diff --git a/lib/private/SystemTag/SystemTagObjectMapper.php b/lib/private/SystemTag/SystemTagObjectMapper.php index f73bb3f5f12..97138d267d2 100644 --- a/lib/private/SystemTag/SystemTagObjectMapper.php +++ b/lib/private/SystemTag/SystemTagObjectMapper.php @@ -51,12 +51,12 @@ class SystemTagObjectMapper implements ISystemTagObjectMapper { protected $dispatcher; /** - * Constructor. - * - * @param IDBConnection $connection database connection - * @param ISystemTagManager $tagManager system tag manager - * @param EventDispatcherInterface $dispatcher - */ + * Constructor. + * + * @param IDBConnection $connection database connection + * @param ISystemTagManager $tagManager system tag manager + * @param EventDispatcherInterface $dispatcher + */ public function __construct(IDBConnection $connection, ISystemTagManager $tagManager, EventDispatcherInterface $dispatcher) { $this->connection = $connection; $this->tagManager = $tagManager; diff --git a/lib/private/TagManager.php b/lib/private/TagManager.php index ccb2e796155..52d000f8c94 100644 --- a/lib/private/TagManager.php +++ b/lib/private/TagManager.php @@ -56,11 +56,11 @@ class TagManager implements \OCP\ITagManager { private $mapper; /** - * Constructor. - * - * @param TagMapper $mapper Instance of the TagMapper abstraction layer. - * @param \OCP\IUserSession $userSession the user session - */ + * Constructor. + * + * @param TagMapper $mapper Instance of the TagMapper abstraction layer. + * @param \OCP\IUserSession $userSession the user session + */ public function __construct(TagMapper $mapper, \OCP\IUserSession $userSession) { $this->mapper = $mapper; $this->userSession = $userSession; @@ -68,16 +68,16 @@ class TagManager implements \OCP\ITagManager { } /** - * Create a new \OCP\ITags instance and load tags from db. - * - * @see \OCP\ITags - * @param string $type The type identifier e.g. 'contact' or 'event'. - * @param array $defaultTags An array of default tags to be used if none are stored. - * @param boolean $includeShared Whether to include tags for items shared with this user by others. - * @param string $userId user for which to retrieve the tags, defaults to the currently - * logged in user - * @return \OCP\ITags - */ + * Create a new \OCP\ITags instance and load tags from db. + * + * @see \OCP\ITags + * @param string $type The type identifier e.g. 'contact' or 'event'. + * @param array $defaultTags An array of default tags to be used if none are stored. + * @param boolean $includeShared Whether to include tags for items shared with this user by others. + * @param string $userId user for which to retrieve the tags, defaults to the currently + * logged in user + * @return \OCP\ITags + */ public function load($type, $defaultTags = [], $includeShared = false, $userId = null) { if (is_null($userId)) { $user = $this->userSession->getUser(); diff --git a/lib/private/Tagging/Tag.php b/lib/private/Tagging/Tag.php index eacb272ca7a..971b2da053b 100644 --- a/lib/private/Tagging/Tag.php +++ b/lib/private/Tagging/Tag.php @@ -43,12 +43,12 @@ class Tag extends Entity { protected $name; /** - * Constructor. - * - * @param string $owner The tag's owner - * @param string $type The type of item this tag is used for - * @param string $name The tag's name - */ + * Constructor. + * + * @param string $owner The tag's owner + * @param string $type The type of item this tag is used for + * @param string $name The tag's name + */ public function __construct($owner = null, $type = null, $name = null) { $this->setOwner($owner); $this->setType($type); diff --git a/lib/private/Tagging/TagMapper.php b/lib/private/Tagging/TagMapper.php index c021c3646a4..2ffb663aeff 100644 --- a/lib/private/Tagging/TagMapper.php +++ b/lib/private/Tagging/TagMapper.php @@ -36,21 +36,21 @@ use OCP\IDBConnection; class TagMapper extends Mapper { /** - * Constructor. - * - * @param IDBConnection $db Instance of the Db abstraction layer. - */ + * Constructor. + * + * @param IDBConnection $db Instance of the Db abstraction layer. + */ public function __construct(IDBConnection $db) { parent::__construct($db, 'vcategory', Tag::class); } /** - * Load tags from the database. - * - * @param array|string $owners The user(s) whose tags we are going to load. - * @param string $type The type of item for which we are loading tags. - * @return array An array of Tag objects. - */ + * Load tags from the database. + * + * @param array|string $owners The user(s) whose tags we are going to load. + * @param string $type The type of item for which we are loading tags. + * @return array An array of Tag objects. + */ public function loadTags($owners, $type) { if(!is_array($owners)) { $owners = [$owners]; @@ -62,11 +62,11 @@ class TagMapper extends Mapper { } /** - * Check if a given Tag object already exists in the database. - * - * @param Tag $tag The tag to look for in the database. - * @return bool - */ + * Check if a given Tag object already exists in the database. + * + * @param Tag $tag The tag to look for in the database. + * @return bool + */ public function tagExists($tag) { $sql = 'SELECT `id`, `uid`, `type`, `category` FROM `' . $this->getTableName() . '` ' . 'WHERE `uid` = ? AND `type` = ? AND `category` = ?'; diff --git a/lib/private/Tags.php b/lib/private/Tags.php index 8e26cccb408..6a174748a31 100644 --- a/lib/private/Tags.php +++ b/lib/private/Tags.php @@ -116,14 +116,14 @@ class Tags implements ITags { const RELATION_TABLE = '*PREFIX*vcategory_to_object'; /** - * Constructor. - * - * @param TagMapper $mapper Instance of the TagMapper abstraction layer. - * @param string $user The user whose data the object will operate on. - * @param string $type The type of items for which tags will be loaded. - * @param array $defaultTags Tags that should be created at construction. - * @param boolean $includeShared Whether to include tags for items shared with this user by others. - */ + * Constructor. + * + * @param TagMapper $mapper Instance of the TagMapper abstraction layer. + * @param string $user The user whose data the object will operate on. + * @param string $type The type of items for which tags will be loaded. + * @param array $defaultTags Tags that should be created at construction. + * @param boolean $includeShared Whether to include tags for items shared with this user by others. + */ public function __construct(TagMapper $mapper, $user, $type, $defaultTags = [], $includeShared = false) { $this->mapper = $mapper; $this->user = $user; @@ -142,21 +142,21 @@ class Tags implements ITags { } /** - * Check if any tags are saved for this type and user. - * - * @return boolean - */ + * Check if any tags are saved for this type and user. + * + * @return boolean + */ public function isEmpty() { return count($this->tags) === 0; } /** - * Returns an array mapping a given tag's properties to its values: - * ['id' => 0, 'name' = 'Tag', 'owner' = 'User', 'type' => 'tagtype'] - * - * @param string $id The ID of the tag that is going to be mapped - * @return array|false - */ + * Returns an array mapping a given tag's properties to its values: + * ['id' => 0, 'name' = 'Tag', 'owner' = 'User', 'type' => 'tagtype'] + * + * @param string $id The ID of the tag that is going to be mapped + * @return array|false + */ public function getTag($id) { $key = $this->getTagById($id); if ($key !== false) { @@ -166,16 +166,16 @@ class Tags implements ITags { } /** - * Get the tags for a specific user. - * - * This returns an array with maps containing each tag's properties: - * [ - * ['id' => 0, 'name' = 'First tag', 'owner' = 'User', 'type' => 'tagtype'], - * ['id' => 1, 'name' = 'Shared tag', 'owner' = 'Other user', 'type' => 'tagtype'], - * ] - * - * @return array - */ + * Get the tags for a specific user. + * + * This returns an array with maps containing each tag's properties: + * [ + * ['id' => 0, 'name' = 'First tag', 'owner' = 'User', 'type' => 'tagtype'], + * ['id' => 1, 'name' = 'Shared tag', 'owner' = 'Other user', 'type' => 'tagtype'], + * ] + * + * @return array + */ public function getTags() { if(!count($this->tags)) { return []; @@ -196,12 +196,12 @@ class Tags implements ITags { } /** - * Return only the tags owned by the given user, omitting any tags shared - * by other users. - * - * @param string $user The user whose tags are to be checked. - * @return array An array of Tag objects. - */ + * Return only the tags owned by the given user, omitting any tags shared + * by other users. + * + * @param string $user The user whose tags are to be checked. + * @return array An array of Tag objects. + */ public function getTagsForUser($user) { return array_filter($this->tags, function($tag) use($user) { @@ -256,14 +256,14 @@ class Tags implements ITags { } /** - * Get the a list if items tagged with $tag. - * - * Throws an exception if the tag could not be found. - * - * @param string $tag Tag id or name. - * @return array|false An array of object ids or false on error. - * @throws \Exception - */ + * Get the a list if items tagged with $tag. + * + * Throws an exception if the tag could not be found. + * + * @param string $tag Tag id or name. + * @return array|false An array of object ids or false on error. + * @throws \Exception + */ public function getIdsForTag($tag) { $result = null; $tagId = false; @@ -330,34 +330,34 @@ class Tags implements ITags { } /** - * Checks whether a tag is saved for the given user, - * disregarding the ones shared with him or her. - * - * @param string $name The tag name to check for. - * @param string $user The user whose tags are to be checked. - * @return bool - */ + * Checks whether a tag is saved for the given user, + * disregarding the ones shared with him or her. + * + * @param string $name The tag name to check for. + * @param string $user The user whose tags are to be checked. + * @return bool + */ public function userHasTag($name, $user) { $key = $this->array_searchi($name, $this->getTagsForUser($user)); return ($key !== false) ? $this->tags[$key]->getId() : false; } /** - * Checks whether a tag is saved for or shared with the current user. - * - * @param string $name The tag name to check for. - * @return bool - */ + * Checks whether a tag is saved for or shared with the current user. + * + * @param string $name The tag name to check for. + * @return bool + */ public function hasTag($name) { return $this->getTagId($name) !== false; } /** - * Add a new tag. - * - * @param string $name A string with a name of the tag - * @return false|int the id of the added tag or false on error. - */ + * Add a new tag. + * + * @param string $name A string with a name of the tag + * @return false|int the id of the added tag or false on error. + */ public function add($name) { $name = trim($name); @@ -386,12 +386,12 @@ class Tags implements ITags { } /** - * Rename tag. - * - * @param string|integer $from The name or ID of the existing tag - * @param string $to The new name of the tag. - * @return bool - */ + * Rename tag. + * + * @param string|integer $from The name or ID of the existing tag + * @param string $to The new name of the tag. + * @return bool + */ public function rename($from, $to) { $from = trim($from); $to = trim($to); @@ -432,14 +432,14 @@ class Tags implements ITags { } /** - * Add a list of new tags. - * - * @param string[] $names A string with a name or an array of strings containing - * the name(s) of the tag(s) to add. - * @param bool $sync When true, save the tags - * @param int|null $id int Optional object id to add to this|these tag(s) - * @return bool Returns false on error. - */ + * Add a list of new tags. + * + * @param string[] $names A string with a name or an array of strings containing + * the name(s) of the tag(s) to add. + * @param bool $sync When true, save the tags + * @param int|null $id int Optional object id to add to this|these tag(s) + * @return bool Returns false on error. + */ public function addMultiple($names, $sync=false, $id = null) { if(!is_array($names)) { $names = [$names]; @@ -522,12 +522,12 @@ class Tags implements ITags { } /** - * Delete tags and tag/object relations for a user. - * - * For hooking up on post_deleteUser - * - * @param array $arguments - */ + * Delete tags and tag/object relations for a user. + * + * For hooking up on post_deleteUser + * + * @param array $arguments + */ public static function post_deleteUser($arguments) { // Find all objectid/tagId pairs. $result = null; @@ -586,11 +586,11 @@ class Tags implements ITags { } /** - * Delete tag/object relations from the db - * - * @param array $ids The ids of the objects - * @return boolean Returns false on error. - */ + * Delete tag/object relations from the db + * + * @param array $ids The ids of the objects + * @return boolean Returns false on error. + */ public function purgeObjects(array $ids) { if(count($ids) === 0) { // job done ;) @@ -620,10 +620,10 @@ class Tags implements ITags { } /** - * Get favorites for an object type - * - * @return array|false An array of object ids. - */ + * Get favorites for an object type + * + * @return array|false An array of object ids. + */ public function getFavorites() { if(!$this->userHasTag(ITags::TAG_FAVORITE, $this->user)) { return []; @@ -642,11 +642,11 @@ class Tags implements ITags { } /** - * Add an object to favorites - * - * @param int $objid The id of the object - * @return boolean - */ + * Add an object to favorites + * + * @param int $objid The id of the object + * @return boolean + */ public function addToFavorites($objid) { if(!$this->userHasTag(ITags::TAG_FAVORITE, $this->user)) { $this->add(ITags::TAG_FAVORITE); @@ -655,22 +655,22 @@ class Tags implements ITags { } /** - * Remove an object from favorites - * - * @param int $objid The id of the object - * @return boolean - */ + * Remove an object from favorites + * + * @param int $objid The id of the object + * @return boolean + */ public function removeFromFavorites($objid) { return $this->unTag($objid, ITags::TAG_FAVORITE); } /** - * Creates a tag/object relation. - * - * @param int $objid The id of the object - * @param string $tag The id or name of the tag - * @return boolean Returns false on error. - */ + * Creates a tag/object relation. + * + * @param int $objid The id of the object + * @param string $tag The id or name of the tag + * @return boolean Returns false on error. + */ public function tagAs($objid, $tag) { if(is_string($tag) && !is_numeric($tag)) { $tag = trim($tag); @@ -704,12 +704,12 @@ class Tags implements ITags { } /** - * Delete single tag/object relation from the db - * - * @param int $objid The id of the object - * @param string $tag The id or name of the tag - * @return boolean - */ + * Delete single tag/object relation from the db + * + * @param int $objid The id of the object + * @param string $tag The id or name of the tag + * @return boolean + */ public function unTag($objid, $tag) { if(is_string($tag) && !is_numeric($tag)) { $tag = trim($tag); @@ -739,11 +739,11 @@ class Tags implements ITags { } /** - * Delete tags from the database. - * - * @param string[]|integer[] $names An array of tags (names or IDs) to delete - * @return bool Returns false on error - */ + * Delete tags from the database. + * + * @param string[]|integer[] $names An array of tags (names or IDs) to delete + * @return bool Returns false on error + */ public function delete($names) { if(!is_array($names)) { $names = [$names]; @@ -809,11 +809,11 @@ class Tags implements ITags { } /** - * Get a tag's ID. - * - * @param string $name The tag name to look for. - * @return string|bool The tag's id or false if no matching tag is found. - */ + * Get a tag's ID. + * + * @param string $name The tag name to look for. + * @return string|bool The tag's id or false if no matching tag is found. + */ private function getTagId($name) { $key = $this->array_searchi($name, $this->tags); if ($key !== false) { @@ -823,34 +823,34 @@ class Tags implements ITags { } /** - * Get a tag by its name. - * - * @param string $name The tag name. - * @return integer|bool The tag object's offset within the $this->tags - * array or false if it doesn't exist. - */ + * Get a tag by its name. + * + * @param string $name The tag name. + * @return integer|bool The tag object's offset within the $this->tags + * array or false if it doesn't exist. + */ private function getTagByName($name) { return $this->array_searchi($name, $this->tags, 'getName'); } /** - * Get a tag by its ID. - * - * @param string $id The tag ID to look for. - * @return integer|bool The tag object's offset within the $this->tags - * array or false if it doesn't exist. - */ + * Get a tag by its ID. + * + * @param string $id The tag ID to look for. + * @return integer|bool The tag object's offset within the $this->tags + * array or false if it doesn't exist. + */ private function getTagById($id) { return $this->array_searchi($id, $this->tags, 'getId'); } /** - * Returns an array mapping a given tag's properties to its values: - * ['id' => 0, 'name' = 'Tag', 'owner' = 'User', 'type' => 'tagtype'] - * - * @param Tag $tag The tag that is going to be mapped - * @return array - */ + * Returns an array mapping a given tag's properties to its values: + * ['id' => 0, 'name' = 'Tag', 'owner' = 'User', 'type' => 'tagtype'] + * + * @param Tag $tag The tag that is going to be mapped + * @return array + */ private function tagMap(Tag $tag) { return [ 'id' => $tag->getId(), diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php index 5562d4b5e2a..7c4d72e30ab 100644 --- a/lib/private/TemplateLayout.php +++ b/lib/private/TemplateLayout.php @@ -249,7 +249,7 @@ class TemplateLayout extends \OC_Template { /** * @param string $path - * @param string $file + * @param string $file * @return string */ protected function getVersionHashSuffix($path = false, $file = false) { diff --git a/lib/private/User/Backend.php b/lib/private/User/Backend.php index 8fa2f3018b2..7d705811eaf 100644 --- a/lib/private/User/Backend.php +++ b/lib/private/User/Backend.php @@ -60,12 +60,12 @@ abstract class Backend implements UserInterface { ]; /** - * Get all supported actions - * @return int bitwise-or'ed actions - * - * Returns the supported actions as int to be - * compared with self::CREATE_USER etc. - */ + * Get all supported actions + * @return int bitwise-or'ed actions + * + * Returns the supported actions as int to be + * compared with self::CREATE_USER etc. + */ public function getSupportedActions() { $actions = 0; foreach($this->possibleActions AS $action => $methodName) { @@ -78,13 +78,13 @@ abstract class Backend implements UserInterface { } /** - * Check if backend implements actions - * @param int $actions bitwise-or'ed actions - * @return boolean - * - * Returns the supported actions as int to be - * compared with self::CREATE_USER etc. - */ + * Check if backend implements actions + * @param int $actions bitwise-or'ed actions + * @return boolean + * + * Returns the supported actions as int to be + * compared with self::CREATE_USER etc. + */ public function implementsActions($actions) { return (bool)($this->getSupportedActions() & $actions); } @@ -113,19 +113,19 @@ abstract class Backend implements UserInterface { } /** - * check if a user exists - * @param string $uid the username - * @return boolean - */ + * check if a user exists + * @param string $uid the username + * @return boolean + */ public function userExists($uid) { return false; } /** - * get the user's home directory - * @param string $uid the username - * @return boolean - */ + * get the user's home directory + * @param string $uid the username + * @return boolean + */ public function getHome($uid) { return false; } diff --git a/lib/private/User/Session.php b/lib/private/User/Session.php index 9129fb7054b..ca0c7263f7b 100644 --- a/lib/private/User/Session.php +++ b/lib/private/User/Session.php @@ -51,7 +51,6 @@ use OC_User; use OC_Util; use OCA\DAV\Connector\Sabre\Auth; use OCP\AppFramework\Utility\ITimeFactory; -use OCP\Authentication\Events\LoginFailedEvent; use OCP\EventDispatcher\IEventDispatcher; use OCP\Files\NotPermittedException; use OCP\IConfig; @@ -59,7 +58,6 @@ use OCP\ILogger; use OCP\IRequest; use OCP\ISession; use OCP\IUser; -use OCP\IUserManager; use OCP\IUserSession; use OCP\Lockdown\ILockdownManager; use OCP\Security\ISecureRandom; diff --git a/lib/private/legacy/OC_Helper.php b/lib/private/legacy/OC_Helper.php index 626295af5a9..7cb6e228b5d 100644 --- a/lib/private/legacy/OC_Helper.php +++ b/lib/private/legacy/OC_Helper.php @@ -44,7 +44,6 @@ * */ -use OCP\IUser; use Symfony\Component\Process\ExecutableFinder; /** diff --git a/lib/private/legacy/template/functions.php b/lib/private/legacy/template/functions.php index f2f737baf9a..44fa9e52dd2 100644 --- a/lib/private/legacy/template/functions.php +++ b/lib/private/legacy/template/functions.php @@ -45,7 +45,7 @@ function p($string) { * Prints a <link> tag for loading css * @param string $href the source URL, ignored when empty * @param string $opts, additional optional options -*/ + */ function emit_css_tag($href, $opts = '') { $s='<link rel="stylesheet"'; if (!empty($href)) { @@ -60,7 +60,7 @@ function emit_css_tag($href, $opts = '') { /** * Prints all tags for CSS loading * @param array $obj all the script information from template -*/ + */ function emit_css_loading_tags($obj) { foreach($obj['cssfiles'] as $css) { emit_css_tag($css); @@ -74,7 +74,7 @@ function emit_css_loading_tags($obj) { * Prints a <script> tag with nonce and defer depending on config * @param string $src the source URL, ignored when empty * @param string $script_content the inline script content, ignored when empty -*/ + */ function emit_script_tag($src, $script_content='') { $defer_str=' defer'; $s='<script nonce="' . \OC::$server->getContentSecurityPolicyNonceManager()->getNonce() . '"'; @@ -95,7 +95,7 @@ function emit_script_tag($src, $script_content='') { /** * Print all <script> tags for loading JS * @param array $obj all the script information from template -*/ + */ function emit_script_loading_tags($obj) { foreach($obj['jsfiles'] as $jsfile) { emit_script_tag($jsfile, ''); diff --git a/lib/public/App.php b/lib/public/App.php index 9b30ef4cf93..cdf66522d41 100644 --- a/lib/public/App.php +++ b/lib/public/App.php @@ -55,7 +55,7 @@ class App { * @return void * @since 4.0.0 * @deprecated 14.0.0 Use settings section in appinfo.xml to register personal admin sections - */ + */ public static function registerPersonal( $app, $page ) { \OC_App::registerPersonal( $app, $page ); } @@ -79,7 +79,7 @@ class App { * @return array|null * @deprecated 14.0.0 ise \OC::$server->getAppManager()->getAppInfo($appId) * @since 4.0.0 - */ + */ public static function getAppInfo( $app, $path=false ) { return \OC_App::getAppInfo( $app, $path); } diff --git a/lib/public/AppFramework/ApiController.php b/lib/public/AppFramework/ApiController.php index d09a2d5c290..2ebe219444a 100644 --- a/lib/public/AppFramework/ApiController.php +++ b/lib/public/AppFramework/ApiController.php @@ -55,7 +55,7 @@ abstract class ApiController extends Controller { * defaults to 'Authorization, Content-Type, Accept' * @param int $corsMaxAge number in seconds how long a preflighted OPTIONS * request should be cached, defaults to 1728000 seconds - * @since 7.0.0 + * @since 7.0.0 */ public function __construct($appName, IRequest $request, @@ -76,7 +76,7 @@ abstract class ApiController extends Controller { * @NoAdminRequired * @NoCSRFRequired * @PublicPage - * @since 7.0.0 + * @since 7.0.0 */ public function preflightedCors() { if(isset($this->request->server['HTTP_ORIGIN'])) { diff --git a/lib/public/BackgroundJob/Job.php b/lib/public/BackgroundJob/Job.php index b5b920338df..803a06ae176 100644 --- a/lib/public/BackgroundJob/Job.php +++ b/lib/public/BackgroundJob/Job.php @@ -60,7 +60,7 @@ abstract class Job implements IJob { /** * The function to prepare the execution of the job. - + * * * @param IJobList $jobList * @param ILogger|null $logger diff --git a/lib/public/ITagManager.php b/lib/public/ITagManager.php index 960ae6f2f3b..46e1ba06297 100644 --- a/lib/public/ITagManager.php +++ b/lib/public/ITagManager.php @@ -59,6 +59,6 @@ interface ITagManager { * logged in user * @return \OCP\ITags * @since 6.0.0 - parameter $includeShared and $userId were added in 8.0.0 - */ + */ public function load($type, $defaultTags = [], $includeShared = false, $userId = null); } diff --git a/lib/public/IUserManager.php b/lib/public/IUserManager.php index 7985c1bd6f4..33e90a617a6 100644 --- a/lib/public/IUserManager.php +++ b/lib/public/IUserManager.php @@ -50,11 +50,11 @@ namespace OCP; */ interface IUserManager { /** - * register a user backend - * - * @param \OCP\UserInterface $backend - * @since 8.0.0 - */ + * register a user backend + * + * @param \OCP\UserInterface $backend + * @since 8.0.0 + */ public function registerBackend($backend); /** diff --git a/lib/public/User/Backend/ABackend.php b/lib/public/User/Backend/ABackend.php index 6c691ef1fce..a57a561369b 100644 --- a/lib/public/User/Backend/ABackend.php +++ b/lib/public/User/Backend/ABackend.php @@ -3,7 +3,7 @@ declare(strict_types=1); /** -* @copyright Copyright (c) 2018 Roeland Jago Douma <roeland@famdouma.nl> + * @copyright Copyright (c) 2018 Roeland Jago Douma <roeland@famdouma.nl> * * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Roeland Jago Douma <roeland@famdouma.nl> diff --git a/lib/public/User/Events/BeforeUserLoggedInEvent.php b/lib/public/User/Events/BeforeUserLoggedInEvent.php index dca5c16518b..3f64bf7ce3d 100644 --- a/lib/public/User/Events/BeforeUserLoggedInEvent.php +++ b/lib/public/User/Events/BeforeUserLoggedInEvent.php @@ -27,7 +27,6 @@ declare(strict_types=1); namespace OCP\User\Events; use OCP\EventDispatcher\Event; -use OCP\IUser; /** * @since 18.0.0 |