diff options
author | Daniel Kesselberg <mail@danielkesselberg.de> | 2024-08-23 15:10:27 +0200 |
---|---|---|
committer | Daniel Kesselberg <mail@danielkesselberg.de> | 2024-08-25 19:34:58 +0200 |
commit | af6de04e9e141466dc229e444ff3f146f4a34765 (patch) | |
tree | 7b93f521865cdecdadb33637dea33bea242e7969 /lib/public | |
parent | 1cc6b3577fdbeadece7e4e6478e7f7755555b41a (diff) | |
download | nextcloud-server-af6de04e9e141466dc229e444ff3f146f4a34765.tar.gz nextcloud-server-af6de04e9e141466dc229e444ff3f146f4a34765.zip |
style: update codestyle for coding-standard 1.2.3
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'lib/public')
80 files changed, 657 insertions, 657 deletions
diff --git a/lib/public/Accounts/IAccount.php b/lib/public/Accounts/IAccount.php index 906fd8baf38..f9218f5fdf6 100644 --- a/lib/public/Accounts/IAccount.php +++ b/lib/public/Accounts/IAccount.php @@ -22,7 +22,7 @@ interface IAccount extends \JsonSerializable { * * @since 15.0.0 * - * @param string $property Must be one of the PROPERTY_ prefixed constants of \OCP\Accounts\IAccountManager + * @param string $property Must be one of the PROPERTY_ prefixed constants of \OCP\Accounts\IAccountManager * @param string $value * @param string $scope Must be one of the VISIBILITY_ prefixed constants of \OCP\Accounts\IAccountManager * @param string $verified \OCP\Accounts\IAccountManager::NOT_VERIFIED | \OCP\Accounts\IAccountManager::VERIFICATION_IN_PROGRESS | \OCP\Accounts\IAccountManager::VERIFIED diff --git a/lib/public/Accounts/IAccountManager.php b/lib/public/Accounts/IAccountManager.php index 9168e17ea10..33477db7679 100644 --- a/lib/public/Accounts/IAccountManager.php +++ b/lib/public/Accounts/IAccountManager.php @@ -228,9 +228,9 @@ interface IAccountManager { * Search for users based on account data * * @param string $property - property or property collection name – since - * NC 22 the implementation MAY add a fitting property collection into the - * search even if a property name was given e.g. email property and email - * collection) + * NC 22 the implementation MAY add a fitting property collection into the + * search even if a property name was given e.g. email property and email + * collection) * @param string[] $values * @return array * diff --git a/lib/public/Activity/ActivitySettings.php b/lib/public/Activity/ActivitySettings.php index 24e4681ee54..fa187164e19 100644 --- a/lib/public/Activity/ActivitySettings.php +++ b/lib/public/Activity/ActivitySettings.php @@ -38,8 +38,8 @@ abstract class ActivitySettings implements ISetting { /** * @return int whether the filter should be rather on the top or bottom of - * the admin section. The filters are arranged in ascending order of the - * priority values. It is required to return a value between 0 and 100. + * the admin section. The filters are arranged in ascending order of the + * priority values. It is required to return a value between 0 and 100. * @since 20.0.0 */ abstract public function getPriority(); diff --git a/lib/public/Activity/IFilter.php b/lib/public/Activity/IFilter.php index 2f1f4ccda80..75d53650127 100644 --- a/lib/public/Activity/IFilter.php +++ b/lib/public/Activity/IFilter.php @@ -25,8 +25,8 @@ interface IFilter { /** * @return int whether the filter should be rather on the top or bottom of - * the admin section. The filters are arranged in ascending order of the - * priority values. It is required to return a value between 0 and 100. + * the admin section. The filters are arranged in ascending order of the + * priority values. It is required to return a value between 0 and 100. * @since 11.0.0 */ public function getPriority(); diff --git a/lib/public/Activity/ISetting.php b/lib/public/Activity/ISetting.php index 306a0d85632..c5c5c523477 100644 --- a/lib/public/Activity/ISetting.php +++ b/lib/public/Activity/ISetting.php @@ -25,8 +25,8 @@ interface ISetting { /** * @return int whether the filter should be rather on the top or bottom of - * the admin section. The filters are arranged in ascending order of the - * priority values. It is required to return a value between 0 and 100. + * the admin section. The filters are arranged in ascending order of the + * priority values. It is required to return a value between 0 and 100. * @since 11.0.0 */ public function getPriority(); diff --git a/lib/public/AppFramework/ApiController.php b/lib/public/AppFramework/ApiController.php index d3c83005ad1..dae80456e26 100644 --- a/lib/public/AppFramework/ApiController.php +++ b/lib/public/AppFramework/ApiController.php @@ -27,13 +27,13 @@ abstract class ApiController extends Controller { * @param string $appName the name of the app * @param IRequest $request an instance of the request * @param string $corsMethods comma separated string of HTTP verbs which - * should be allowed for websites or webapps when calling your API, defaults to - * 'PUT, POST, GET, DELETE, PATCH' + * should be allowed for websites or webapps when calling your API, defaults to + * 'PUT, POST, GET, DELETE, PATCH' * @param string $corsAllowedHeaders comma separated string of HTTP headers - * which should be allowed for websites or webapps when calling your API, - * defaults to 'Authorization, Content-Type, Accept' + * which should be allowed for websites or webapps when calling your API, + * 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 + * request should be cached, defaults to 1728000 seconds * @since 7.0.0 */ public function __construct($appName, diff --git a/lib/public/AppFramework/App.php b/lib/public/AppFramework/App.php index a8ba6b701f9..06404baea70 100644 --- a/lib/public/AppFramework/App.php +++ b/lib/public/AppFramework/App.php @@ -32,7 +32,7 @@ class App { * some_app_id -> OCA\SomeAppId * @param string $appId the app id * @param string $topNamespace the namespace which should be prepended to - * the transformed app id, defaults to OCA\ + * the transformed app id, defaults to OCA\ * @return string the starting namespace for the app * @since 8.0.0 */ diff --git a/lib/public/AppFramework/Controller.php b/lib/public/AppFramework/Controller.php index 44e8cecd810..99fed5350e5 100644 --- a/lib/public/AppFramework/Controller.php +++ b/lib/public/AppFramework/Controller.php @@ -123,7 +123,7 @@ abstract class Controller { /** * Serializes and formats a response * @param mixed $response the value that was returned from a controller and - * is not a Response instance + * is not a Response instance * @param string $format the format for which a formatter has been registered * @throws \DomainException if format does not match a registered formatter * @return Response diff --git a/lib/public/AppFramework/Db/Entity.php b/lib/public/AppFramework/Db/Entity.php index 46104e2faa4..da2a8ab62d8 100644 --- a/lib/public/AppFramework/Db/Entity.php +++ b/lib/public/AppFramework/Db/Entity.php @@ -28,7 +28,7 @@ abstract class Entity { /** * Simple alternative constructor for building entities from a request * @param array $params the array which was obtained via $this->params('key') - * in the controller + * in the controller * @since 7.0.0 */ public static function fromParams(array $params): static { diff --git a/lib/public/AppFramework/Db/QBMapper.php b/lib/public/AppFramework/Db/QBMapper.php index 41160b29fa5..cd09a6b11b6 100644 --- a/lib/public/AppFramework/Db/QBMapper.php +++ b/lib/public/AppFramework/Db/QBMapper.php @@ -34,7 +34,7 @@ abstract class QBMapper { * @param IDBConnection $db Instance of the Db abstraction layer * @param string $tableName the name of the table. set this to allow entity * @param class-string<T>|null $entityClass the name of the entity that the sql should be - * mapped to queries without using sql + * mapped to queries without using sql * @since 14.0.0 */ public function __construct(IDBConnection $db, string $tableName, ?string $entityClass = null) { @@ -203,7 +203,7 @@ abstract class QBMapper { * Returns the type parameter for the QueryBuilder for a specific property * of the $entity * - * @param Entity $entity The entity to get the types from + * @param Entity $entity The entity to get the types from * @psalm-param T $entity * @param string $property The property of $entity to get the type for * @return int|string diff --git a/lib/public/AppFramework/Http/Attribute/OpenAPI.php b/lib/public/AppFramework/Http/Attribute/OpenAPI.php index 26d01937cfb..1b44b2a57fe 100644 --- a/lib/public/AppFramework/Http/Attribute/OpenAPI.php +++ b/lib/public/AppFramework/Http/Attribute/OpenAPI.php @@ -60,12 +60,12 @@ class OpenAPI { /** * @param self::SCOPE_*|string $scope Scopes are used to define different clients. - * It is recommended to go with the scopes available as self::SCOPE_* constants, - * but in exotic cases other APIs might need documentation as well, - * then a free string can be provided (but it should be `a-z` only). + * It is recommended to go with the scopes available as self::SCOPE_* constants, + * but in exotic cases other APIs might need documentation as well, + * then a free string can be provided (but it should be `a-z` only). * @param ?list<string> $tags Tags can be used to group routes inside a scope - * for easier implementation and reviewing of the API specification. - * It defaults to the controller name in snake_case (should be `a-z` and underscore only). + * for easier implementation and reviewing of the API specification. + * It defaults to the controller name in snake_case (should be `a-z` and underscore only). * @since 28.0.0 */ public function __construct( diff --git a/lib/public/AppFramework/Http/ContentSecurityPolicy.php b/lib/public/AppFramework/Http/ContentSecurityPolicy.php index 281aaa06eb8..11ec79bbdb7 100644 --- a/lib/public/AppFramework/Http/ContentSecurityPolicy.php +++ b/lib/public/AppFramework/Http/ContentSecurityPolicy.php @@ -38,7 +38,7 @@ class ContentSecurityPolicy extends EmptyContentSecurityPolicy { ]; /** * @var bool Whether inline CSS is allowed - * TODO: Disallow per default + * TODO: Disallow per default * @link https://github.com/owncloud/core/issues/13458 */ protected $inlineStyleAllowed = true; diff --git a/lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php b/lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php index d638e8ae0af..0a6258be941 100644 --- a/lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php +++ b/lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php @@ -26,7 +26,7 @@ class EmptyContentSecurityPolicy { protected $strictDynamicAllowedOnScripts = null; /** * @var bool Whether eval in JS scripts is allowed - * TODO: Disallow per default + * TODO: Disallow per default * @link https://github.com/owncloud/core/issues/11925 */ protected $evalScriptAllowed = null; @@ -36,7 +36,7 @@ class EmptyContentSecurityPolicy { protected $allowedScriptDomains = null; /** * @var bool Whether inline CSS is allowed - * TODO: Disallow per default + * TODO: Disallow per default * @link https://github.com/owncloud/core/issues/13458 */ protected $inlineStyleAllowed = null; diff --git a/lib/public/AppFramework/Http/JSONResponse.php b/lib/public/AppFramework/Http/JSONResponse.php index 7551d264e73..afe36c4a8c3 100644 --- a/lib/public/AppFramework/Http/JSONResponse.php +++ b/lib/public/AppFramework/Http/JSONResponse.php @@ -67,7 +67,7 @@ class JSONResponse extends Response { * Sets values in the data json array * @psalm-suppress InvalidTemplateParam * @param T $data an array or object which will be transformed - * to JSON + * to JSON * @return JSONResponse Reference to this object * @since 6.0.0 - return value was added in 7.0.0 */ diff --git a/lib/public/AppFramework/Http/Response.php b/lib/public/AppFramework/Http/Response.php index 0da290ad48b..940f0f124e8 100644 --- a/lib/public/AppFramework/Http/Response.php +++ b/lib/public/AppFramework/Http/Response.php @@ -111,8 +111,8 @@ class Response { * @param string $name The name of the cookie * @param string $value The value of the cookie * @param \DateTime|null $expireDate Date on that the cookie should expire, if set - * to null cookie will be considered as session - * cookie. + * to null cookie will be considered as session + * cookie. * @param string $sameSite The samesite value of the cookie. Defaults to Lax. Other possibilities are Strict or None * @return $this * @since 8.0.0 @@ -289,7 +289,7 @@ class Response { /** * Get the currently used Content-Security-Policy * @return EmptyContentSecurityPolicy|null Used Content-Security-Policy or null if - * none specified. + * none specified. * @since 8.1.0 */ public function getContentSecurityPolicy() { diff --git a/lib/public/AppFramework/Http/TemplateResponse.php b/lib/public/AppFramework/Http/TemplateResponse.php index f9ac80cdc80..2c7567c080b 100644 --- a/lib/public/AppFramework/Http/TemplateResponse.php +++ b/lib/public/AppFramework/Http/TemplateResponse.php @@ -72,7 +72,7 @@ class TemplateResponse extends Response { * @param string $appName the name of the app to load the template from * @param string $templateName the name of the template * @param array $params an array of parameters which should be passed to the - * template + * template * @param string $renderAs how the page should be rendered, defaults to user * @param S $status * @param H $headers diff --git a/lib/public/AppFramework/OCSController.php b/lib/public/AppFramework/OCSController.php index b4bb62c41ed..7cde2a7e427 100644 --- a/lib/public/AppFramework/OCSController.php +++ b/lib/public/AppFramework/OCSController.php @@ -44,13 +44,13 @@ abstract class OCSController extends ApiController { * @param string $appName the name of the app * @param IRequest $request an instance of the request * @param string $corsMethods comma separated string of HTTP verbs which - * should be allowed for websites or webapps when calling your API, defaults to - * 'PUT, POST, GET, DELETE, PATCH' + * should be allowed for websites or webapps when calling your API, defaults to + * 'PUT, POST, GET, DELETE, PATCH' * @param string $corsAllowedHeaders comma separated string of HTTP headers - * which should be allowed for websites or webapps when calling your API, - * defaults to 'Authorization, Content-Type, Accept' + * which should be allowed for websites or webapps when calling your API, + * 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 + * request should be cached, defaults to 1728000 seconds * @since 8.1.0 */ public function __construct($appName, @@ -81,7 +81,7 @@ abstract class OCSController extends ApiController { * Since the OCS endpoints default to XML we need to find out the format * again * @param mixed $response the value that was returned from a controller and - * is not a Response instance + * is not a Response instance * @param string $format the format for which a formatter has been registered * @throws \DomainException if format does not match a registered formatter * @return Response diff --git a/lib/public/AppFramework/Utility/IControllerMethodReflector.php b/lib/public/AppFramework/Utility/IControllerMethodReflector.php index 577191cac40..95d7fbebb56 100644 --- a/lib/public/AppFramework/Utility/IControllerMethodReflector.php +++ b/lib/public/AppFramework/Utility/IControllerMethodReflector.php @@ -31,9 +31,9 @@ interface IControllerMethodReflector { * Inspects the PHPDoc parameters for types * * @param string $parameter the parameter whose type comments should be - * parsed + * parsed * @return string|null type in the type parameters (@param int $something) - * would return int or null if not existing + * would return int or null if not existing * @since 8.0.0 * @deprecated 22.0.0 this method is only used internally */ diff --git a/lib/public/Authentication/TwoFactorAuth/IRegistry.php b/lib/public/Authentication/TwoFactorAuth/IRegistry.php index f4cffd7c34c..6817f1763cf 100644 --- a/lib/public/Authentication/TwoFactorAuth/IRegistry.php +++ b/lib/public/Authentication/TwoFactorAuth/IRegistry.php @@ -38,7 +38,7 @@ interface IRegistry { * * @since 14.0.0 * @return array<string, bool> where the array key is the provider ID (string) and the - * value is the enabled state (bool) + * value is the enabled state (bool) */ public function getProviderStates(IUser $user): array; diff --git a/lib/public/Calendar/ICalendar.php b/lib/public/Calendar/ICalendar.php index 76257579a8f..2f74d329119 100644 --- a/lib/public/Calendar/ICalendar.php +++ b/lib/public/Calendar/ICalendar.php @@ -44,7 +44,7 @@ interface ICalendar { * @param string $pattern which should match within the $searchProperties * @param array $searchProperties defines the properties within the query pattern should match * @param array $options - optional parameters: - * ['timerange' => ['start' => new DateTime(...), 'end' => new DateTime(...)]] + * ['timerange' => ['start' => new DateTime(...), 'end' => new DateTime(...)]] * @param int|null $limit - limit number of search results * @param int|null $offset - offset for paging of search results * @return array an array of events/journals/todos which are arrays of key-value-pairs. the events are sorted by start date (closest first, furthest last) diff --git a/lib/public/Calendar/IHandleImipMessage.php b/lib/public/Calendar/IHandleImipMessage.php index f42ee0fcda7..27190f93f24 100644 --- a/lib/public/Calendar/IHandleImipMessage.php +++ b/lib/public/Calendar/IHandleImipMessage.php @@ -24,7 +24,7 @@ interface IHandleImipMessage extends ICalendar { * * @since 26.0.0 * - * @throws CalendarException on validation failure or calendar write error + * @throws CalendarException on validation failure or calendar write error */ public function handleIMipMessage(string $name, string $calendarData): void; } diff --git a/lib/public/Calendar/IManager.php b/lib/public/Calendar/IManager.php index ff752c0d06e..8a9fe485871 100644 --- a/lib/public/Calendar/IManager.php +++ b/lib/public/Calendar/IManager.php @@ -46,7 +46,7 @@ interface IManager { * @param string $pattern which should match within the $searchProperties * @param array $searchProperties defines the properties within the query pattern should match * @param array $options - optional parameters: - * ['timerange' => ['start' => new DateTime(...), 'end' => new DateTime(...)]] + * ['timerange' => ['start' => new DateTime(...), 'end' => new DateTime(...)]] * @param integer|null $limit - limit number of search results * @param integer|null $offset - offset for paging of search results * @return array an array of events/journals/todos which are arrays of arrays of key-value-pairs diff --git a/lib/public/Collaboration/AutoComplete/IManager.php b/lib/public/Collaboration/AutoComplete/IManager.php index cc586b92d7d..33b4ae0566b 100644 --- a/lib/public/Collaboration/AutoComplete/IManager.php +++ b/lib/public/Collaboration/AutoComplete/IManager.php @@ -18,9 +18,9 @@ interface IManager { public function registerSorter($className); /** - * @param array $sorters list of sorter IDs, separated by "|" - * @param array $sortArray array representation of OCP\Collaboration\Collaborators\ISearchResult - * @param array $context context info of the search, keys: itemType, itemId + * @param array $sorters list of sorter IDs, separated by "|" + * @param array $sortArray array representation of OCP\Collaboration\Collaborators\ISearchResult + * @param array $context context info of the search, keys: itemType, itemId * @since 13.0.0 */ public function runSorters(array $sorters, array &$sortArray, array $context); diff --git a/lib/public/Collaboration/Collaborators/ISearch.php b/lib/public/Collaboration/Collaborators/ISearch.php index a991a683acc..95151d49a86 100644 --- a/lib/public/Collaboration/Collaborators/ISearch.php +++ b/lib/public/Collaboration/Collaborators/ISearch.php @@ -24,7 +24,7 @@ interface ISearch { /** * @param array $pluginInfo with keys 'shareType' containing the name of a corresponding constant in \OCP\Share and - * 'class' with the class name of the plugin + * 'class' with the class name of the plugin * @since 13.0.0 */ public function registerPlugin(array $pluginInfo); diff --git a/lib/public/Collaboration/Collaborators/SearchResultType.php b/lib/public/Collaboration/Collaborators/SearchResultType.php index f5ea0751c7b..c5a8b4e303a 100644 --- a/lib/public/Collaboration/Collaborators/SearchResultType.php +++ b/lib/public/Collaboration/Collaborators/SearchResultType.php @@ -11,7 +11,7 @@ namespace OCP\Collaboration\Collaborators; * @since 13.0.0 */ class SearchResultType { - /** @var string */ + /** @var string */ protected $label; /** diff --git a/lib/public/Collaboration/Reference/LinkReferenceProvider.php b/lib/public/Collaboration/Reference/LinkReferenceProvider.php index 9fffcd523f7..e64d1abf274 100644 --- a/lib/public/Collaboration/Reference/LinkReferenceProvider.php +++ b/lib/public/Collaboration/Reference/LinkReferenceProvider.php @@ -121,7 +121,7 @@ class LinkReferenceProvider implements IReferenceProvider, IPublicReferenceProvi } $linkContentLength = $headResponse->getHeader('Content-Length'); - if (is_numeric($linkContentLength) && (int) $linkContentLength > self::MAX_CONTENT_LENGTH) { + if (is_numeric($linkContentLength) && (int)$linkContentLength > self::MAX_CONTENT_LENGTH) { $this->logger->debug('Skip resolving links pointing to content length > 5 MiB'); return; } diff --git a/lib/public/Color.php b/lib/public/Color.php index f48655ca04d..c8ba3a1ff15 100644 --- a/lib/public/Color.php +++ b/lib/public/Color.php @@ -83,7 +83,7 @@ class Color { * @since 25.0.0 */ public function name(): string { - return sprintf("#%02x%02x%02x", $this->r, $this->g, $this->b); + return sprintf('#%02x%02x%02x', $this->r, $this->g, $this->b); } /** diff --git a/lib/public/Comments/CommentsEntityEvent.php b/lib/public/Comments/CommentsEntityEvent.php index 2d0c50ad95b..39568151b61 100644 --- a/lib/public/Comments/CommentsEntityEvent.php +++ b/lib/public/Comments/CommentsEntityEvent.php @@ -38,9 +38,9 @@ class CommentsEntityEvent extends Event { /** * @param string $name * @param \Closure $entityExistsFunction The closure should take one - * argument, which is the id of the entity, that comments - * should be handled for. The return should then be bool, - * depending on whether comments are allowed (true) or not. + * argument, which is the id of the entity, that comments + * should be handled for. The return should then be bool, + * depending on whether comments are allowed (true) or not. * @throws \OutOfBoundsException when the entity name is already taken * @since 9.1.0 */ diff --git a/lib/public/Comments/ICommentsManager.php b/lib/public/Comments/ICommentsManager.php index 15a7d8f8cb1..af9d0fe61f0 100644 --- a/lib/public/Comments/ICommentsManager.php +++ b/lib/public/Comments/ICommentsManager.php @@ -85,10 +85,10 @@ interface ICommentsManager { * @param string $objectType the object type, e.g. 'files' * @param string $objectId the id of the object * @param int $limit optional, number of maximum comments to be returned. if - * not specified, all comments are returned. + * not specified, all comments are returned. * @param int $offset optional, starting point * @param \DateTime|null $notOlderThan optional, timestamp of the oldest comments - * that may be returned + * that may be returned * @return list<IComment> * @since 9.0.0 */ @@ -106,7 +106,7 @@ interface ICommentsManager { * @param int $lastKnownCommentId the last known comment (will be used as offset) * @param string $sortDirection direction of the comments (`asc` or `desc`) * @param int $limit optional, number of maximum comments to be returned. if - * set to 0, all comments are returned. + * set to 0, all comments are returned. * @param bool $includeLastKnown * @return list<IComment> * @since 14.0.0 @@ -128,7 +128,7 @@ interface ICommentsManager { * @param int $lastKnownCommentId the last known comment (will be used as offset) * @param string $sortDirection direction of the comments (`asc` or `desc`) * @param int $limit optional, number of maximum comments to be returned. if - * set to 0, all comments are returned. + * set to 0, all comments are returned. * @param bool $includeLastKnown * @return list<IComment> * @since 24.0.0 @@ -175,7 +175,7 @@ interface ICommentsManager { * @param $objectType string the object type, e.g. 'files' * @param $objectId string the id of the object * @param \DateTime|null $notOlderThan optional, timestamp of the oldest comments - * that may be returned + * that may be returned * @param string $verb Limit the verb of the comment - Added in 14.0.0 * @return Int * @since 9.0.0 diff --git a/lib/public/Constants.php b/lib/public/Constants.php index 8326aa6570e..62772d195b2 100644 --- a/lib/public/Constants.php +++ b/lib/public/Constants.php @@ -52,7 +52,7 @@ class Constants { * @since 8.0.0 - Updated in 9.0.0 to allow all POSIX chars since we no * longer support windows as server platform. */ - public const FILENAME_INVALID_CHARS = "\\/"; + public const FILENAME_INVALID_CHARS = '\\/'; /** * @since 21.0.0 – default value for autocomplete/search results limit, diff --git a/lib/public/Contacts/IManager.php b/lib/public/Contacts/IManager.php index f19e72e0763..60abb18b382 100644 --- a/lib/public/Contacts/IManager.php +++ b/lib/public/Contacts/IManager.php @@ -68,14 +68,14 @@ interface IManager { * @param string $pattern which should match within the $searchProperties * @param array $searchProperties defines the properties within the query pattern should match * @param array $options = array() to define the search behavior - * - 'types' boolean (since 15.0.0) If set to true, fields that come with a TYPE property will be an array - * example: ['id' => 5, 'FN' => 'Thomas Tanghus', 'EMAIL' => ['type => 'HOME', 'value' => 'g@h.i']] - * - 'escape_like_param' - If set to false wildcards _ and % are not escaped - * - 'limit' - Set a numeric limit for the search results - * - 'offset' - Set the offset for the limited search results - * - 'enumeration' - (since 23.0.0) Whether user enumeration on system address book is allowed - * - 'fullmatch' - (since 23.0.0) Whether matching on full detail in system address book is allowed - * - 'strict_search' - (since 23.0.0) Whether the search pattern is full string or partial search + * - 'types' boolean (since 15.0.0) If set to true, fields that come with a TYPE property will be an array + * example: ['id' => 5, 'FN' => 'Thomas Tanghus', 'EMAIL' => ['type => 'HOME', 'value' => 'g@h.i']] + * - 'escape_like_param' - If set to false wildcards _ and % are not escaped + * - 'limit' - Set a numeric limit for the search results + * - 'offset' - Set the offset for the limited search results + * - 'enumeration' - (since 23.0.0) Whether user enumeration on system address book is allowed + * - 'fullmatch' - (since 23.0.0) Whether matching on full detail in system address book is allowed + * - 'strict_search' - (since 23.0.0) Whether the search pattern is full string or partial search * @psalm-param array{types?: bool, escape_like_param?: bool, limit?: int, offset?: int, enumeration?: bool, fullmatch?: bool, strict_search?: bool} $options * @return array an array of contacts which are arrays of key-value-pairs * @since 6.0.0 diff --git a/lib/public/DB/QueryBuilder/IExpressionBuilder.php b/lib/public/DB/QueryBuilder/IExpressionBuilder.php index 26c7a36a6af..12e30a45071 100644 --- a/lib/public/DB/QueryBuilder/IExpressionBuilder.php +++ b/lib/public/DB/QueryBuilder/IExpressionBuilder.php @@ -51,7 +51,7 @@ interface IExpressionBuilder { * $expr->andX('u.type = ?', 'u.role = ?')); * * @param mixed ...$x Optional clause. Defaults = null, but requires - * at least one defined when converting to string. + * at least one defined when converting to string. * * @return \OCP\DB\QueryBuilder\ICompositeExpression * @since 8.2.0 @@ -71,7 +71,7 @@ interface IExpressionBuilder { * $qb->where($qb->expr()->orX('u.type = ?', 'u.role = ?')); * * @param mixed ...$x Optional clause. Defaults = null, but requires - * at least one defined when converting to string. + * at least one defined when converting to string. * * @return \OCP\DB\QueryBuilder\ICompositeExpression * @since 8.2.0 @@ -88,7 +88,7 @@ interface IExpressionBuilder { * @param string $operator One of the IExpressionBuilder::* constants. * @param mixed $y The right expression. * @param mixed|null $type one of the IQueryBuilder::PARAM_* constants - * required when comparing text fields for oci compatibility + * required when comparing text fields for oci compatibility * * @return string * @since 8.2.0 - Parameter $type was added in 9.0.0 @@ -113,7 +113,7 @@ interface IExpressionBuilder { * @param mixed $x The left expression. * @param mixed $y The right expression. * @param mixed|null $type one of the IQueryBuilder::PARAM_* constants - * required when comparing text fields for oci compatibility + * required when comparing text fields for oci compatibility * * @return string * @since 8.2.0 - Parameter $type was added in 9.0.0 @@ -136,7 +136,7 @@ interface IExpressionBuilder { * @param mixed $x The left expression. * @param mixed $y The right expression. * @param mixed|null $type one of the IQueryBuilder::PARAM_* constants - * required when comparing text fields for oci compatibility + * required when comparing text fields for oci compatibility * * @return string * @since 8.2.0 - Parameter $type was added in 9.0.0 @@ -159,7 +159,7 @@ interface IExpressionBuilder { * @param mixed $x The left expression. * @param mixed $y The right expression. * @param mixed|null $type one of the IQueryBuilder::PARAM_* constants - * required when comparing text fields for oci compatibility + * required when comparing text fields for oci compatibility * * @return string * @since 8.2.0 - Parameter $type was added in 9.0.0 @@ -182,7 +182,7 @@ interface IExpressionBuilder { * @param mixed $x The left expression. * @param mixed $y The right expression. * @param mixed|null $type one of the IQueryBuilder::PARAM_* constants - * required when comparing text fields for oci compatibility + * required when comparing text fields for oci compatibility * * @return string * @since 8.2.0 - Parameter $type was added in 9.0.0 @@ -205,7 +205,7 @@ interface IExpressionBuilder { * @param mixed $x The left expression. * @param mixed $y The right expression. * @param mixed|null $type one of the IQueryBuilder::PARAM_* constants - * required when comparing text fields for oci compatibility + * required when comparing text fields for oci compatibility * * @return string * @since 8.2.0 - Parameter $type was added in 9.0.0 @@ -228,7 +228,7 @@ interface IExpressionBuilder { * @param mixed $x The left expression. * @param mixed $y The right expression. * @param mixed|null $type one of the IQueryBuilder::PARAM_* constants - * required when comparing text fields for oci compatibility + * required when comparing text fields for oci compatibility * * @return string * @since 8.2.0 - Parameter $type was added in 9.0.0 @@ -269,7 +269,7 @@ interface IExpressionBuilder { * @param ILiteral|IParameter|IQueryFunction|string $x Field in string format to be inspected by LIKE() comparison. * @param mixed $y Argument to be used in LIKE() comparison. * @param mixed|null $type one of the IQueryBuilder::PARAM_* constants - * required when comparing text fields for oci compatibility + * required when comparing text fields for oci compatibility * * @return string * @since 8.2.0 - Parameter $type was added in 9.0.0 @@ -286,7 +286,7 @@ interface IExpressionBuilder { * @param ILiteral|IParameter|IQueryFunction|string $x Field in string format to be inspected by NOT LIKE() comparison. * @param mixed $y Argument to be used in NOT LIKE() comparison. * @param mixed|null $type one of the IQueryBuilder::PARAM_* constants - * required when comparing text fields for oci compatibility + * required when comparing text fields for oci compatibility * * @return string * @since 8.2.0 - Parameter $type was added in 9.0.0 @@ -303,7 +303,7 @@ interface IExpressionBuilder { * @param string $x Field in string format to be inspected by ILIKE() comparison. * @param mixed $y Argument to be used in ILIKE() comparison. * @param mixed|null $type one of the IQueryBuilder::PARAM_* constants - * required when comparing text fields for oci compatibility + * required when comparing text fields for oci compatibility * * @return string * @since 9.0.0 @@ -320,7 +320,7 @@ interface IExpressionBuilder { * @param ILiteral|IParameter|IQueryFunction|string $x The field in string format to be inspected by IN() comparison. * @param ILiteral|IParameter|IQueryFunction|string|array $y The placeholder or the array of values to be used by IN() comparison. * @param mixed|null $type one of the IQueryBuilder::PARAM_* constants - * required when comparing text fields for oci compatibility + * required when comparing text fields for oci compatibility * * @return string * @since 8.2.0 - Parameter $type was added in 9.0.0 @@ -337,7 +337,7 @@ interface IExpressionBuilder { * @param ILiteral|IParameter|IQueryFunction|string $x The field in string format to be inspected by NOT IN() comparison. * @param ILiteral|IParameter|IQueryFunction|string|array $y The placeholder or the array of values to be used by NOT IN() comparison. * @param mixed|null $type one of the IQueryBuilder::PARAM_* constants - * required when comparing text fields for oci compatibility + * required when comparing text fields for oci compatibility * * @return string * @since 8.2.0 - Parameter $type was added in 9.0.0 diff --git a/lib/public/DB/QueryBuilder/IQueryBuilder.php b/lib/public/DB/QueryBuilder/IQueryBuilder.php index 11f9737ba2f..f6a2f8bd9dc 100644 --- a/lib/public/DB/QueryBuilder/IQueryBuilder.php +++ b/lib/public/DB/QueryBuilder/IQueryBuilder.php @@ -70,7 +70,7 @@ interface IQueryBuilder { * Enable/disable automatic prefixing of table names with the oc_ prefix * * @param bool $enabled If set to true table names will be prefixed with the - * owncloud database prefix automatically. + * owncloud database prefix automatically. * @since 8.2.0 */ public function automaticTablePrefix($enabled); diff --git a/lib/public/Encryption/IEncryptionModule.php b/lib/public/Encryption/IEncryptionModule.php index 2c3f33847c9..fbac291c1b9 100644 --- a/lib/public/Encryption/IEncryptionModule.php +++ b/lib/public/Encryption/IEncryptionModule.php @@ -42,8 +42,8 @@ interface IEncryptionModule { * @param array $accessList who has access to the file contains the key 'users' and 'public' * * @return array $header contain data as key-value pairs which should be - * written to the header, in case of a write operation - * or if no additional data is needed return a empty array + * written to the header, in case of a write operation + * or if no additional data is needed return a empty array * @since 8.1.0 */ public function begin($path, $user, $mode, array $header, array $accessList); diff --git a/lib/public/Files.php b/lib/public/Files.php index d176c2f2a7b..62c41c4ada1 100644 --- a/lib/public/Files.php +++ b/lib/public/Files.php @@ -30,7 +30,7 @@ class Files { * Get the mimetype form a local file * @param string $path * @return string - * does NOT work for ownClouds filesystem, use OC_FileSystem::getMimeType instead + * does NOT work for ownClouds filesystem, use OC_FileSystem::getMimeType instead * @since 5.0.0 * @deprecated 14.0.0 */ diff --git a/lib/public/Files/Cache/ICache.php b/lib/public/Files/Cache/ICache.php index 6a64fc26386..bb5608e8480 100644 --- a/lib/public/Files/Cache/ICache.php +++ b/lib/public/Files/Cache/ICache.php @@ -219,7 +219,7 @@ interface ICache { * search for files by mimetype * * @param string $mimetype either a full mimetype to search ('text/plain') or only the first part of a mimetype ('image') - * where it will search for all mimetypes in the group ('image/*') + * where it will search for all mimetypes in the group ('image/*') * @return ICacheEntry[] an array of cache entries where the mimetype matches the search * @since 9.0.0 * @deprecated 9.0.0 due to lack of pagination, not all backends might implement this diff --git a/lib/public/Files/ForbiddenException.php b/lib/public/Files/ForbiddenException.php index 338757e79eb..514ef8623d3 100644 --- a/lib/public/Files/ForbiddenException.php +++ b/lib/public/Files/ForbiddenException.php @@ -35,6 +35,6 @@ class ForbiddenException extends \Exception { * @since 9.0.0 */ public function getRetry() { - return (bool) $this->retry; + return (bool)$this->retry; } } diff --git a/lib/public/Files/Storage/IStorageFactory.php b/lib/public/Files/Storage/IStorageFactory.php index 7c207ca9f0a..e0ec3128876 100644 --- a/lib/public/Files/Storage/IStorageFactory.php +++ b/lib/public/Files/Storage/IStorageFactory.php @@ -22,7 +22,7 @@ interface IStorageFactory { * @param string $wrapperName * @param callable $callback * @return bool true if the wrapper was added, false if there was already a wrapper with this - * name registered + * name registered * @since 8.0.0 */ public function addStorageWrapper($wrapperName, $callback); diff --git a/lib/public/Files/Template/Field.php b/lib/public/Files/Template/Field.php index ce0ed3176d9..9a847d29ce0 100644 --- a/lib/public/Files/Template/Field.php +++ b/lib/public/Files/Template/Field.php @@ -37,12 +37,12 @@ class Field implements \JsonSerializable { */ public function jsonSerialize(): array { return [ - "index" => $this->index, - "content" => $this->content, - "type" => $this->type->value, - "alias" => $this->alias, - "id" => $this->id, - "tag" => $this->tag, + 'index' => $this->index, + 'content' => $this->content, + 'type' => $this->type->value, + 'alias' => $this->alias, + 'id' => $this->id, + 'tag' => $this->tag, ]; } } diff --git a/lib/public/Files/Template/FieldType.php b/lib/public/Files/Template/FieldType.php index ff3080406a7..2d059cadc17 100644 --- a/lib/public/Files/Template/FieldType.php +++ b/lib/public/Files/Template/FieldType.php @@ -11,9 +11,9 @@ namespace OCP\Files\Template; * @since 30.0.0 */ enum FieldType: string { - case RichText = "rich-text"; - case CheckBox = "checkbox"; - case DropDownList = "drop-down-list"; - case Picture = "picture"; - case Date = "date"; + case RichText = 'rich-text'; + case CheckBox = 'checkbox'; + case DropDownList = 'drop-down-list'; + case Picture = 'picture'; + case Date = 'date'; } diff --git a/lib/public/Group/Backend/ABackend.php b/lib/public/Group/Backend/ABackend.php index 83fdcfaaa33..95af1b85d9b 100644 --- a/lib/public/Group/Backend/ABackend.php +++ b/lib/public/Group/Backend/ABackend.php @@ -64,7 +64,7 @@ abstract class ABackend implements GroupInterface, IBatchMethodsBackend { */ public function getGroupsDetails(array $gids): array { if (!($this instanceof IGroupDetailsBackend || $this->implementsActions(GroupInterface::GROUP_DETAILS))) { - throw new \Exception("Should not have been called"); + throw new \Exception('Should not have been called'); } /** @var IGroupDetailsBackend $this */ $groupData = []; diff --git a/lib/public/Group/Backend/ISearchableGroupBackend.php b/lib/public/Group/Backend/ISearchableGroupBackend.php index 900330da22d..e9909fcdba0 100644 --- a/lib/public/Group/Backend/ISearchableGroupBackend.php +++ b/lib/public/Group/Backend/ISearchableGroupBackend.php @@ -24,11 +24,11 @@ interface ISearchableGroupBackend { * $users = $groupBackend->searchInGroup('admin', 'John', 10, 0); * </code> * - * @param string $gid The group id of the user we want to search + * @param string $gid The group id of the user we want to search * @param string $search The part of the display name or user id of the users we * want to search. This can be empty to get all the users. - * @param int $limit The limit of results - * @param int $offset The offset of the results + * @param int $limit The limit of results + * @param int $offset The offset of the results * @return array<string,IUser> Users indexed by uid * @since 27.0.0 */ diff --git a/lib/public/HintException.php b/lib/public/HintException.php index f9bacbd5887..97abf777ab1 100644 --- a/lib/public/HintException.php +++ b/lib/public/HintException.php @@ -21,12 +21,12 @@ class HintException extends \Exception { * HintException constructor. * * @since 23.0.0 - * @param string $message The error message. It will be not revealed to the - * the user (unless the hint is empty) and thus - * should be not translated. - * @param string $hint A useful message that is presented to the end - * user. It should be translated, but must not - * contain sensitive data. + * @param string $message The error message. It will be not revealed to the + * the user (unless the hint is empty) and thus + * should be not translated. + * @param string $hint A useful message that is presented to the end + * user. It should be translated, but must not + * contain sensitive data. * @param int $code * @param \Exception|null $previous */ diff --git a/lib/public/Http/Client/IClient.php b/lib/public/Http/Client/IClient.php index 995a68f23bc..ad4c018ab7b 100644 --- a/lib/public/Http/Client/IClient.php +++ b/lib/public/Http/Client/IClient.php @@ -18,26 +18,26 @@ interface IClient { * Sends a GET request * @param string $uri * @param array $options Array such as - * 'query' => [ - * 'field' => 'abc', - * 'other_field' => '123', - * 'file_name' => fopen('/path/to/file', 'r'), - * ], - * 'headers' => [ - * 'foo' => 'bar', - * ], - * 'cookies' => [ - * 'foo' => 'bar', - * ], - * 'allow_redirects' => [ - * 'max' => 10, // allow at most 10 redirects. - * 'strict' => true, // use "strict" RFC compliant redirects. - * 'referer' => true, // add a Referer header - * 'protocols' => ['https'] // only allow https URLs - * ], - * 'sink' => '/path/to/file', // save to a file or a stream - * 'verify' => true, // bool or string to CA file - * 'debug' => true, + * 'query' => [ + * 'field' => 'abc', + * 'other_field' => '123', + * 'file_name' => fopen('/path/to/file', 'r'), + * ], + * 'headers' => [ + * 'foo' => 'bar', + * ], + * 'cookies' => [ + * 'foo' => 'bar', + * ], + * 'allow_redirects' => [ + * 'max' => 10, // allow at most 10 redirects. + * 'strict' => true, // use "strict" RFC compliant redirects. + * 'referer' => true, // add a Referer header + * 'protocols' => ['https'] // only allow https URLs + * ], + * 'sink' => '/path/to/file', // save to a file or a stream + * 'verify' => true, // bool or string to CA file + * 'debug' => true, * @return IResponse * @throws \Exception If the request could not get completed * @since 8.1.0 @@ -48,21 +48,21 @@ interface IClient { * Sends a HEAD request * @param string $uri * @param array $options Array such as - * 'headers' => [ - * 'foo' => 'bar', - * ], - * 'cookies' => [ - * 'foo' => 'bar', - * ], - * 'allow_redirects' => [ - * 'max' => 10, // allow at most 10 redirects. - * 'strict' => true, // use "strict" RFC compliant redirects. - * 'referer' => true, // add a Referer header - * 'protocols' => ['https'] // only allow https URLs - * ], - * 'sink' => '/path/to/file', // save to a file or a stream - * 'verify' => true, // bool or string to CA file - * 'debug' => true, + * 'headers' => [ + * 'foo' => 'bar', + * ], + * 'cookies' => [ + * 'foo' => 'bar', + * ], + * 'allow_redirects' => [ + * 'max' => 10, // allow at most 10 redirects. + * 'strict' => true, // use "strict" RFC compliant redirects. + * 'referer' => true, // add a Referer header + * 'protocols' => ['https'] // only allow https URLs + * ], + * 'sink' => '/path/to/file', // save to a file or a stream + * 'verify' => true, // bool or string to CA file + * 'debug' => true, * @return IResponse * @throws \Exception If the request could not get completed * @since 8.1.0 @@ -73,26 +73,26 @@ interface IClient { * Sends a POST request * @param string $uri * @param array $options Array such as - * 'body' => [ - * 'field' => 'abc', - * 'other_field' => '123', - * 'file_name' => fopen('/path/to/file', 'r'), - * ], - * 'headers' => [ - * 'foo' => 'bar', - * ], - * 'cookies' => [ - * 'foo' => 'bar', - * ], - * 'allow_redirects' => [ - * 'max' => 10, // allow at most 10 redirects. - * 'strict' => true, // use "strict" RFC compliant redirects. - * 'referer' => true, // add a Referer header - * 'protocols' => ['https'] // only allow https URLs - * ], - * 'sink' => '/path/to/file', // save to a file or a stream - * 'verify' => true, // bool or string to CA file - * 'debug' => true, + * 'body' => [ + * 'field' => 'abc', + * 'other_field' => '123', + * 'file_name' => fopen('/path/to/file', 'r'), + * ], + * 'headers' => [ + * 'foo' => 'bar', + * ], + * 'cookies' => [ + * 'foo' => 'bar', + * ], + * 'allow_redirects' => [ + * 'max' => 10, // allow at most 10 redirects. + * 'strict' => true, // use "strict" RFC compliant redirects. + * 'referer' => true, // add a Referer header + * 'protocols' => ['https'] // only allow https URLs + * ], + * 'sink' => '/path/to/file', // save to a file or a stream + * 'verify' => true, // bool or string to CA file + * 'debug' => true, * @return IResponse * @throws \Exception If the request could not get completed * @since 8.1.0 @@ -103,26 +103,26 @@ interface IClient { * Sends a PUT request * @param string $uri * @param array $options Array such as - * 'body' => [ - * 'field' => 'abc', - * 'other_field' => '123', - * 'file_name' => fopen('/path/to/file', 'r'), - * ], - * 'headers' => [ - * 'foo' => 'bar', - * ], - * 'cookies' => [ - * 'foo' => 'bar', - * ], - * 'allow_redirects' => [ - * 'max' => 10, // allow at most 10 redirects. - * 'strict' => true, // use "strict" RFC compliant redirects. - * 'referer' => true, // add a Referer header - * 'protocols' => ['https'] // only allow https URLs - * ], - * 'sink' => '/path/to/file', // save to a file or a stream - * 'verify' => true, // bool or string to CA file - * 'debug' => true, + * 'body' => [ + * 'field' => 'abc', + * 'other_field' => '123', + * 'file_name' => fopen('/path/to/file', 'r'), + * ], + * 'headers' => [ + * 'foo' => 'bar', + * ], + * 'cookies' => [ + * 'foo' => 'bar', + * ], + * 'allow_redirects' => [ + * 'max' => 10, // allow at most 10 redirects. + * 'strict' => true, // use "strict" RFC compliant redirects. + * 'referer' => true, // add a Referer header + * 'protocols' => ['https'] // only allow https URLs + * ], + * 'sink' => '/path/to/file', // save to a file or a stream + * 'verify' => true, // bool or string to CA file + * 'debug' => true, * @return IResponse * @throws \Exception If the request could not get completed * @since 8.1.0 @@ -133,26 +133,26 @@ interface IClient { * Sends a PATCH request * @param string $uri * @param array $options Array such as - * 'body' => [ - * 'field' => 'abc', - * 'other_field' => '123', - * 'file_name' => fopen('/path/to/file', 'r'), - * ], - * 'headers' => [ - * 'foo' => 'bar', - * ], - * 'cookies' => [ - * 'foo' => 'bar', - * ], - * 'allow_redirects' => [ - * 'max' => 10, // allow at most 10 redirects. - * 'strict' => true, // use "strict" RFC compliant redirects. - * 'referer' => true, // add a Referer header - * 'protocols' => ['https'] // only allow https URLs - * ], - * 'sink' => '/path/to/file', // save to a file or a stream - * 'verify' => true, // bool or string to CA file - * 'debug' => true, + * 'body' => [ + * 'field' => 'abc', + * 'other_field' => '123', + * 'file_name' => fopen('/path/to/file', 'r'), + * ], + * 'headers' => [ + * 'foo' => 'bar', + * ], + * 'cookies' => [ + * 'foo' => 'bar', + * ], + * 'allow_redirects' => [ + * 'max' => 10, // allow at most 10 redirects. + * 'strict' => true, // use "strict" RFC compliant redirects. + * 'referer' => true, // add a Referer header + * 'protocols' => ['https'] // only allow https URLs + * ], + * 'sink' => '/path/to/file', // save to a file or a stream + * 'verify' => true, // bool or string to CA file + * 'debug' => true, * @return IResponse * @throws \Exception If the request could not get completed * @since 29.0.0 @@ -163,26 +163,26 @@ interface IClient { * Sends a DELETE request * @param string $uri * @param array $options Array such as - * 'body' => [ - * 'field' => 'abc', - * 'other_field' => '123', - * 'file_name' => fopen('/path/to/file', 'r'), - * ], - * 'headers' => [ - * 'foo' => 'bar', - * ], - * 'cookies' => [ - * 'foo' => 'bar', - * ], - * 'allow_redirects' => [ - * 'max' => 10, // allow at most 10 redirects. - * 'strict' => true, // use "strict" RFC compliant redirects. - * 'referer' => true, // add a Referer header - * 'protocols' => ['https'] // only allow https URLs - * ], - * 'sink' => '/path/to/file', // save to a file or a stream - * 'verify' => true, // bool or string to CA file - * 'debug' => true, + * 'body' => [ + * 'field' => 'abc', + * 'other_field' => '123', + * 'file_name' => fopen('/path/to/file', 'r'), + * ], + * 'headers' => [ + * 'foo' => 'bar', + * ], + * 'cookies' => [ + * 'foo' => 'bar', + * ], + * 'allow_redirects' => [ + * 'max' => 10, // allow at most 10 redirects. + * 'strict' => true, // use "strict" RFC compliant redirects. + * 'referer' => true, // add a Referer header + * 'protocols' => ['https'] // only allow https URLs + * ], + * 'sink' => '/path/to/file', // save to a file or a stream + * 'verify' => true, // bool or string to CA file + * 'debug' => true, * @return IResponse * @throws \Exception If the request could not get completed * @since 8.1.0 @@ -193,26 +193,26 @@ interface IClient { * Sends an OPTIONS request * @param string $uri * @param array $options Array such as - * 'body' => [ - * 'field' => 'abc', - * 'other_field' => '123', - * 'file_name' => fopen('/path/to/file', 'r'), - * ], - * 'headers' => [ - * 'foo' => 'bar', - * ], - * 'cookies' => [ - * 'foo' => 'bar', - * ], - * 'allow_redirects' => [ - * 'max' => 10, // allow at most 10 redirects. - * 'strict' => true, // use "strict" RFC compliant redirects. - * 'referer' => true, // add a Referer header - * 'protocols' => ['https'] // only allow https URLs - * ], - * 'sink' => '/path/to/file', // save to a file or a stream - * 'verify' => true, // bool or string to CA file - * 'debug' => true, + * 'body' => [ + * 'field' => 'abc', + * 'other_field' => '123', + * 'file_name' => fopen('/path/to/file', 'r'), + * ], + * 'headers' => [ + * 'foo' => 'bar', + * ], + * 'cookies' => [ + * 'foo' => 'bar', + * ], + * 'allow_redirects' => [ + * 'max' => 10, // allow at most 10 redirects. + * 'strict' => true, // use "strict" RFC compliant redirects. + * 'referer' => true, // add a Referer header + * 'protocols' => ['https'] // only allow https URLs + * ], + * 'sink' => '/path/to/file', // save to a file or a stream + * 'verify' => true, // bool or string to CA file + * 'debug' => true, * @return IResponse * @throws \Exception If the request could not get completed * @since 8.1.0 @@ -234,26 +234,26 @@ interface IClient { * @param string $method The HTTP method to use * @param string $uri * @param array $options Array such as - * 'query' => [ - * 'field' => 'abc', - * 'other_field' => '123', - * 'file_name' => fopen('/path/to/file', 'r'), - * ], - * 'headers' => [ - * 'foo' => 'bar', - * ], - * 'cookies' => [ - * 'foo' => 'bar', - * ], - * 'allow_redirects' => [ - * 'max' => 10, // allow at most 10 redirects. - * 'strict' => true, // use "strict" RFC compliant redirects. - * 'referer' => true, // add a Referer header - * 'protocols' => ['https'] // only allow https URLs - * ], - * 'sink' => '/path/to/file', // save to a file or a stream - * 'verify' => true, // bool or string to CA file - * 'debug' => true, + * 'query' => [ + * 'field' => 'abc', + * 'other_field' => '123', + * 'file_name' => fopen('/path/to/file', 'r'), + * ], + * 'headers' => [ + * 'foo' => 'bar', + * ], + * 'cookies' => [ + * 'foo' => 'bar', + * ], + * 'allow_redirects' => [ + * 'max' => 10, // allow at most 10 redirects. + * 'strict' => true, // use "strict" RFC compliant redirects. + * 'referer' => true, // add a Referer header + * 'protocols' => ['https'] // only allow https URLs + * ], + * 'sink' => '/path/to/file', // save to a file or a stream + * 'verify' => true, // bool or string to CA file + * 'debug' => true, * @return IResponse * @throws \Exception If the request could not get completed * @since 29.0.0 @@ -264,26 +264,26 @@ interface IClient { * Sends an asynchronous GET request * @param string $uri * @param array $options Array such as - * 'query' => [ - * 'field' => 'abc', - * 'other_field' => '123', - * 'file_name' => fopen('/path/to/file', 'r'), - * ], - * 'headers' => [ - * 'foo' => 'bar', - * ], - * 'cookies' => [ - * 'foo' => 'bar', - * ], - * 'allow_redirects' => [ - * 'max' => 10, // allow at most 10 redirects. - * 'strict' => true, // use "strict" RFC compliant redirects. - * 'referer' => true, // add a Referer header - * 'protocols' => ['https'] // only allow https URLs - * ], - * 'sink' => '/path/to/file', // save to a file or a stream - * 'verify' => true, // bool or string to CA file - * 'debug' => true, + * 'query' => [ + * 'field' => 'abc', + * 'other_field' => '123', + * 'file_name' => fopen('/path/to/file', 'r'), + * ], + * 'headers' => [ + * 'foo' => 'bar', + * ], + * 'cookies' => [ + * 'foo' => 'bar', + * ], + * 'allow_redirects' => [ + * 'max' => 10, // allow at most 10 redirects. + * 'strict' => true, // use "strict" RFC compliant redirects. + * 'referer' => true, // add a Referer header + * 'protocols' => ['https'] // only allow https URLs + * ], + * 'sink' => '/path/to/file', // save to a file or a stream + * 'verify' => true, // bool or string to CA file + * 'debug' => true, * @return IPromise * @since 28.0.0 */ @@ -293,21 +293,21 @@ interface IClient { * Sends an asynchronous HEAD request * @param string $uri * @param array $options Array such as - * 'headers' => [ - * 'foo' => 'bar', - * ], - * 'cookies' => [ - * 'foo' => 'bar', - * ], - * 'allow_redirects' => [ - * 'max' => 10, // allow at most 10 redirects. - * 'strict' => true, // use "strict" RFC compliant redirects. - * 'referer' => true, // add a Referer header - * 'protocols' => ['https'] // only allow https URLs - * ], - * 'sink' => '/path/to/file', // save to a file or a stream - * 'verify' => true, // bool or string to CA file - * 'debug' => true, + * 'headers' => [ + * 'foo' => 'bar', + * ], + * 'cookies' => [ + * 'foo' => 'bar', + * ], + * 'allow_redirects' => [ + * 'max' => 10, // allow at most 10 redirects. + * 'strict' => true, // use "strict" RFC compliant redirects. + * 'referer' => true, // add a Referer header + * 'protocols' => ['https'] // only allow https URLs + * ], + * 'sink' => '/path/to/file', // save to a file or a stream + * 'verify' => true, // bool or string to CA file + * 'debug' => true, * @return IPromise * @since 28.0.0 */ @@ -317,26 +317,26 @@ interface IClient { * Sends an asynchronous POST request * @param string $uri * @param array $options Array such as - * 'body' => [ - * 'field' => 'abc', - * 'other_field' => '123', - * 'file_name' => fopen('/path/to/file', 'r'), - * ], - * 'headers' => [ - * 'foo' => 'bar', - * ], - * 'cookies' => [ - * 'foo' => 'bar', - * ], - * 'allow_redirects' => [ - * 'max' => 10, // allow at most 10 redirects. - * 'strict' => true, // use "strict" RFC compliant redirects. - * 'referer' => true, // add a Referer header - * 'protocols' => ['https'] // only allow https URLs - * ], - * 'sink' => '/path/to/file', // save to a file or a stream - * 'verify' => true, // bool or string to CA file - * 'debug' => true, + * 'body' => [ + * 'field' => 'abc', + * 'other_field' => '123', + * 'file_name' => fopen('/path/to/file', 'r'), + * ], + * 'headers' => [ + * 'foo' => 'bar', + * ], + * 'cookies' => [ + * 'foo' => 'bar', + * ], + * 'allow_redirects' => [ + * 'max' => 10, // allow at most 10 redirects. + * 'strict' => true, // use "strict" RFC compliant redirects. + * 'referer' => true, // add a Referer header + * 'protocols' => ['https'] // only allow https URLs + * ], + * 'sink' => '/path/to/file', // save to a file or a stream + * 'verify' => true, // bool or string to CA file + * 'debug' => true, * @return IPromise * @since 28.0.0 */ @@ -346,26 +346,26 @@ interface IClient { * Sends an asynchronous PUT request * @param string $uri * @param array $options Array such as - * 'body' => [ - * 'field' => 'abc', - * 'other_field' => '123', - * 'file_name' => fopen('/path/to/file', 'r'), - * ], - * 'headers' => [ - * 'foo' => 'bar', - * ], - * 'cookies' => [ - * 'foo' => 'bar', - * ], - * 'allow_redirects' => [ - * 'max' => 10, // allow at most 10 redirects. - * 'strict' => true, // use "strict" RFC compliant redirects. - * 'referer' => true, // add a Referer header - * 'protocols' => ['https'] // only allow https URLs - * ], - * 'sink' => '/path/to/file', // save to a file or a stream - * 'verify' => true, // bool or string to CA file - * 'debug' => true, + * 'body' => [ + * 'field' => 'abc', + * 'other_field' => '123', + * 'file_name' => fopen('/path/to/file', 'r'), + * ], + * 'headers' => [ + * 'foo' => 'bar', + * ], + * 'cookies' => [ + * 'foo' => 'bar', + * ], + * 'allow_redirects' => [ + * 'max' => 10, // allow at most 10 redirects. + * 'strict' => true, // use "strict" RFC compliant redirects. + * 'referer' => true, // add a Referer header + * 'protocols' => ['https'] // only allow https URLs + * ], + * 'sink' => '/path/to/file', // save to a file or a stream + * 'verify' => true, // bool or string to CA file + * 'debug' => true, * @return IPromise * @since 28.0.0 */ @@ -375,26 +375,26 @@ interface IClient { * Sends an asynchronous DELETE request * @param string $uri * @param array $options Array such as - * 'body' => [ - * 'field' => 'abc', - * 'other_field' => '123', - * 'file_name' => fopen('/path/to/file', 'r'), - * ], - * 'headers' => [ - * 'foo' => 'bar', - * ], - * 'cookies' => [ - * 'foo' => 'bar', - * ], - * 'allow_redirects' => [ - * 'max' => 10, // allow at most 10 redirects. - * 'strict' => true, // use "strict" RFC compliant redirects. - * 'referer' => true, // add a Referer header - * 'protocols' => ['https'] // only allow https URLs - * ], - * 'sink' => '/path/to/file', // save to a file or a stream - * 'verify' => true, // bool or string to CA file - * 'debug' => true, + * 'body' => [ + * 'field' => 'abc', + * 'other_field' => '123', + * 'file_name' => fopen('/path/to/file', 'r'), + * ], + * 'headers' => [ + * 'foo' => 'bar', + * ], + * 'cookies' => [ + * 'foo' => 'bar', + * ], + * 'allow_redirects' => [ + * 'max' => 10, // allow at most 10 redirects. + * 'strict' => true, // use "strict" RFC compliant redirects. + * 'referer' => true, // add a Referer header + * 'protocols' => ['https'] // only allow https URLs + * ], + * 'sink' => '/path/to/file', // save to a file or a stream + * 'verify' => true, // bool or string to CA file + * 'debug' => true, * @return IPromise * @since 28.0.0 */ @@ -404,26 +404,26 @@ interface IClient { * Sends an asynchronous OPTIONS request * @param string $uri * @param array $options Array such as - * 'body' => [ - * 'field' => 'abc', - * 'other_field' => '123', - * 'file_name' => fopen('/path/to/file', 'r'), - * ], - * 'headers' => [ - * 'foo' => 'bar', - * ], - * 'cookies' => [ - * 'foo' => 'bar', - * ], - * 'allow_redirects' => [ - * 'max' => 10, // allow at most 10 redirects. - * 'strict' => true, // use "strict" RFC compliant redirects. - * 'referer' => true, // add a Referer header - * 'protocols' => ['https'] // only allow https URLs - * ], - * 'sink' => '/path/to/file', // save to a file or a stream - * 'verify' => true, // bool or string to CA file - * 'debug' => true, + * 'body' => [ + * 'field' => 'abc', + * 'other_field' => '123', + * 'file_name' => fopen('/path/to/file', 'r'), + * ], + * 'headers' => [ + * 'foo' => 'bar', + * ], + * 'cookies' => [ + * 'foo' => 'bar', + * ], + * 'allow_redirects' => [ + * 'max' => 10, // allow at most 10 redirects. + * 'strict' => true, // use "strict" RFC compliant redirects. + * 'referer' => true, // add a Referer header + * 'protocols' => ['https'] // only allow https URLs + * ], + * 'sink' => '/path/to/file', // save to a file or a stream + * 'verify' => true, // bool or string to CA file + * 'debug' => true, * @return IPromise * @since 28.0.0 */ diff --git a/lib/public/Http/Client/IPromise.php b/lib/public/Http/Client/IPromise.php index 7abbd7227d7..8778829af0e 100644 --- a/lib/public/Http/Client/IPromise.php +++ b/lib/public/Http/Client/IPromise.php @@ -34,7 +34,7 @@ interface IPromise { * a new promise resolving to the return value of the called handler. * * @param ?callable(IResponse): void $onFulfilled Invoked when the promise fulfills. Gets an \OCP\Http\Client\IResponse passed in as argument - * @param ?callable(Exception): void $onRejected Invoked when the promise is rejected. Gets an \Exception passed in as argument + * @param ?callable(Exception): void $onRejected Invoked when the promise is rejected. Gets an \Exception passed in as argument * * @return IPromise * @since 28.0.0 @@ -76,7 +76,7 @@ interface IPromise { * @return mixed * * @throws LogicException if the promise has no wait function or if the - * promise does not settle after waiting. + * promise does not settle after waiting. * @since 28.0.0 */ public function wait(bool $unwrap = true): mixed; diff --git a/lib/public/IAddressBook.php b/lib/public/IAddressBook.php index 479e421d700..780b005fe8d 100644 --- a/lib/public/IAddressBook.php +++ b/lib/public/IAddressBook.php @@ -37,19 +37,19 @@ namespace OCP { * @param string $pattern which should match within the $searchProperties * @param array $searchProperties defines the properties within the query pattern should match * @param array $options Options to define the output format and search behavior - * - 'types' boolean (since 15.0.0) If set to true, fields that come with a TYPE property will be an array - * example: ['id' => 5, 'FN' => 'Thomas Tanghus', 'EMAIL' => ['type => 'HOME', 'value' => 'g@h.i']] - * - 'escape_like_param' - If set to false wildcards _ and % are not escaped - * - 'limit' - Set a numeric limit for the search results - * - 'offset' - Set the offset for the limited search results - * - 'wildcard' - (since 23.0.0) Whether the search should use wildcards + * - 'types' boolean (since 15.0.0) If set to true, fields that come with a TYPE property will be an array + * example: ['id' => 5, 'FN' => 'Thomas Tanghus', 'EMAIL' => ['type => 'HOME', 'value' => 'g@h.i']] + * - 'escape_like_param' - If set to false wildcards _ and % are not escaped + * - 'limit' - Set a numeric limit for the search results + * - 'offset' - Set the offset for the limited search results + * - 'wildcard' - (since 23.0.0) Whether the search should use wildcards * @psalm-param array{types?: bool, escape_like_param?: bool, limit?: int, offset?: int, wildcard?: bool} $options * @return array an array of contacts which are arrays of key-value-pairs - * example result: - * [ - * ['id' => 0, 'FN' => 'Thomas Müller', 'EMAIL' => 'a@b.c', 'GEO' => '37.386013;-122.082932'], - * ['id' => 5, 'FN' => 'Thomas Tanghus', 'EMAIL' => ['d@e.f', 'g@h.i']] - * ] + * example result: + * [ + * ['id' => 0, 'FN' => 'Thomas Müller', 'EMAIL' => 'a@b.c', 'GEO' => '37.386013;-122.082932'], + * ['id' => 5, 'FN' => 'Thomas Tanghus', 'EMAIL' => ['d@e.f', 'g@h.i']] + * ] * @since 5.0.0 */ public function search($pattern, $searchProperties, $options); diff --git a/lib/public/IConfig.php b/lib/public/IConfig.php index b7feabd0ef5..b322267736e 100644 --- a/lib/public/IConfig.php +++ b/lib/public/IConfig.php @@ -206,9 +206,9 @@ interface IConfig { * @param string $userId the userId of the user that we want to get all values from * @psalm-return array<string, array<string, string>> * @return array[] - 2 dimensional array with the following structure: - * [ $appId => - * [ $key => $value ] - * ] + * [ $appId => + * [ $key => $value ] + * ] * @since 24.0.0 */ public function getAllUserValues(string $userId): array; diff --git a/lib/public/IDBConnection.php b/lib/public/IDBConnection.php index 09bd1a564cd..74b3ac233bc 100644 --- a/lib/public/IDBConnection.php +++ b/lib/public/IDBConnection.php @@ -134,8 +134,8 @@ interface IDBConnection { * @param string $table The table name (will replace *PREFIX* with the actual prefix) * @param array $input data that should be inserted into the table (column name => value) * @param array|null $compare List of values that should be checked for "if not exists" - * If this is null or an empty array, all keys of $input will be compared - * Please note: text fields (clob) must not be used in the compare array + * If this is null or an empty array, all keys of $input will be compared + * Please note: text fields (clob) must not be used in the compare array * @return int number of inserted rows * @throws Exception used to be the removed dbal exception, since 21.0.0 it's \OCP\DB\Exception * @since 6.0.0 - parameter $compare was added in 8.1.0, return type changed from boolean in 8.1.0 diff --git a/lib/public/IDateTimeFormatter.php b/lib/public/IDateTimeFormatter.php index 06dc9d41f81..2d47e1182c2 100644 --- a/lib/public/IDateTimeFormatter.php +++ b/lib/public/IDateTimeFormatter.php @@ -16,15 +16,15 @@ interface IDateTimeFormatter { /** * Formats the date of the given timestamp * - * @param int|\DateTime $timestamp - * @param string $format Either 'full', 'long', 'medium' or 'short' - * full: e.g. 'EEEE, MMMM d, y' => 'Wednesday, August 20, 2014' - * long: e.g. 'MMMM d, y' => 'August 20, 2014' - * medium: e.g. 'MMM d, y' => 'Aug 20, 2014' - * short: e.g. 'M/d/yy' => '8/20/14' - * The exact format is dependent on the language - * @param \DateTimeZone|null $timeZone The timezone to use - * @param \OCP\IL10N|null $l The locale to use + * @param int|\DateTime $timestamp + * @param string $format Either 'full', 'long', 'medium' or 'short' + * full: e.g. 'EEEE, MMMM d, y' => 'Wednesday, August 20, 2014' + * long: e.g. 'MMMM d, y' => 'August 20, 2014' + * medium: e.g. 'MMM d, y' => 'Aug 20, 2014' + * short: e.g. 'M/d/yy' => '8/20/14' + * The exact format is dependent on the language + * @param \DateTimeZone|null $timeZone The timezone to use + * @param \OCP\IL10N|null $l The locale to use * @return string Formatted date string * @since 8.0.0 */ @@ -33,16 +33,16 @@ interface IDateTimeFormatter { /** * Formats the date of the given timestamp * - * @param int|\DateTime $timestamp - * @param string $format Either 'full', 'long', 'medium' or 'short' - * full: e.g. 'EEEE, MMMM d, y' => 'Wednesday, August 20, 2014' - * long: e.g. 'MMMM d, y' => 'August 20, 2014' - * medium: e.g. 'MMM d, y' => 'Aug 20, 2014' - * short: e.g. 'M/d/yy' => '8/20/14' - * The exact format is dependent on the language - * Uses 'Today', 'Yesterday' and 'Tomorrow' when applicable - * @param \DateTimeZone|null $timeZone The timezone to use - * @param \OCP\IL10N|null $l The locale to use + * @param int|\DateTime $timestamp + * @param string $format Either 'full', 'long', 'medium' or 'short' + * full: e.g. 'EEEE, MMMM d, y' => 'Wednesday, August 20, 2014' + * long: e.g. 'MMMM d, y' => 'August 20, 2014' + * medium: e.g. 'MMM d, y' => 'Aug 20, 2014' + * short: e.g. 'M/d/yy' => '8/20/14' + * The exact format is dependent on the language + * Uses 'Today', 'Yesterday' and 'Tomorrow' when applicable + * @param \DateTimeZone|null $timeZone The timezone to use + * @param \OCP\IL10N|null $l The locale to use * @return string Formatted relative date string * @since 8.0.0 */ @@ -52,13 +52,13 @@ interface IDateTimeFormatter { * Gives the relative date of the timestamp * Only works for past dates * - * @param int|\DateTime $timestamp - * @param int|\DateTime|null $baseTimestamp Timestamp to compare $timestamp against, defaults to current time - * @param \OCP\IL10N|null $l The locale to use - * @return string Dates returned are: - * < 1 month => Today, Yesterday, n days ago - * < 13 month => last month, n months ago - * >= 13 month => last year, n years ago + * @param int|\DateTime $timestamp + * @param int|\DateTime|null $baseTimestamp Timestamp to compare $timestamp against, defaults to current time + * @param \OCP\IL10N|null $l The locale to use + * @return string Dates returned are: + * < 1 month => Today, Yesterday, n days ago + * < 13 month => last month, n months ago + * >= 13 month => last year, n years ago * @since 8.0.0 */ public function formatDateSpan($timestamp, $baseTimestamp = null, ?\OCP\IL10N $l = null); @@ -67,14 +67,14 @@ interface IDateTimeFormatter { * Formats the time of the given timestamp * * @param int|\DateTime $timestamp - * @param string $format Either 'full', 'long', 'medium' or 'short' - * full: e.g. 'h:mm:ss a zzzz' => '11:42:13 AM GMT+0:00' - * long: e.g. 'h:mm:ss a z' => '11:42:13 AM GMT' - * medium: e.g. 'h:mm:ss a' => '11:42:13 AM' - * short: e.g. 'h:mm a' => '11:42 AM' - * The exact format is dependent on the language - * @param \DateTimeZone|null $timeZone The timezone to use - * @param \OCP\IL10N|null $l The locale to use + * @param string $format Either 'full', 'long', 'medium' or 'short' + * full: e.g. 'h:mm:ss a zzzz' => '11:42:13 AM GMT+0:00' + * long: e.g. 'h:mm:ss a z' => '11:42:13 AM GMT' + * medium: e.g. 'h:mm:ss a' => '11:42:13 AM' + * short: e.g. 'h:mm a' => '11:42 AM' + * The exact format is dependent on the language + * @param \DateTimeZone|null $timeZone The timezone to use + * @param \OCP\IL10N|null $l The locale to use * @return string Formatted time string * @since 8.0.0 */ @@ -83,16 +83,16 @@ interface IDateTimeFormatter { /** * Gives the relative past time of the timestamp * - * @param int|\DateTime $timestamp - * @param int|\DateTime|null $baseTimestamp Timestamp to compare $timestamp against, defaults to current time - * @param \OCP\IL10N|null $l The locale to use - * @return string Dates returned are: - * < 60 sec => seconds ago - * < 1 hour => n minutes ago - * < 1 day => n hours ago - * < 1 month => Yesterday, n days ago - * < 13 month => last month, n months ago - * >= 13 month => last year, n years ago + * @param int|\DateTime $timestamp + * @param int|\DateTime|null $baseTimestamp Timestamp to compare $timestamp against, defaults to current time + * @param \OCP\IL10N|null $l The locale to use + * @return string Dates returned are: + * < 60 sec => seconds ago + * < 1 hour => n minutes ago + * < 1 day => n hours ago + * < 1 month => Yesterday, n days ago + * < 13 month => last month, n months ago + * >= 13 month => last year, n years ago * @since 8.0.0 */ public function formatTimeSpan($timestamp, $baseTimestamp = null, ?\OCP\IL10N $l = null); @@ -101,10 +101,10 @@ interface IDateTimeFormatter { * Formats the date and time of the given timestamp * * @param int|\DateTime $timestamp - * @param string $formatDate See formatDate() for description - * @param string $formatTime See formatTime() for description - * @param \DateTimeZone|null $timeZone The timezone to use - * @param \OCP\IL10N|null $l The locale to use + * @param string $formatDate See formatDate() for description + * @param string $formatTime See formatTime() for description + * @param \DateTimeZone|null $timeZone The timezone to use + * @param \OCP\IL10N|null $l The locale to use * @return string Formatted date and time string * @since 8.0.0 */ @@ -114,11 +114,11 @@ interface IDateTimeFormatter { * Formats the date and time of the given timestamp * * @param int|\DateTime $timestamp - * @param string $formatDate See formatDate() for description - * Uses 'Today', 'Yesterday' and 'Tomorrow' when applicable - * @param string $formatTime See formatTime() for description - * @param \DateTimeZone|null $timeZone The timezone to use - * @param \OCP\IL10N|null $l The locale to use + * @param string $formatDate See formatDate() for description + * Uses 'Today', 'Yesterday' and 'Tomorrow' when applicable + * @param string $formatTime See formatTime() for description + * @param \DateTimeZone|null $timeZone The timezone to use + * @param \OCP\IL10N|null $l The locale to use * @return string Formatted relative date and time string * @since 8.0.0 */ diff --git a/lib/public/IImage.php b/lib/public/IImage.php index 5cc1187d33e..b201754536d 100644 --- a/lib/public/IImage.php +++ b/lib/public/IImage.php @@ -79,7 +79,7 @@ interface IImage { /** * @return string Returns the mimetype of the data. Returns null - * if the data is not valid. + * if the data is not valid. * @since 13.0.0 */ public function dataMimeType(): ?string; diff --git a/lib/public/IL10N.php b/lib/public/IL10N.php index bbc2d535535..9f7dedc5ff2 100644 --- a/lib/public/IL10N.php +++ b/lib/public/IL10N.php @@ -52,7 +52,7 @@ interface IL10N { * @param string $type Type of localization * @param \DateTime|int|string $data parameters for this localization * @param array $options currently supports following options: - * - 'width': handed into \Punic\Calendar::formatDate as second parameter + * - 'width': handed into \Punic\Calendar::formatDate as second parameter * @return string|int|false * * Returns the localized data. diff --git a/lib/public/IRequest.php b/lib/public/IRequest.php index 18efd7a6d16..dedff769f77 100644 --- a/lib/public/IRequest.php +++ b/lib/public/IRequest.php @@ -108,11 +108,11 @@ interface IRequest { * @psalm-taint-source input * * @param string $key the key which you want to access in the URL Parameter - * placeholder, $_POST or $_GET array. - * The priority how they're returned is the following: - * 1. URL parameters - * 2. POST parameters - * 3. GET parameters + * placeholder, $_POST or $_GET array. + * The priority how they're returned is the following: + * 1. URL parameters + * 2. POST parameters + * 3. GET parameters * @param mixed $default If the key is not found, this value will be returned * @return mixed the content of the array * @since 6.0.0 diff --git a/lib/public/ITagManager.php b/lib/public/ITagManager.php index 392cfc3cca6..8c37104828f 100644 --- a/lib/public/ITagManager.php +++ b/lib/public/ITagManager.php @@ -30,7 +30,7 @@ interface ITagManager { * @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. - always false since 20.0.0 * @param string $userId user for which to retrieve the tags, defaults to the currently - * logged in user + * logged in user * @return \OCP\ITags * @since 6.0.0 - parameter $includeShared and $userId were added in 8.0.0 - $includeShared is always false since 20.0.0 */ diff --git a/lib/public/ITags.php b/lib/public/ITags.php index 004ff00f25e..1ba6abae5a2 100644 --- a/lib/public/ITags.php +++ b/lib/public/ITags.php @@ -78,7 +78,7 @@ interface ITags { * * @param array $objIds item ids * @return array|false with object id as key and an array - * of tag names as value or false if an error occurred + * of tag names as value or false if an error occurred * @since 8.0.0 */ public function getTagsForObjects(array $objIds); @@ -136,7 +136,7 @@ interface ITags { * Add a list of new tags. * * @param string|string[] $names A string with a name or an array of strings containing - * the name(s) of the to add. + * the name(s) of the 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. diff --git a/lib/public/IURLGenerator.php b/lib/public/IURLGenerator.php index e950d82cb54..a336d18b00f 100644 --- a/lib/public/IURLGenerator.php +++ b/lib/public/IURLGenerator.php @@ -64,7 +64,7 @@ interface IURLGenerator { * @param string $appName the name of the app * @param string $file the name of the file * @param array $args array with param=>value, will be appended to the returned url - * The value of $args will be urlencoded + * The value of $args will be urlencoded * @return string the url * @since 6.0.0 */ diff --git a/lib/public/Mail/IEMailTemplate.php b/lib/public/Mail/IEMailTemplate.php index 71a02eff19e..66379abd8ae 100644 --- a/lib/public/Mail/IEMailTemplate.php +++ b/lib/public/Mail/IEMailTemplate.php @@ -57,7 +57,7 @@ interface IEMailTemplate { * * @param string $title * @param string|bool $plainTitle Title that is used in the plain text email - * if empty the $title is used, if false none will be used + * if empty the $title is used, if false none will be used * * @since 12.0.0 */ @@ -68,7 +68,7 @@ interface IEMailTemplate { * * @param string $text; Note: When $plainText falls back to this, HTML is automatically escaped in the HTML email * @param string|bool $plainText Text that is used in the plain text email - * if empty the $text is used, if false none will be used + * if empty the $text is used, if false none will be used * * @since 12.0.0 */ @@ -81,9 +81,9 @@ interface IEMailTemplate { * @param string $metaInfo; Note: When $plainMetaInfo falls back to this, HTML is automatically escaped in the HTML email * @param string $icon Absolute path, must be 16*16 pixels * @param string|bool $plainText Text that is used in the plain text email - * if empty the $text is used, if false none will be used + * if empty the $text is used, if false none will be used * @param string|bool $plainMetaInfo Meta info that is used in the plain text email - * if empty the $metaInfo is used, if false none will be used + * if empty the $metaInfo is used, if false none will be used * @param integer plainIndent If > 0, Indent plainText by this amount. * @since 12.0.0 */ @@ -109,7 +109,7 @@ interface IEMailTemplate { * @param string $text Text of button; Note: When $plainText falls back to this, HTML is automatically escaped in the HTML email * @param string $url URL of button * @param string|false $plainText Text of button in plain text version - * if empty the $text is used, if false none will be used + * if empty the $text is used, if false none will be used * * @since 12.0.0 */ diff --git a/lib/public/Mail/IMailer.php b/lib/public/Mail/IMailer.php index 93efdce1a2d..18eaef541c0 100644 --- a/lib/public/Mail/IMailer.php +++ b/lib/public/Mail/IMailer.php @@ -69,9 +69,9 @@ interface IMailer { * * @param IMessage $message Message to send * @return string[] Array with failed recipients. Be aware that this depends on the used mail backend and - * therefore should be considered + * therefore should be considered * @throws \Exception In case it was not possible to send the message. (for example if an invalid mail address - * has been supplied.) + * has been supplied.) * @since 8.1.0 */ public function send(IMessage $message): array; diff --git a/lib/public/Mail/Provider/Address.php b/lib/public/Mail/Provider/Address.php index 9cd2859a8a5..44a5544ee4b 100644 --- a/lib/public/Mail/Provider/Address.php +++ b/lib/public/Mail/Provider/Address.php @@ -23,8 +23,8 @@ class Address implements \OCP\Mail\Provider\IAddress { * * @since 30.0.0 * - * @param string|null $address mail address (e.g test@example.com) - * @param string|null $label mail address label/name + * @param string|null $address mail address (e.g test@example.com) + * @param string|null $label mail address label/name */ public function __construct( protected ?string $address = null, @@ -37,9 +37,9 @@ class Address implements \OCP\Mail\Provider\IAddress { * * @since 30.0.0 * - * @param string $value mail address (e.g. test@example.com) + * @param string $value mail address (e.g. test@example.com) * - * @return self return this object for command chaining + * @return self return this object for command chaining */ public function setAddress(string $value): self { $this->address = $value; @@ -51,9 +51,9 @@ class Address implements \OCP\Mail\Provider\IAddress { * * @since 30.0.0 * - * @return string|null returns the mail address or null if one is not set + * @return string|null returns the mail address or null if one is not set */ - public function getAddress(): string | null { + public function getAddress(): string|null { return $this->address; } @@ -62,9 +62,9 @@ class Address implements \OCP\Mail\Provider\IAddress { * * @since 30.0.0 * - * @param string $value mail address label/name + * @param string $value mail address label/name * - * @return self return this object for command chaining + * @return self return this object for command chaining */ public function setLabel(string $value): self { $this->label = $value; @@ -76,9 +76,9 @@ class Address implements \OCP\Mail\Provider\IAddress { * * @since 30.0.0 * - * @return string|null returns the mail address label/name or null if one is not set + * @return string|null returns the mail address label/name or null if one is not set */ - public function getLabel(): string | null { + public function getLabel(): string|null { return $this->label; } diff --git a/lib/public/Mail/Provider/Attachment.php b/lib/public/Mail/Provider/Attachment.php index d7790a3bbc6..cb7b9b0d241 100644 --- a/lib/public/Mail/Provider/Attachment.php +++ b/lib/public/Mail/Provider/Attachment.php @@ -23,10 +23,10 @@ class Attachment implements \OCP\Mail\Provider\IAttachment { * * @since 30.0.0 * - * @param string|null $contents binary contents of file - * @param string|null $name file name (e.g example.txt) - * @param string|null $type mime type (e.g. text/plain) - * @param bool $embedded embedded status of the attachment, default is false + * @param string|null $contents binary contents of file + * @param string|null $name file name (e.g example.txt) + * @param string|null $type mime type (e.g. text/plain) + * @param bool $embedded embedded status of the attachment, default is false */ public function __construct( protected ?string $contents, @@ -41,9 +41,9 @@ class Attachment implements \OCP\Mail\Provider\IAttachment { * * @since 30.0.0 * - * @param string $value file name (e.g example.txt) + * @param string $value file name (e.g example.txt) * - * @return self return this object for command chaining + * @return self return this object for command chaining */ public function setName(string $value): self { $this->name = $value; @@ -55,9 +55,9 @@ class Attachment implements \OCP\Mail\Provider\IAttachment { * * @since 30.0.0 * - * @return string | null returns the attachment file name or null if not set + * @return string | null returns the attachment file name or null if not set */ - public function getName(): string | null { + public function getName(): string|null { return $this->name; } @@ -66,9 +66,9 @@ class Attachment implements \OCP\Mail\Provider\IAttachment { * * @since 30.0.0 * - * @param string $value mime type (e.g. text/plain) + * @param string $value mime type (e.g. text/plain) * - * @return self return this object for command chaining + * @return self return this object for command chaining */ public function setType(string $value): self { $this->type = $value; @@ -80,9 +80,9 @@ class Attachment implements \OCP\Mail\Provider\IAttachment { * * @since 30.0.0 * - * @return string | null returns the attachment mime type or null if not set + * @return string | null returns the attachment mime type or null if not set */ - public function getType(): string | null { + public function getType(): string|null { return $this->type; } @@ -91,9 +91,9 @@ class Attachment implements \OCP\Mail\Provider\IAttachment { * * @since 30.0.0 * - * @param string $value binary contents of file + * @param string $value binary contents of file * - * @return self return this object for command chaining + * @return self return this object for command chaining */ public function setContents(string $value): self { $this->contents = $value; @@ -105,9 +105,9 @@ class Attachment implements \OCP\Mail\Provider\IAttachment { * * @since 30.0.0 * - * @return string | null returns the attachment contents or null if not set + * @return string | null returns the attachment contents or null if not set */ - public function getContents(): string | null { + public function getContents(): string|null { return $this->contents; } @@ -116,9 +116,9 @@ class Attachment implements \OCP\Mail\Provider\IAttachment { * * @since 30.0.0 * - * @param bool $value true - embedded / false - not embedded + * @param bool $value true - embedded / false - not embedded * - * @return self return this object for command chaining + * @return self return this object for command chaining */ public function setEmbedded(bool $value): self { $this->embedded = $value; @@ -130,7 +130,7 @@ class Attachment implements \OCP\Mail\Provider\IAttachment { * * @since 30.0.0 * - * @return bool embedded status of the attachment + * @return bool embedded status of the attachment */ public function getEmbedded(): bool { return $this->embedded; diff --git a/lib/public/Mail/Provider/IAddress.php b/lib/public/Mail/Provider/IAddress.php index b980f31150b..b5748a51cc0 100644 --- a/lib/public/Mail/Provider/IAddress.php +++ b/lib/public/Mail/Provider/IAddress.php @@ -23,9 +23,9 @@ interface IAddress { * * @since 30.0.0 * - * @param string $value mail address (test@example.com) + * @param string $value mail address (test@example.com) * - * @return self return this object for command chaining + * @return self return this object for command chaining */ public function setAddress(string $value): self; @@ -34,18 +34,18 @@ interface IAddress { * * @since 30.0.0 * - * @return string returns the mail address + * @return string returns the mail address */ - public function getAddress(): string | null; + public function getAddress(): string|null; /** * sets the mail address label/name * * @since 30.0.0 * - * @param string $value mail address label/name + * @param string $value mail address label/name * - * @return self return this object for command chaining + * @return self return this object for command chaining */ public function setLabel(string $value): self; @@ -54,8 +54,8 @@ interface IAddress { * * @since 30.0.0 * - * @return string returns the mail address label/name + * @return string returns the mail address label/name */ - public function getLabel(): string | null; + public function getLabel(): string|null; } diff --git a/lib/public/Mail/Provider/IAttachment.php b/lib/public/Mail/Provider/IAttachment.php index b5bdffc0e81..e27f5ee066b 100644 --- a/lib/public/Mail/Provider/IAttachment.php +++ b/lib/public/Mail/Provider/IAttachment.php @@ -23,9 +23,9 @@ interface IAttachment { * * @since 30.0.0 * - * @param string $value file name (e.g example.txt) + * @param string $value file name (e.g example.txt) * - * @return self return this object for command chaining + * @return self return this object for command chaining */ public function setName(string $value): self; @@ -34,18 +34,18 @@ interface IAttachment { * * @since 30.0.0 * - * @return string | null returns the attachment file name or null if one is not set + * @return string | null returns the attachment file name or null if one is not set */ - public function getName(): string | null; + public function getName(): string|null; /** * sets the attachment mime type * * @since 30.0.0 * - * @param string $value mime type (e.g. text/plain) + * @param string $value mime type (e.g. text/plain) * - * @return self return this object for command chaining + * @return self return this object for command chaining */ public function setType(string $value): self; @@ -54,18 +54,18 @@ interface IAttachment { * * @since 30.0.0 * - * @return string | null returns the attachment mime type or null if not set + * @return string | null returns the attachment mime type or null if not set */ - public function getType(): string | null; + public function getType(): string|null; /** * sets the attachment contents (actual data) * * @since 30.0.0 * - * @param string $value binary contents of file + * @param string $value binary contents of file * - * @return self return this object for command chaining + * @return self return this object for command chaining */ public function setContents(string $value): self; @@ -74,18 +74,18 @@ interface IAttachment { * * @since 30.0.0 * - * @return string | null returns the attachment contents or null if not set + * @return string | null returns the attachment contents or null if not set */ - public function getContents(): string | null; + public function getContents(): string|null; /** * sets the embedded status of the attachment * * @since 30.0.0 * - * @param bool $value true - embedded / false - not embedded + * @param bool $value true - embedded / false - not embedded * - * @return self return this object for command chaining + * @return self return this object for command chaining */ public function setEmbedded(bool $value): self; @@ -94,7 +94,7 @@ interface IAttachment { * * @since 30.0.0 * - * @return bool embedded status of the attachment + * @return bool embedded status of the attachment */ public function getEmbedded(): bool; diff --git a/lib/public/Mail/Provider/IManager.php b/lib/public/Mail/Provider/IManager.php index 4c06cfff87c..ff01f93d2a4 100644 --- a/lib/public/Mail/Provider/IManager.php +++ b/lib/public/Mail/Provider/IManager.php @@ -41,7 +41,7 @@ interface IManager { * * @since 30.0.0 * - * @return array<string,String> collection of provider id and label ['jmap' => 'JMap Connector'] + * @return array<string,String> collection of provider id and label ['jmap' => 'JMap Connector'] */ public function types(): array; @@ -50,7 +50,7 @@ interface IManager { * * @since 30.0.0 * - * @return array<string,IProvider> collection of provider id and object ['jmap' => IProviderObject] + * @return array<string,IProvider> collection of provider id and object ['jmap' => IProviderObject] */ public function providers(): array; @@ -59,20 +59,20 @@ interface IManager { * * @since 30.0.0 * - * @param string $providerId provider id + * @param string $providerId provider id * * @return IProvider|null */ - public function findProviderById(string $providerId): IProvider | null; + public function findProviderById(string $providerId): IProvider|null; /** * retrieve all services for all registered mail providers * * @since 30.0.0 * - * @param string $userId user id + * @param string $userId user id * - * @return array<string,array<string,IService>> collection of provider id, service id and object ['jmap' => ['Service1' => IServiceObject]] + * @return array<string,array<string,IService>> collection of provider id, service id and object ['jmap' => ['Service1' => IServiceObject]] */ public function services(string $userId): array; @@ -81,13 +81,13 @@ interface IManager { * * @since 30.0.0 * - * @param string $userId user id - * @param string $serviceId service id - * @param string $providerId provider id + * @param string $userId user id + * @param string $serviceId service id + * @param string $providerId provider id * - * @return IService|null returns service object or null if none found + * @return IService|null returns service object or null if none found */ - public function findServiceById(string $userId, string $serviceId, ?string $providerId = null): IService | null; + public function findServiceById(string $userId, string $serviceId, ?string $providerId = null): IService|null; /** * retrieve a service for a specific mail address @@ -95,12 +95,12 @@ interface IManager { * * @since 30.0.0 * - * @param string $userId user id - * @param string $address mail address (e.g. test@example.com) - * @param string $providerId provider id + * @param string $userId user id + * @param string $address mail address (e.g. test@example.com) + * @param string $providerId provider id * - * @return IService|null returns service object or null if none found + * @return IService|null returns service object or null if none found */ - public function findServiceByAddress(string $userId, string $address, ?string $providerId = null): IService | null; + public function findServiceByAddress(string $userId, string $address, ?string $providerId = null): IService|null; } diff --git a/lib/public/Mail/Provider/IMessage.php b/lib/public/Mail/Provider/IMessage.php index 625c8a33556..d4f03b24d0d 100644 --- a/lib/public/Mail/Provider/IMessage.php +++ b/lib/public/Mail/Provider/IMessage.php @@ -23,7 +23,7 @@ interface IMessage { * * @since 30.0.0 * - * @return string id of this message + * @return string id of this message */ public function id(): string; @@ -32,9 +32,9 @@ interface IMessage { * * @since 30.0.0 * - * @param IAddress $value sender's mail address object + * @param IAddress $value sender's mail address object * - * @return self return this object for command chaining + * @return self return this object for command chaining */ public function setFrom(IAddress $value): self; @@ -45,16 +45,16 @@ interface IMessage { * * @return IAddress|null sender's mail address object */ - public function getFrom(): IAddress | null; + public function getFrom(): IAddress|null; /** * sets the sender's reply to address of this message * * @since 30.0.0 * - * @param IAddress $value senders's reply to mail address object + * @param IAddress $value senders's reply to mail address object * - * @return self return this object for command chaining + * @return self return this object for command chaining */ public function setReplyTo(IAddress $value): self; @@ -65,16 +65,16 @@ interface IMessage { * * @return IAddress|null sender's reply to mail address object */ - public function getReplyTo(): IAddress | null; + public function getReplyTo(): IAddress|null; /** * sets the recipient(s) of this message * * @since 30.0.0 * - * @param IAddress ...$value collection of or one or more mail address objects + * @param IAddress ...$value collection of or one or more mail address objects * - * @return self return this object for command chaining + * @return self return this object for command chaining */ public function setTo(IAddress ...$value): self; @@ -92,9 +92,9 @@ interface IMessage { * * @since 30.0.0 * - * @param IAddress ...$value collection of or one or more mail address objects + * @param IAddress ...$value collection of or one or more mail address objects * - * @return self return this object for command chaining + * @return self return this object for command chaining */ public function setCc(IAddress ...$value): self; @@ -112,9 +112,9 @@ interface IMessage { * * @since 30.0.0 * - * @param IAddress ...$value collection of or one or more mail address objects + * @param IAddress ...$value collection of or one or more mail address objects * - * @return self return this object for command chaining + * @return self return this object for command chaining */ public function setBcc(IAddress ...$value): self; @@ -132,9 +132,9 @@ interface IMessage { * * @since 30.0.0 * - * @param string $value subject of mail message + * @param string $value subject of mail message * - * @return self return this object for command chaining + * @return self return this object for command chaining */ public function setSubject(string $value): self; @@ -145,17 +145,17 @@ interface IMessage { * * @return string|null subject of message or null if one is not set */ - public function getSubject(): string | null; + public function getSubject(): string|null; /** * sets the plain text or html body of this message * * @since 30.0.0 * - * @param string $value text or html body of message - * @param bool $html html flag - true for html + * @param string $value text or html body of message + * @param bool $html html flag - true for html * - * @return self return this object for command chaining + * @return self return this object for command chaining */ public function setBody(string $value, bool $html): self; @@ -168,16 +168,16 @@ interface IMessage { * * @return string|null html/plain body of this message or null if one is not set */ - public function getBody(): string | null; + public function getBody(): string|null; /** * sets the html body of this message * * @since 30.0.0 * - * @param string $value html body of message + * @param string $value html body of message * - * @return self return this object for command chaining + * @return self return this object for command chaining */ public function setBodyHtml(string $value): self; @@ -188,16 +188,16 @@ interface IMessage { * * @return string|null html body of this message or null if one is not set */ - public function getBodyHtml(): string | null; + public function getBodyHtml(): string|null; /** * sets the plain text body of this message * * @since 30.0.0 * - * @param string $value plain text body of message + * @param string $value plain text body of message * - * @return self return this object for command chaining + * @return self return this object for command chaining */ public function setBodyPlain(string $value): self; @@ -208,16 +208,16 @@ interface IMessage { * * @return string|null plain text body of this message or null if one is not set */ - public function getBodyPlain(): string | null; + public function getBodyPlain(): string|null; /** * sets the attachments of this message * * @since 30.0.0 * - * @param IAttachment ...$value collection of or one or more mail attachment objects + * @param IAttachment ...$value collection of or one or more mail attachment objects * - * @return self return this object for command chaining + * @return self return this object for command chaining */ public function setAttachments(IAttachment ...$value): self; @@ -226,7 +226,7 @@ interface IMessage { * * @since 30.0.0 * - * @return array<int,IAttachment> collection of all mail attachment objects + * @return array<int,IAttachment> collection of all mail attachment objects */ public function getAttachments(): array; } diff --git a/lib/public/Mail/Provider/IMessageSend.php b/lib/public/Mail/Provider/IMessageSend.php index c5c473bcf2e..fe1b2884452 100644 --- a/lib/public/Mail/Provider/IMessageSend.php +++ b/lib/public/Mail/Provider/IMessageSend.php @@ -23,8 +23,8 @@ interface IMessageSend { * * @since 30.0.0 * - * @param IMessage $message mail message object with all required parameters to send a message - * @param array $options array of options reserved for future use + * @param IMessage $message mail message object with all required parameters to send a message + * @param array $options array of options reserved for future use * * @throws \OCP\Mail\Provider\Exception\SendException on failure, check message for reason */ diff --git a/lib/public/Mail/Provider/IProvider.php b/lib/public/Mail/Provider/IProvider.php index 47d6002f9b0..e94ee73217a 100644 --- a/lib/public/Mail/Provider/IProvider.php +++ b/lib/public/Mail/Provider/IProvider.php @@ -23,7 +23,7 @@ interface IProvider { * * @since 30.0.0 * - * @return string id of this provider (e.g. UUID or 'IMAP/SMTP' or anything else) + * @return string id of this provider (e.g. UUID or 'IMAP/SMTP' or anything else) */ public function id(): string; @@ -32,7 +32,7 @@ interface IProvider { * * @since 30.0.0 * - * @return string label/name of this provider (e.g. Plain Old IMAP/SMTP) + * @return string label/name of this provider (e.g. Plain Old IMAP/SMTP) */ public function label(): string; @@ -41,20 +41,20 @@ interface IProvider { * * @since 30.0.0 * - * @param string $userId user id + * @param string $userId user id * - * @return bool true if any services are configure for the user + * @return bool true if any services are configure for the user */ public function hasServices(string $userId): bool; /** * retrieve collection of services for a specific user * - * @param string $userId user id + * @param string $userId user id * * @since 30.0.0 * - * @return array<string,IService> collection of service id and object ['1' => IServiceObject] + * @return array<string,IService> collection of service id and object ['1' => IServiceObject] */ public function listServices(string $userId): array; @@ -63,31 +63,31 @@ interface IProvider { * * @since 30.0.0 * - * @param string $userId user id - * @param string $serviceId service id + * @param string $userId user id + * @param string $serviceId service id * - * @return IService|null returns service object or null if none found + * @return IService|null returns service object or null if none found */ - public function findServiceById(string $userId, string $serviceId): IService | null; + public function findServiceById(string $userId, string $serviceId): IService|null; /** * retrieve a service for a specific mail address * * @since 30.0.0 * - * @param string $userId user id - * @param string $address mail address (e.g. test@example.com) + * @param string $userId user id + * @param string $address mail address (e.g. test@example.com) * - * @return IService|null returns service object or null if none found + * @return IService|null returns service object or null if none found */ - public function findServiceByAddress(string $userId, string $address): IService | null; + public function findServiceByAddress(string $userId, string $address): IService|null; /** * construct a new empty service object * * @since 30.0.0 * - * @return IService blank service object + * @return IService blank service object */ public function initiateService(): IService; diff --git a/lib/public/Mail/Provider/IService.php b/lib/public/Mail/Provider/IService.php index d23c0a92444..e0bb5161aa6 100644 --- a/lib/public/Mail/Provider/IService.php +++ b/lib/public/Mail/Provider/IService.php @@ -23,7 +23,7 @@ interface IService { * * @since 30.0.0 * - * @return string id of this service (e.g. 1 or service1 or anything else) + * @return string id of this service (e.g. 1 or service1 or anything else) */ public function id(): string; @@ -32,9 +32,9 @@ interface IService { * * @since 30.0.0 * - * @param string $value required ability e.g. 'MessageSend' + * @param string $value required ability e.g. 'MessageSend' * - * @return bool true/false if ability is supplied and found in collection + * @return bool true/false if ability is supplied and found in collection */ public function capable(string $value): bool; @@ -43,7 +43,7 @@ interface IService { * * @since 30.0.0 * - * @return array collection of abilities otherwise empty collection + * @return array collection of abilities otherwise empty collection */ public function capabilities(): array; @@ -52,7 +52,7 @@ interface IService { * * @since 30.0.0 * - * @return string label/name of service (e.g. ACME Company Mail Service) + * @return string label/name of service (e.g. ACME Company Mail Service) */ public function getLabel(): string; @@ -61,9 +61,9 @@ interface IService { * * @since 30.0.0 * - * @param string $value label/name of service (e.g. ACME Company Mail Service) + * @param string $value label/name of service (e.g. ACME Company Mail Service) * - * @return self return this object for command chaining + * @return self return this object for command chaining */ public function setLabel(string $value): self; @@ -72,7 +72,7 @@ interface IService { * * @since 30.0.0 * - * @return IAddress mail address object + * @return IAddress mail address object */ public function getPrimaryAddress(): IAddress; @@ -81,9 +81,9 @@ interface IService { * * @since 30.0.0 * - * @param IAddress $value mail address object + * @param IAddress $value mail address object * - * @return self return this object for command chaining + * @return self return this object for command chaining */ public function setPrimaryAddress(IAddress $value): self; @@ -92,7 +92,7 @@ interface IService { * * @since 30.0.0 * - * @return array<int, IAddress> collection of mail address objects + * @return array<int, IAddress> collection of mail address objects */ public function getSecondaryAddresses(): array; @@ -101,9 +101,9 @@ interface IService { * * @since 30.0.0 * - * @param IAddress ...$value collection of one or more mail address objects + * @param IAddress ...$value collection of one or more mail address objects * - * @return self return this object for command chaining + * @return self return this object for command chaining */ public function setSecondaryAddresses(IAddress ...$value): self; @@ -112,7 +112,7 @@ interface IService { * * @since 30.0.0 * - * @return IMessage blank message object + * @return IMessage blank message object */ public function initiateMessage(): IMessage; diff --git a/lib/public/Mail/Provider/Message.php b/lib/public/Mail/Provider/Message.php index b5742985fcf..bfa5153f4ef 100644 --- a/lib/public/Mail/Provider/Message.php +++ b/lib/public/Mail/Provider/Message.php @@ -23,7 +23,7 @@ class Message implements \OCP\Mail\Provider\IMessage { * * @since 30.0.0 * - * @param array $data message data array + * @param array $data message data array */ public function __construct( protected array $data = [], @@ -35,7 +35,7 @@ class Message implements \OCP\Mail\Provider\IMessage { * * @since 30.0.0 * - * @return string id of this message + * @return string id of this message */ public function id(): string { // return id of message @@ -47,9 +47,9 @@ class Message implements \OCP\Mail\Provider\IMessage { * * @since 30.0.0 * - * @param IAddress $value sender's mail address object + * @param IAddress $value sender's mail address object * - * @return self return this object for command chaining + * @return self return this object for command chaining */ public function setFrom(IAddress $value): self { // create or update field in data store with value @@ -65,7 +65,7 @@ class Message implements \OCP\Mail\Provider\IMessage { * * @return IAddress|null sender's mail address object */ - public function getFrom(): IAddress | null { + public function getFrom(): IAddress|null { // evaluate if data store field exists and return value(s) or null otherwise return (isset($this->data['from'])) ? $this->data['from'] : null; } @@ -75,9 +75,9 @@ class Message implements \OCP\Mail\Provider\IMessage { * * @since 30.0.0 * - * @param IAddress $value senders's reply to mail address object + * @param IAddress $value senders's reply to mail address object * - * @return self return this object for command chaining + * @return self return this object for command chaining */ public function setReplyTo(IAddress $value): self { // create or update field in data store with value @@ -93,7 +93,7 @@ class Message implements \OCP\Mail\Provider\IMessage { * * @return IAddress|null sender's reply to mail address object */ - public function getReplyTo(): IAddress | null { + public function getReplyTo(): IAddress|null { // evaluate if data store field exists and return value(s) or null otherwise return (isset($this->data['replyTo'])) ? $this->data['replyTo'] : null; } @@ -103,9 +103,9 @@ class Message implements \OCP\Mail\Provider\IMessage { * * @since 30.0.0 * - * @param IAddress ...$value collection of or one or more mail address objects + * @param IAddress ...$value collection of or one or more mail address objects * - * @return self return this object for command chaining + * @return self return this object for command chaining */ public function setTo(IAddress ...$value): self { // create or update field in data store with value @@ -131,9 +131,9 @@ class Message implements \OCP\Mail\Provider\IMessage { * * @since 30.0.0 * - * @param IAddress ...$value collection of or one or more mail address objects + * @param IAddress ...$value collection of or one or more mail address objects * - * @return self return this object for command chaining + * @return self return this object for command chaining */ public function setCc(IAddress ...$value): self { // create or update field in data store with value @@ -159,9 +159,9 @@ class Message implements \OCP\Mail\Provider\IMessage { * * @since 30.0.0 * - * @param IAddress ...$value collection of or one or more mail address objects + * @param IAddress ...$value collection of or one or more mail address objects * - * @return self return this object for command chaining + * @return self return this object for command chaining */ public function setBcc(IAddress ...$value): self { // create or update field in data store with value @@ -187,9 +187,9 @@ class Message implements \OCP\Mail\Provider\IMessage { * * @since 30.0.0 * - * @param string $value subject of mail message + * @param string $value subject of mail message * - * @return self return this object for command chaining + * @return self return this object for command chaining */ public function setSubject(string $value): self { // create or update field in data store with value @@ -205,7 +205,7 @@ class Message implements \OCP\Mail\Provider\IMessage { * * @return string|null subject of message or null if one is not set */ - public function getSubject(): string | null { + public function getSubject(): string|null { // evaluate if data store field exists and return value(s) or null otherwise return (isset($this->data['subject'])) ? $this->data['subject'] : null; } @@ -215,10 +215,10 @@ class Message implements \OCP\Mail\Provider\IMessage { * * @since 30.0.0 * - * @param string $value text or html body of message - * @param bool $html html flag - true for html + * @param string $value text or html body of message + * @param bool $html html flag - true for html * - * @return self return this object for command chaining + * @return self return this object for command chaining */ public function setBody(string $value, bool $html = false): self { // evaluate html flag and create or update appropriate field in data store with value @@ -240,7 +240,7 @@ class Message implements \OCP\Mail\Provider\IMessage { * * @return string|null html/plain body of this message or null if one is not set */ - public function getBody(): string | null { + public function getBody(): string|null { // evaluate if data store field(s) exists and return value if (isset($this->data['bodyHtml'])) { return $this->data['bodyHtml']; @@ -256,9 +256,9 @@ class Message implements \OCP\Mail\Provider\IMessage { * * @since 30.0.0 * - * @param string $value html body of message + * @param string $value html body of message * - * @return self return this object for command chaining + * @return self return this object for command chaining */ public function setBodyHtml(string $value): self { // create or update field in data store with value @@ -274,7 +274,7 @@ class Message implements \OCP\Mail\Provider\IMessage { * * @return string|null html body of this message or null if one is not set */ - public function getBodyHtml(): string | null { + public function getBodyHtml(): string|null { // evaluate if data store field exists and return value(s) or null otherwise return (isset($this->data['bodyHtml'])) ? $this->data['bodyHtml'] : null; } @@ -284,9 +284,9 @@ class Message implements \OCP\Mail\Provider\IMessage { * * @since 30.0.0 * - * @param string $value plain text body of message + * @param string $value plain text body of message * - * @return self return this object for command chaining + * @return self return this object for command chaining */ public function setBodyPlain(string $value): self { // create or update field in data store with value @@ -302,7 +302,7 @@ class Message implements \OCP\Mail\Provider\IMessage { * * @return string|null plain text body of this message or null if one is not set */ - public function getBodyPlain(): string | null { + public function getBodyPlain(): string|null { // evaluate if data store field exists and return value(s) or null otherwise return (isset($this->data['bodyPlain'])) ? $this->data['bodyPlain'] : null; } @@ -312,9 +312,9 @@ class Message implements \OCP\Mail\Provider\IMessage { * * @since 30.0.0 * - * @param IAttachment ...$value collection of or one or more mail attachment objects + * @param IAttachment ...$value collection of or one or more mail attachment objects * - * @return self return this object for command chaining + * @return self return this object for command chaining */ public function setAttachments(IAttachment ...$value): self { // create or update field in data store with value @@ -328,7 +328,7 @@ class Message implements \OCP\Mail\Provider\IMessage { * * @since 30.0.0 * - * @return array<int,IAttachment> collection of all mail attachment objects + * @return array<int,IAttachment> collection of all mail attachment objects */ public function getAttachments(): array { // evaluate if data store field exists and return value(s) or null otherwise diff --git a/lib/public/Migration/Attributes/MigrationAttribute.php b/lib/public/Migration/Attributes/MigrationAttribute.php index 5b4550c4db5..d5b2d52cafb 100644 --- a/lib/public/Migration/Attributes/MigrationAttribute.php +++ b/lib/public/Migration/Attributes/MigrationAttribute.php @@ -100,7 +100,7 @@ class MigrationAttribute implements JsonSerializable { */ public function import(array $data): self { return $this->setDescription($data['description'] ?? '') - ->setNotes($data['notes'] ?? []); + ->setNotes($data['notes'] ?? []); } /** diff --git a/lib/public/Migration/BigIntMigration.php b/lib/public/Migration/BigIntMigration.php index db50147b28e..0fa7e559f79 100644 --- a/lib/public/Migration/BigIntMigration.php +++ b/lib/public/Migration/BigIntMigration.php @@ -16,7 +16,7 @@ use OCP\DB\ISchemaWrapper; abstract class BigIntMigration extends SimpleMigrationStep { /** * @return array Returns an array with the following structure - * ['table1' => ['column1', 'column2'], ...] + * ['table1' => ['column1', 'column2'], ...] * @since 13.0.0 */ abstract protected function getColumnsByTable(); diff --git a/lib/public/Notification/IManager.php b/lib/public/Notification/IManager.php index 6a16af2d7a0..96427ddff92 100644 --- a/lib/public/Notification/IManager.php +++ b/lib/public/Notification/IManager.php @@ -16,7 +16,7 @@ namespace OCP\Notification; interface IManager extends IApp, INotifier { /** * @param string $appClass The service must implement IApp, otherwise a - * \InvalidArgumentException is thrown later + * \InvalidArgumentException is thrown later * @since 17.0.0 */ public function registerApp(string $appClass): void; @@ -24,8 +24,8 @@ interface IManager extends IApp, INotifier { /** * @param \Closure $service The service must implement INotifier, otherwise a * \InvalidArgumentException is thrown later - * @param \Closure $info An array with the keys 'id' and 'name' containing - * the app id and the app name + * @param \Closure $info An array with the keys 'id' and 'name' containing + * the app id and the app name * @deprecated 17.0.0 use registerNotifierService instead. * @since 8.2.0 - Parameter $info was added in 9.0.0 */ @@ -33,7 +33,7 @@ interface IManager extends IApp, INotifier { /** * @param string $notifierService The service must implement INotifier, otherwise a - * \InvalidArgumentException is thrown later + * \InvalidArgumentException is thrown later * @since 17.0.0 * @deprecated 22.0.0 use the IBootStrap registration context */ diff --git a/lib/public/OCM/Events/ResourceTypeRegisterEvent.php b/lib/public/OCM/Events/ResourceTypeRegisterEvent.php index 11087106cbc..c0129197566 100644 --- a/lib/public/OCM/Events/ResourceTypeRegisterEvent.php +++ b/lib/public/OCM/Events/ResourceTypeRegisterEvent.php @@ -32,7 +32,7 @@ class ResourceTypeRegisterEvent extends Event { * @param string $name * @param list<string> $shareTypes List of supported share recipients, e.g. 'user', 'group', … * @param array<string, string> $protocols List of supported protocols and their location, - * e.g. ['webdav' => '/remote.php/webdav/'] + * e.g. ['webdav' => '/remote.php/webdav/'] * @since 28.0.0 */ public function registerResourceType(string $name, array $shareTypes, array $protocols): void { diff --git a/lib/public/SabrePluginEvent.php b/lib/public/SabrePluginEvent.php index 9a0206f6ded..c8c9db58ac9 100644 --- a/lib/public/SabrePluginEvent.php +++ b/lib/public/SabrePluginEvent.php @@ -39,7 +39,7 @@ class SabrePluginEvent extends Event { * @since 8.2.0 */ public function setStatusCode($statusCode) { - $this->statusCode = (int) $statusCode; + $this->statusCode = (int)$statusCode; return $this; } @@ -49,7 +49,7 @@ class SabrePluginEvent extends Event { * @since 8.2.0 */ public function setMessage($message) { - $this->message = (string) $message; + $this->message = (string)$message; return $this; } diff --git a/lib/public/Security/ISecureRandom.php b/lib/public/Security/ISecureRandom.php index 188236dd3f9..aa191ca348f 100644 --- a/lib/public/Security/ISecureRandom.php +++ b/lib/public/Security/ISecureRandom.php @@ -58,7 +58,7 @@ interface ISecureRandom { * Generate a random string of specified length. * @param int $length The length of the generated string * @param string $characters An optional list of characters to use if no character list is - * specified all valid base64 characters are used. + * specified all valid base64 characters are used. * @return string * @since 8.0.0 */ diff --git a/lib/public/Settings/IIconSection.php b/lib/public/Settings/IIconSection.php index 5a9fbfebf76..e514a0176b7 100644 --- a/lib/public/Settings/IIconSection.php +++ b/lib/public/Settings/IIconSection.php @@ -29,8 +29,8 @@ interface IIconSection { /** * @return int whether the form should be rather on the top or bottom of - * the settings navigation. The sections are arranged in ascending order of - * the priority values. It is required to return a value between 0 and 99. + * the settings navigation. The sections are arranged in ascending order of + * the priority values. It is required to return a value between 0 and 99. * * E.g.: 70 * @since 9.1 diff --git a/lib/public/Settings/ISettings.php b/lib/public/Settings/ISettings.php index ed465a07fb3..a733eb7956d 100644 --- a/lib/public/Settings/ISettings.php +++ b/lib/public/Settings/ISettings.php @@ -25,8 +25,8 @@ interface ISettings { /** * @return int whether the form should be rather on the top or bottom of - * the admin section. The forms are arranged in ascending order of the - * priority values. It is required to return a value between 0 and 100. + * the admin section. The forms are arranged in ascending order of the + * priority values. It is required to return a value between 0 and 100. * * E.g.: 70 * @since 9.1 diff --git a/lib/public/SystemTag/ISystemTagManager.php b/lib/public/SystemTag/ISystemTagManager.php index 99d806155dc..8d0241e752f 100644 --- a/lib/public/SystemTag/ISystemTagManager.php +++ b/lib/public/SystemTag/ISystemTagManager.php @@ -26,7 +26,7 @@ interface ISystemTagManager { * * @throws \InvalidArgumentException if at least one given tag ids is invalid (string instead of integer, etc.) * @throws TagNotFoundException if at least one given tag ids did no exist - * The message contains a json_encoded array of the ids that could not be found + * The message contains a json_encoded array of the ids that could not be found * * @since 9.0.0, optional parameter $user added in 28.0.0 */ @@ -84,7 +84,7 @@ interface ISystemTagManager { * * @throws TagNotFoundException if tag with the given id does not exist * @throws TagAlreadyExistsException if there is already another tag - * with the same attributes + * with the same attributes * * @since 9.0.0 */ diff --git a/lib/public/SystemTag/ISystemTagObjectMapper.php b/lib/public/SystemTag/ISystemTagObjectMapper.php index b3eb0201ce6..f6e46ad4d84 100644 --- a/lib/public/SystemTag/ISystemTagObjectMapper.php +++ b/lib/public/SystemTag/ISystemTagObjectMapper.php @@ -31,7 +31,7 @@ interface ISystemTagObjectMapper { * @param string $objectType object type * * @return array with object id as key and an array - * of tag ids as value + * of tag ids as value * * @since 9.0.0 */ @@ -48,9 +48,9 @@ interface ISystemTagObjectMapper { * @return string[] array of object ids or empty array if none found * * @throws TagNotFoundException if at least one of the - * given tags does not exist + * given tags does not exist * @throws \InvalidArgumentException When a limit is specified together with - * multiple tag ids + * multiple tag ids * * @since 9.0.0 */ @@ -69,7 +69,7 @@ interface ISystemTagObjectMapper { * @param string|array $tagIds tag id or array of tag ids to assign * * @throws TagNotFoundException if at least one of the - * given tags does not exist + * given tags does not exist * * @since 9.0.0 */ @@ -88,7 +88,7 @@ interface ISystemTagObjectMapper { * @param string|array $tagIds tag id or array of tag ids to unassign * * @throws TagNotFoundException if at least one of the - * given tags does not exist + * given tags does not exist * * @since 9.0.0 */ @@ -101,10 +101,10 @@ interface ISystemTagObjectMapper { * @param string $objectType object type * @param string $tagId tag id to check * @param bool $all true to check that ALL objects have the tag assigned, - * false to check that at least ONE object has the tag. + * false to check that at least ONE object has the tag. * * @return bool true if the condition set by $all is matched, false - * otherwise + * otherwise * * @throws TagNotFoundException if the tag does not exist * diff --git a/lib/public/SystemTag/SystemTagsEntityEvent.php b/lib/public/SystemTag/SystemTagsEntityEvent.php index bccff9eda84..d8f391d0dba 100644 --- a/lib/public/SystemTag/SystemTagsEntityEvent.php +++ b/lib/public/SystemTag/SystemTagsEntityEvent.php @@ -37,9 +37,9 @@ class SystemTagsEntityEvent extends Event { /** * @param string $name * @param \Closure $entityExistsFunction The closure should take one - * argument, which is the id of the entity, that tags - * should be handled for. The return should then be bool, - * depending on whether tags are allowed (true) or not. + * argument, which is the id of the entity, that tags + * should be handled for. The return should then be bool, + * depending on whether tags are allowed (true) or not. * @throws \OutOfBoundsException when the entity name is already taken * @since 9.1.0 */ diff --git a/lib/public/TextToImage/Task.php b/lib/public/TextToImage/Task.php index d214354ae34..7b94de0fbb3 100644 --- a/lib/public/TextToImage/Task.php +++ b/lib/public/TextToImage/Task.php @@ -81,7 +81,7 @@ final class Task implements \JsonSerializable { $images = []; for ($i = 0; $i < $this->getNumberOfImages(); $i++) { $image = new Image(); - $image->loadFromFileHandle($folder->getFile((string) $i)->read()); + $image->loadFromFileHandle($folder->getFile((string)$i)->read()); $images[] = $image; } return $images; diff --git a/lib/public/Util.php b/lib/public/Util.php index 17794810c1a..4bd2c61dfbe 100644 --- a/lib/public/Util.php +++ b/lib/public/Util.php @@ -241,7 +241,7 @@ class Util { * @param string $app app * @param string $file file * @param array $args array with param=>value, will be appended to the returned url - * The value of $args will be urlencoded + * The value of $args will be urlencoded * @return string the url * @since 4.0.0 - parameter $args was added in 4.5.0 */ @@ -492,7 +492,7 @@ class Util { * @param string $a first string to compare * @param string $b second string to compare * @return int -1 if $b comes before $a, 1 if $a comes before $b - * or 0 if the strings are identical + * or 0 if the strings are identical * @since 7.0.0 */ public static function naturalSortCompare($a, $b) { |