aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDaniel Kesselberg <mail@danielkesselberg.de>2024-08-23 15:10:27 +0200
committerDaniel Kesselberg <mail@danielkesselberg.de>2024-08-25 19:34:58 +0200
commitaf6de04e9e141466dc229e444ff3f146f4a34765 (patch)
tree7b93f521865cdecdadb33637dea33bea242e7969 /lib
parent1cc6b3577fdbeadece7e4e6478e7f7755555b41a (diff)
downloadnextcloud-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')
-rw-r--r--lib/base.php18
-rw-r--r--lib/private/Activity/Manager.php4
-rw-r--r--lib/private/AllConfig.php14
-rw-r--r--lib/private/App/DependencyAnalyzer.php2
-rw-r--r--lib/private/App/InfoParser.php2
-rw-r--r--lib/private/AppConfig.php46
-rw-r--r--lib/private/AppFramework/App.php2
-rw-r--r--lib/private/AppFramework/Bootstrap/RegistrationContext.php4
-rw-r--r--lib/private/AppFramework/Http/Dispatcher.php10
-rw-r--r--lib/private/AppFramework/Http/Request.php30
-rw-r--r--lib/private/AppFramework/Middleware/MiddlewareDispatcher.php8
-rw-r--r--lib/private/AppFramework/Middleware/Security/CORSMiddleware.php2
-rw-r--r--lib/private/AppFramework/Middleware/Security/PasswordConfirmationMiddleware.php2
-rw-r--r--lib/private/AppFramework/Middleware/Security/RateLimitingMiddleware.php4
-rw-r--r--lib/private/AppFramework/Utility/ControllerMethodReflector.php4
-rw-r--r--lib/private/AppFramework/Utility/SimpleContainer.php2
-rw-r--r--lib/private/Authentication/Listeners/RemoteWipeNotificationsListener.php2
-rw-r--r--lib/private/Authentication/Listeners/UserDeletedFilesCleanupListener.php6
-rw-r--r--lib/private/Authentication/Token/PublicKeyTokenProvider.php18
-rw-r--r--lib/private/Authentication/Token/RemoteWipe.php4
-rw-r--r--lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php4
-rw-r--r--lib/private/Authentication/TwoFactorAuth/Manager.php6
-rw-r--r--lib/private/Avatar/Avatar.php6
-rw-r--r--lib/private/Avatar/AvatarManager.php2
-rw-r--r--lib/private/BackgroundJob/JobList.php6
-rw-r--r--lib/private/Blurhash/Listener/GenerateBlurhashMetadata.php2
-rw-r--r--lib/private/Calendar/Manager.php2
-rw-r--r--lib/private/Calendar/ResourcesRoomsUpdater.php2
-rw-r--r--lib/private/Collaboration/AutoComplete/Manager.php2
-rw-r--r--lib/private/Collaboration/Collaborators/UserPlugin.php4
-rw-r--r--lib/private/Collaboration/Reference/ReferenceManager.php4
-rw-r--r--lib/private/Collaboration/Resources/Manager.php18
-rw-r--r--lib/private/Collaboration/Resources/Resource.php2
-rw-r--r--lib/private/Comments/Comment.php4
-rw-r--r--lib/private/Comments/Manager.php28
-rw-r--r--lib/private/Config.php2
-rw-r--r--lib/private/Console/Application.php12
-rw-r--r--lib/private/Console/TimestampFormatter.php2
-rw-r--r--lib/private/Contacts/ContactsMenu/ContactsStore.php2
-rw-r--r--lib/private/ContactsManager.php16
-rw-r--r--lib/private/DB/Adapter.php6
-rw-r--r--lib/private/DB/AdapterSqlite.php4
-rw-r--r--lib/private/DB/Connection.php26
-rw-r--r--lib/private/DB/ConnectionFactory.php6
-rw-r--r--lib/private/DB/MigrationService.php2
-rw-r--r--lib/private/DB/PreparedStatement.php2
-rw-r--r--lib/private/DB/QueryBuilder/ExpressionBuilder/ExpressionBuilder.php28
-rw-r--r--lib/private/DB/QueryBuilder/Literal.php2
-rw-r--r--lib/private/DB/QueryBuilder/Parameter.php2
-rw-r--r--lib/private/DB/QueryBuilder/QueryBuilder.php12
-rw-r--r--lib/private/DB/QueryBuilder/QueryFunction.php2
-rw-r--r--lib/private/DB/QueryBuilder/QuoteHelper.php2
-rw-r--r--lib/private/DateTimeFormatter.php128
-rw-r--r--lib/private/DirectEditing/Token.php2
-rw-r--r--lib/private/Encryption/DecryptAll.php14
-rw-r--r--lib/private/Encryption/EncryptionWrapper.php4
-rw-r--r--lib/private/Encryption/File.php2
-rw-r--r--lib/private/Encryption/HookManager.php2
-rw-r--r--lib/private/EventSource.php6
-rw-r--r--lib/private/Federation/CloudIdManager.php2
-rw-r--r--lib/private/Files/Cache/Cache.php6
-rw-r--r--lib/private/Files/Cache/FailedCache.php2
-rw-r--r--lib/private/Files/Cache/QuerySearchHelper.php2
-rw-r--r--lib/private/Files/Cache/Storage.php2
-rw-r--r--lib/private/Files/Cache/Updater.php4
-rw-r--r--lib/private/Files/Config/MountProviderCollection.php6
-rw-r--r--lib/private/Files/Config/UserMountCache.php2
-rw-r--r--lib/private/Files/FileInfo.php12
-rw-r--r--lib/private/Files/Filesystem.php2
-rw-r--r--lib/private/Files/Mount/Manager.php4
-rw-r--r--lib/private/Files/Mount/RootMountProvider.php2
-rw-r--r--lib/private/Files/Node/Folder.php2
-rw-r--r--lib/private/Files/Node/LazyUserFolder.php2
-rw-r--r--lib/private/Files/Node/Node.php2
-rw-r--r--lib/private/Files/Node/Root.php2
-rw-r--r--lib/private/Files/ObjectStore/Azure.php4
-rw-r--r--lib/private/Files/ObjectStore/ObjectStoreStorage.php2
-rw-r--r--lib/private/Files/ObjectStore/S3ConnectionTrait.php6
-rw-r--r--lib/private/Files/ObjectStore/S3ObjectTrait.php18
-rw-r--r--lib/private/Files/ObjectStore/S3Signature.php2
-rw-r--r--lib/private/Files/ObjectStore/SwiftFactory.php2
-rw-r--r--lib/private/Files/Search/SearchQuery.php8
-rw-r--r--lib/private/Files/SetupManager.php8
-rw-r--r--lib/private/Files/Storage/Common.php10
-rw-r--r--lib/private/Files/Storage/DAV.php26
-rw-r--r--lib/private/Files/Storage/Home.php2
-rw-r--r--lib/private/Files/Storage/StorageFactory.php2
-rw-r--r--lib/private/Files/Storage/Wrapper/Encryption.php4
-rw-r--r--lib/private/Files/Storage/Wrapper/Quota.php2
-rw-r--r--lib/private/Files/Storage/Wrapper/Wrapper.php2
-rw-r--r--lib/private/Files/Stream/Encryption.php2
-rw-r--r--lib/private/Files/Stream/SeekableHttpStream.php2
-rw-r--r--lib/private/Files/Type/Loader.php6
-rw-r--r--lib/private/Files/View.php12
-rw-r--r--lib/private/FilesMetadata/Service/IndexRequestService.php20
-rw-r--r--lib/private/FilesMetadata/Service/MetadataRequestService.php30
-rw-r--r--lib/private/FullTextSearch/Model/IndexDocument.php8
-rw-r--r--lib/private/Group/Database.php6
-rw-r--r--lib/private/Group/Group.php4
-rw-r--r--lib/private/Group/Manager.php2
-rw-r--r--lib/private/Group/MetaData.php2
-rw-r--r--lib/private/Http/Client/Client.php568
-rw-r--r--lib/private/Http/Client/ClientService.php2
-rw-r--r--lib/private/Http/Client/GuzzlePromiseAdapter.php4
-rw-r--r--lib/private/Http/Client/NegativeDnsCache.php4
-rw-r--r--lib/private/Http/WellKnown/RequestManager.php4
-rw-r--r--lib/private/Installer.php2
-rw-r--r--lib/private/L10N/L10N.php20
-rw-r--r--lib/private/LDAP/NullLDAPProviderFactory.php2
-rwxr-xr-xlib/private/LargeFileHelper.php2
-rw-r--r--lib/private/Lock/MemcacheLockingProvider.php4
-rw-r--r--lib/private/Log.php2
-rw-r--r--lib/private/Log/File.php2
-rw-r--r--lib/private/Log/LogDetails.php2
-rw-r--r--lib/private/Log/PsrLoggerAdapter.php18
-rw-r--r--lib/private/Mail/EMailTemplate.php12
-rw-r--r--lib/private/Mail/Mailer.php8
-rw-r--r--lib/private/Mail/Provider/Manager.php32
-rw-r--r--lib/private/Memcache/ProfilerWrapperCache.php2
-rw-r--r--lib/private/Memcache/Redis.php4
-rw-r--r--lib/private/NaturalSort.php2
-rw-r--r--lib/private/Notification/Manager.php8
-rw-r--r--lib/private/OCM/Model/OCMProvider.php4
-rw-r--r--lib/private/OCM/Model/OCMResource.php4
-rw-r--r--lib/private/Preview/Bitmap.php2
-rw-r--r--lib/private/Preview/Generator.php8
-rw-r--r--lib/private/Preview/HEIC.php4
-rw-r--r--lib/private/Preview/MarkDown.php2
-rw-r--r--lib/private/Preview/Movie.php2
-rw-r--r--lib/private/Preview/SVG.php2
-rw-r--r--lib/private/Preview/TXT.php4
-rw-r--r--lib/private/PreviewManager.php2
-rw-r--r--lib/private/Profile/ProfileManager.php2
-rw-r--r--lib/private/Profiler/FileProfilerStorage.php2
-rw-r--r--lib/private/RedisFactory.php2
-rw-r--r--lib/private/Repair.php2
-rw-r--r--lib/private/Repair/CleanTags.php6
-rw-r--r--lib/private/Repair/Collation.php16
-rw-r--r--lib/private/Repair/NC25/AddMissingSecretJob.php4
-rw-r--r--lib/private/Repair/OldGroupMembershipShares.php8
-rw-r--r--lib/private/Repair/Owncloud/MigrateOauthTables.php10
-rw-r--r--lib/private/Repair/Owncloud/SaveAccountsTableData.php2
-rw-r--r--lib/private/Repair/RemoveLinkShares.php4
-rw-r--r--lib/private/Repair/RepairInvalidShares.php4
-rw-r--r--lib/private/Repair/RepairMimeTypes.php12
-rw-r--r--lib/private/Route/Route.php2
-rw-r--r--lib/private/Search/FilterFactory.php2
-rw-r--r--lib/private/Security/Bruteforce/Backend/DatabaseBackend.php2
-rw-r--r--lib/private/Security/Bruteforce/Throttler.php4
-rw-r--r--lib/private/Security/Ip/Range.php2
-rw-r--r--lib/private/Security/Ip/RemoteAddress.php2
-rw-r--r--lib/private/Security/SecureRandom.php2
-rw-r--r--lib/private/Settings/Section.php10
-rw-r--r--lib/private/Setup.php12
-rw-r--r--lib/private/Setup/AbstractDatabase.php14
-rw-r--r--lib/private/Setup/OCI.php6
-rw-r--r--lib/private/Setup/PostgreSQL.php6
-rw-r--r--lib/private/Share20/DefaultShareProvider.php14
-rw-r--r--lib/private/Share20/Manager.php4
-rw-r--r--lib/private/Share20/ProviderFactory.php4
-rw-r--r--lib/private/Share20/Share.php2
-rw-r--r--lib/private/Share20/ShareAttributes.php6
-rw-r--r--lib/private/Streamer.php2
-rw-r--r--lib/private/SystemTag/SystemTagObjectMapper.php2
-rw-r--r--lib/private/TagManager.php2
-rw-r--r--lib/private/Tags.php4
-rw-r--r--lib/private/Talk/Broker.php8
-rw-r--r--lib/private/TaskProcessing/Manager.php6
-rw-r--r--lib/private/TempManager.php2
-rw-r--r--lib/private/Template/JSConfigHelper.php32
-rw-r--r--lib/private/TemplateLayout.php2
-rw-r--r--lib/private/TextProcessing/Manager.php2
-rw-r--r--lib/private/TextToImage/Manager.php8
-rw-r--r--lib/private/URLGenerator.php4
-rw-r--r--lib/private/Updater.php2
-rw-r--r--lib/private/Updater/VersionCheck.php2
-rw-r--r--lib/private/User/Database.php2
-rw-r--r--lib/private/User/Manager.php6
-rw-r--r--lib/private/User/User.php4
-rw-r--r--lib/private/legacy/OC_App.php4
-rw-r--r--lib/private/legacy/OC_Files.php6
-rw-r--r--lib/private/legacy/OC_Helper.php20
-rw-r--r--lib/private/legacy/OC_Hook.php6
-rw-r--r--lib/private/legacy/OC_Image.php20
-rw-r--r--lib/private/legacy/OC_Template.php6
-rw-r--r--lib/private/legacy/OC_User.php8
-rw-r--r--lib/private/legacy/OC_Util.php20
-rw-r--r--lib/private/legacy/template/functions.php12
-rw-r--r--lib/public/Accounts/IAccount.php2
-rw-r--r--lib/public/Accounts/IAccountManager.php6
-rw-r--r--lib/public/Activity/ActivitySettings.php4
-rw-r--r--lib/public/Activity/IFilter.php4
-rw-r--r--lib/public/Activity/ISetting.php4
-rw-r--r--lib/public/AppFramework/ApiController.php10
-rw-r--r--lib/public/AppFramework/App.php2
-rw-r--r--lib/public/AppFramework/Controller.php2
-rw-r--r--lib/public/AppFramework/Db/Entity.php2
-rw-r--r--lib/public/AppFramework/Db/QBMapper.php4
-rw-r--r--lib/public/AppFramework/Http/Attribute/OpenAPI.php10
-rw-r--r--lib/public/AppFramework/Http/ContentSecurityPolicy.php2
-rw-r--r--lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php4
-rw-r--r--lib/public/AppFramework/Http/JSONResponse.php2
-rw-r--r--lib/public/AppFramework/Http/Response.php6
-rw-r--r--lib/public/AppFramework/Http/TemplateResponse.php2
-rw-r--r--lib/public/AppFramework/OCSController.php12
-rw-r--r--lib/public/AppFramework/Utility/IControllerMethodReflector.php4
-rw-r--r--lib/public/Authentication/TwoFactorAuth/IRegistry.php2
-rw-r--r--lib/public/Calendar/ICalendar.php2
-rw-r--r--lib/public/Calendar/IHandleImipMessage.php2
-rw-r--r--lib/public/Calendar/IManager.php2
-rw-r--r--lib/public/Collaboration/AutoComplete/IManager.php6
-rw-r--r--lib/public/Collaboration/Collaborators/ISearch.php2
-rw-r--r--lib/public/Collaboration/Collaborators/SearchResultType.php2
-rw-r--r--lib/public/Collaboration/Reference/LinkReferenceProvider.php2
-rw-r--r--lib/public/Color.php2
-rw-r--r--lib/public/Comments/CommentsEntityEvent.php6
-rw-r--r--lib/public/Comments/ICommentsManager.php10
-rw-r--r--lib/public/Constants.php2
-rw-r--r--lib/public/Contacts/IManager.php16
-rw-r--r--lib/public/DB/QueryBuilder/IExpressionBuilder.php28
-rw-r--r--lib/public/DB/QueryBuilder/IQueryBuilder.php2
-rw-r--r--lib/public/Encryption/IEncryptionModule.php4
-rw-r--r--lib/public/Files.php2
-rw-r--r--lib/public/Files/Cache/ICache.php2
-rw-r--r--lib/public/Files/ForbiddenException.php2
-rw-r--r--lib/public/Files/Storage/IStorageFactory.php2
-rw-r--r--lib/public/Files/Template/Field.php12
-rw-r--r--lib/public/Files/Template/FieldType.php10
-rw-r--r--lib/public/Group/Backend/ABackend.php2
-rw-r--r--lib/public/Group/Backend/ISearchableGroupBackend.php6
-rw-r--r--lib/public/HintException.php12
-rw-r--r--lib/public/Http/Client/IClient.php540
-rw-r--r--lib/public/Http/Client/IPromise.php4
-rw-r--r--lib/public/IAddressBook.php22
-rw-r--r--lib/public/IConfig.php6
-rw-r--r--lib/public/IDBConnection.php4
-rw-r--r--lib/public/IDateTimeFormatter.php106
-rw-r--r--lib/public/IImage.php2
-rw-r--r--lib/public/IL10N.php2
-rw-r--r--lib/public/IRequest.php10
-rw-r--r--lib/public/ITagManager.php2
-rw-r--r--lib/public/ITags.php4
-rw-r--r--lib/public/IURLGenerator.php2
-rw-r--r--lib/public/Mail/IEMailTemplate.php10
-rw-r--r--lib/public/Mail/IMailer.php4
-rw-r--r--lib/public/Mail/Provider/Address.php20
-rw-r--r--lib/public/Mail/Provider/Attachment.php38
-rw-r--r--lib/public/Mail/Provider/IAddress.php16
-rw-r--r--lib/public/Mail/Provider/IAttachment.php30
-rw-r--r--lib/public/Mail/Provider/IManager.php32
-rw-r--r--lib/public/Mail/Provider/IMessage.php58
-rw-r--r--lib/public/Mail/Provider/IMessageSend.php4
-rw-r--r--lib/public/Mail/Provider/IProvider.php30
-rw-r--r--lib/public/Mail/Provider/IService.php28
-rw-r--r--lib/public/Mail/Provider/Message.php60
-rw-r--r--lib/public/Migration/Attributes/MigrationAttribute.php2
-rw-r--r--lib/public/Migration/BigIntMigration.php2
-rw-r--r--lib/public/Notification/IManager.php8
-rw-r--r--lib/public/OCM/Events/ResourceTypeRegisterEvent.php2
-rw-r--r--lib/public/SabrePluginEvent.php4
-rw-r--r--lib/public/Security/ISecureRandom.php2
-rw-r--r--lib/public/Settings/IIconSection.php4
-rw-r--r--lib/public/Settings/ISettings.php4
-rw-r--r--lib/public/SystemTag/ISystemTagManager.php4
-rw-r--r--lib/public/SystemTag/ISystemTagObjectMapper.php14
-rw-r--r--lib/public/SystemTag/SystemTagsEntityEvent.php6
-rw-r--r--lib/public/TextToImage/Task.php2
-rw-r--r--lib/public/Util.php4
268 files changed, 1610 insertions, 1610 deletions
diff --git a/lib/base.php b/lib/base.php
index 010fed1ea9f..6491c191d25 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -74,7 +74,7 @@ class OC {
/**
* @throws \RuntimeException when the 3rdparty directory is missing or
- * the app path list is empty or contains an invalid path
+ * the app path list is empty or contains an invalid path
*/
public static function initPaths(): void {
if (defined('PHPUNIT_CONFIG_DIR')) {
@@ -88,7 +88,7 @@ class OC {
}
self::$config = new \OC\Config(self::$configDir);
- OC::$SUBURI = str_replace("\\", "/", substr(realpath($_SERVER["SCRIPT_FILENAME"] ?? ''), strlen(OC::$SERVERROOT)));
+ OC::$SUBURI = str_replace('\\', '/', substr(realpath($_SERVER['SCRIPT_FILENAME'] ?? ''), strlen(OC::$SERVERROOT)));
/**
* FIXME: The following lines are required because we can't yet instantiate
* Server::get(\OCP\IRequest::class) since \OC::$server does not yet exist.
@@ -231,7 +231,7 @@ class OC {
public static function checkMaintenanceMode(\OC\SystemConfig $systemConfig): void {
// Allow ajax update script to execute without being stopped
- if (((bool) $systemConfig->getValue('maintenance', false)) && OC::$SUBURI != '/core/ajax/update.php') {
+ if (((bool)$systemConfig->getValue('maintenance', false)) && OC::$SUBURI != '/core/ajax/update.php') {
// send http status 503
http_response_code(503);
header('X-Nextcloud-Maintenance-Mode: 1');
@@ -539,7 +539,7 @@ class OC {
});
// calculate the root directories
- OC::$SERVERROOT = str_replace("\\", '/', substr(__DIR__, 0, -4));
+ OC::$SERVERROOT = str_replace('\\', '/', substr(__DIR__, 0, -4));
// register autoloader
$loaderStart = microtime(true);
@@ -709,7 +709,7 @@ class OC {
}
// User and Groups
- if (!$systemConfig->getValue("installed", false)) {
+ if (!$systemConfig->getValue('installed', false)) {
self::$server->getSession()->set('user_id', '');
}
@@ -742,7 +742,7 @@ class OC {
self::registerAppRestrictionsHooks();
// Make sure that the application class is not loaded before the database is setup
- if ($systemConfig->getValue("installed", false)) {
+ if ($systemConfig->getValue('installed', false)) {
OC_App::loadApp('settings');
/* Build core application to make sure that listeners are registered */
Server::get(\OC\Core\Application::class);
@@ -964,7 +964,7 @@ class OC {
if (function_exists('opcache_reset')) {
opcache_reset();
}
- if (!((bool) $systemConfig->getValue('maintenance', false))) {
+ if (!((bool)$systemConfig->getValue('maintenance', false))) {
self::printUpgradePage($systemConfig);
exit();
}
@@ -977,7 +977,7 @@ class OC {
// Load minimum set of apps
if (!\OCP\Util::needUpgrade()
- && !((bool) $systemConfig->getValue('maintenance', false))) {
+ && !((bool)$systemConfig->getValue('maintenance', false))) {
// For logged-in users: Load everything
if (Server::get(IUserSession::class)->isLoggedIn()) {
OC_App::loadApps();
@@ -996,7 +996,7 @@ class OC {
if (!self::$CLI) {
try {
- if (!((bool) $systemConfig->getValue('maintenance', false)) && !\OCP\Util::needUpgrade()) {
+ if (!((bool)$systemConfig->getValue('maintenance', false)) && !\OCP\Util::needUpgrade()) {
OC_App::loadApps(['filesystem', 'logging']);
OC_App::loadApps();
}
diff --git a/lib/private/Activity/Manager.php b/lib/private/Activity/Manager.php
index 8b60dc49ec9..54d50a47dcb 100644
--- a/lib/private/Activity/Manager.php
+++ b/lib/private/Activity/Manager.php
@@ -291,7 +291,7 @@ class Manager implements IManager {
public function isFormattingFilteredObject(): bool {
return $this->formattingObjectType !== null && $this->formattingObjectId !== null
&& $this->formattingObjectType === $this->request->getParam('object_type')
- && $this->formattingObjectId === (int) $this->request->getParam('object_id');
+ && $this->formattingObjectId === (int)$this->request->getParam('object_id');
}
/**
@@ -344,7 +344,7 @@ class Manager implements IManager {
* @throws \UnexpectedValueException If the token is invalid, does not exist or is not unique
*/
protected function getUserFromToken(): string {
- $token = (string) $this->request->getParam('token', '');
+ $token = (string)$this->request->getParam('token', '');
if (strlen($token) !== 30) {
throw new \UnexpectedValueException('The token is invalid');
}
diff --git a/lib/private/AllConfig.php b/lib/private/AllConfig.php
index 58eee772fbf..cc3a3ad90d4 100644
--- a/lib/private/AllConfig.php
+++ b/lib/private/AllConfig.php
@@ -107,7 +107,7 @@ class AllConfig implements IConfig {
* @since 16.0.0
*/
public function getSystemValueBool(string $key, bool $default = false): bool {
- return (bool) $this->getSystemValue($key, $default);
+ return (bool)$this->getSystemValue($key, $default);
}
/**
@@ -121,7 +121,7 @@ class AllConfig implements IConfig {
* @since 16.0.0
*/
public function getSystemValueInt(string $key, int $default = 0): int {
- return (int) $this->getSystemValue($key, $default);
+ return (int)$this->getSystemValue($key, $default);
}
/**
@@ -135,7 +135,7 @@ class AllConfig implements IConfig {
* @since 16.0.0
*/
public function getSystemValueString(string $key, string $default = ''): string {
- return (string) $this->getSystemValue($key, $default);
+ return (string)$this->getSystemValue($key, $default);
}
/**
@@ -236,7 +236,7 @@ class AllConfig implements IConfig {
$this->fixDIInit();
if ($appName === 'settings' && $key === 'email') {
- $value = strtolower((string) $value);
+ $value = strtolower((string)$value);
}
$prevValue = $this->getUserValue($userId, $appName, $key, null);
@@ -382,9 +382,9 @@ class AllConfig implements IConfig {
* @param ?string $userId the user ID to get the app configs from
* @psalm-return array<string, array<string, string>>
* @return array[] - 2 dimensional array with the following structure:
- * [ $appId =>
- * [ $key => $value ]
- * ]
+ * [ $appId =>
+ * [ $key => $value ]
+ * ]
*/
public function getAllUserValues(?string $userId): array {
if (isset($this->userCache[$userId])) {
diff --git a/lib/private/App/DependencyAnalyzer.php b/lib/private/App/DependencyAnalyzer.php
index d963c74de79..72b38ca12c7 100644
--- a/lib/private/App/DependencyAnalyzer.php
+++ b/lib/private/App/DependencyAnalyzer.php
@@ -66,7 +66,7 @@ class DependencyAnalyzer {
* @param string $first
* @param string $second
* @return string[] first element is the first version, second element is the
- * second version
+ * second version
*/
private function normalizeVersions($first, $second) {
$first = explode('.', $first);
diff --git a/lib/private/App/InfoParser.php b/lib/private/App/InfoParser.php
index 54afd0069fb..d0e67b82f21 100644
--- a/lib/private/App/InfoParser.php
+++ b/lib/private/App/InfoParser.php
@@ -223,7 +223,7 @@ class InfoParser {
$totalElement = count($xml->{$element});
if (!isset($array[$element])) {
- $array[$element] = $totalElement > 1 ? [] : "";
+ $array[$element] = $totalElement > 1 ? [] : '';
}
/** @var \SimpleXMLElement $node */
// Has attributes
diff --git a/lib/private/AppConfig.php b/lib/private/AppConfig.php
index d046557e42c..c27150a67dc 100644
--- a/lib/private/AppConfig.php
+++ b/lib/private/AppConfig.php
@@ -748,11 +748,11 @@ class AppConfig implements IAppConfig {
try {
$insert = $this->connection->getQueryBuilder();
$insert->insert('appconfig')
- ->setValue('appid', $insert->createNamedParameter($app))
- ->setValue('lazy', $insert->createNamedParameter(($lazy) ? 1 : 0, IQueryBuilder::PARAM_INT))
- ->setValue('type', $insert->createNamedParameter($type, IQueryBuilder::PARAM_INT))
- ->setValue('configkey', $insert->createNamedParameter($key))
- ->setValue('configvalue', $insert->createNamedParameter($value));
+ ->setValue('appid', $insert->createNamedParameter($app))
+ ->setValue('lazy', $insert->createNamedParameter(($lazy) ? 1 : 0, IQueryBuilder::PARAM_INT))
+ ->setValue('type', $insert->createNamedParameter($type, IQueryBuilder::PARAM_INT))
+ ->setValue('configkey', $insert->createNamedParameter($key))
+ ->setValue('configvalue', $insert->createNamedParameter($value));
$insert->executeStatement();
$inserted = true;
} catch (DBException $e) {
@@ -807,11 +807,11 @@ class AppConfig implements IAppConfig {
$update = $this->connection->getQueryBuilder();
$update->update('appconfig')
- ->set('configvalue', $update->createNamedParameter($value))
- ->set('lazy', $update->createNamedParameter(($lazy) ? 1 : 0, IQueryBuilder::PARAM_INT))
- ->set('type', $update->createNamedParameter($type, IQueryBuilder::PARAM_INT))
- ->where($update->expr()->eq('appid', $update->createNamedParameter($app)))
- ->andWhere($update->expr()->eq('configkey', $update->createNamedParameter($key)));
+ ->set('configvalue', $update->createNamedParameter($value))
+ ->set('lazy', $update->createNamedParameter(($lazy) ? 1 : 0, IQueryBuilder::PARAM_INT))
+ ->set('type', $update->createNamedParameter($type, IQueryBuilder::PARAM_INT))
+ ->where($update->expr()->eq('appid', $update->createNamedParameter($app)))
+ ->andWhere($update->expr()->eq('configkey', $update->createNamedParameter($key)));
$update->executeStatement();
}
@@ -869,9 +869,9 @@ class AppConfig implements IAppConfig {
$update = $this->connection->getQueryBuilder();
$update->update('appconfig')
- ->set('type', $update->createNamedParameter($type, IQueryBuilder::PARAM_INT))
- ->where($update->expr()->eq('appid', $update->createNamedParameter($app)))
- ->andWhere($update->expr()->eq('configkey', $update->createNamedParameter($key)));
+ ->set('type', $update->createNamedParameter($type, IQueryBuilder::PARAM_INT))
+ ->where($update->expr()->eq('appid', $update->createNamedParameter($app)))
+ ->andWhere($update->expr()->eq('configkey', $update->createNamedParameter($key)));
$update->executeStatement();
$this->valueTypes[$app][$key] = $type;
@@ -927,10 +927,10 @@ class AppConfig implements IAppConfig {
$update = $this->connection->getQueryBuilder();
$update->update('appconfig')
- ->set('type', $update->createNamedParameter($type, IQueryBuilder::PARAM_INT))
- ->set('configvalue', $update->createNamedParameter($value))
- ->where($update->expr()->eq('appid', $update->createNamedParameter($app)))
- ->andWhere($update->expr()->eq('configkey', $update->createNamedParameter($key)));
+ ->set('type', $update->createNamedParameter($type, IQueryBuilder::PARAM_INT))
+ ->set('configvalue', $update->createNamedParameter($value))
+ ->where($update->expr()->eq('appid', $update->createNamedParameter($app)))
+ ->andWhere($update->expr()->eq('configkey', $update->createNamedParameter($key)));
$update->executeStatement();
$this->valueTypes[$app][$key] = $type;
@@ -962,9 +962,9 @@ class AppConfig implements IAppConfig {
$update = $this->connection->getQueryBuilder();
$update->update('appconfig')
- ->set('lazy', $update->createNamedParameter($lazy ? 1 : 0, IQueryBuilder::PARAM_INT))
- ->where($update->expr()->eq('appid', $update->createNamedParameter($app)))
- ->andWhere($update->expr()->eq('configkey', $update->createNamedParameter($key)));
+ ->set('lazy', $update->createNamedParameter($lazy ? 1 : 0, IQueryBuilder::PARAM_INT))
+ ->where($update->expr()->eq('appid', $update->createNamedParameter($app)))
+ ->andWhere($update->expr()->eq('configkey', $update->createNamedParameter($key)));
$update->executeStatement();
// At this point, it is a lot safer to clean cache
@@ -1075,8 +1075,8 @@ class AppConfig implements IAppConfig {
$this->assertParams($app, $key);
$qb = $this->connection->getQueryBuilder();
$qb->delete('appconfig')
- ->where($qb->expr()->eq('appid', $qb->createNamedParameter($app)))
- ->andWhere($qb->expr()->eq('configkey', $qb->createNamedParameter($key)));
+ ->where($qb->expr()->eq('appid', $qb->createNamedParameter($app)))
+ ->andWhere($qb->expr()->eq('configkey', $qb->createNamedParameter($key)));
$qb->executeStatement();
unset($this->lazyCache[$app][$key]);
@@ -1094,7 +1094,7 @@ class AppConfig implements IAppConfig {
$this->assertParams($app);
$qb = $this->connection->getQueryBuilder();
$qb->delete('appconfig')
- ->where($qb->expr()->eq('appid', $qb->createNamedParameter($app)));
+ ->where($qb->expr()->eq('appid', $qb->createNamedParameter($app)));
$qb->executeStatement();
$this->clearCache();
diff --git a/lib/private/AppFramework/App.php b/lib/private/AppFramework/App.php
index 9f9fb32dbcb..c5f61d7e938 100644
--- a/lib/private/AppFramework/App.php
+++ b/lib/private/AppFramework/App.php
@@ -37,7 +37,7 @@ class App {
* namespace tag or uppercasing the appid's first letter
* @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
*/
public static function buildAppNamespace(string $appId, string $topNamespace = 'OCA\\'): string {
diff --git a/lib/private/AppFramework/Bootstrap/RegistrationContext.php b/lib/private/AppFramework/Bootstrap/RegistrationContext.php
index f59d5b55706..d7a380f9e1d 100644
--- a/lib/private/AppFramework/Bootstrap/RegistrationContext.php
+++ b/lib/private/AppFramework/Bootstrap/RegistrationContext.php
@@ -538,10 +538,10 @@ class RegistrationContext {
public function registerTalkBackend(string $appId, string $backend) {
// Some safeguards for invalid registrations
if ($appId !== 'spreed') {
- throw new RuntimeException("Only the Talk app is allowed to register a Talk backend");
+ throw new RuntimeException('Only the Talk app is allowed to register a Talk backend');
}
if ($this->talkBackendRegistration !== null) {
- throw new RuntimeException("There can only be one Talk backend");
+ throw new RuntimeException('There can only be one Talk backend');
}
$this->talkBackendRegistration = new ServiceRegistration($appId, $backend);
diff --git a/lib/private/AppFramework/Http/Dispatcher.php b/lib/private/AppFramework/Http/Dispatcher.php
index bbb68972a41..b7952df8d19 100644
--- a/lib/private/AppFramework/Http/Dispatcher.php
+++ b/lib/private/AppFramework/Http/Dispatcher.php
@@ -55,9 +55,9 @@ class Dispatcher {
/**
* @param Http $protocol the http protocol with contains all status headers
* @param MiddlewareDispatcher $middlewareDispatcher the dispatcher which
- * runs the middleware
+ * runs the middleware
* @param ControllerMethodReflector $reflector the reflector that is used to inject
- * the arguments for the controller
+ * the arguments for the controller
* @param IRequest $request the incoming request
* @param IConfig $config
* @param ConnectionAdapter $connection
@@ -89,10 +89,10 @@ class Dispatcher {
* Handles a request and calls the dispatcher on the controller
* @param Controller $controller the controller which will be called
* @param string $methodName the method name which will be called on
- * the controller
+ * the controller
* @return array $array[0] contains a string with the http main header,
- * $array[1] contains headers in the form: $key => value, $array[2] contains
- * the response output
+ * $array[1] contains headers in the form: $key => value, $array[2] contains
+ * the response output
* @throws \Exception
*/
public function dispatch(Controller $controller, string $methodName): array {
diff --git a/lib/private/AppFramework/Http/Request.php b/lib/private/AppFramework/Http/Request.php
index c877304c929..4bbeabb7aae 100644
--- a/lib/private/AppFramework/Http/Request.php
+++ b/lib/private/AppFramework/Http/Request.php
@@ -67,15 +67,15 @@ class Request implements \ArrayAccess, \Countable, IRequest {
/**
* @param array $vars An associative array with the following optional values:
- * - array 'urlParams' the parameters which were matched from the URL
- * - array 'get' the $_GET array
- * - array|string 'post' the $_POST array or JSON string
- * - array 'files' the $_FILES array
- * - array 'server' the $_SERVER array
- * - array 'env' the $_ENV array
- * - array 'cookies' the $_COOKIE array
- * - string 'method' the request method (GET, POST etc)
- * - string|false 'requesttoken' the requesttoken or false when not available
+ * - array 'urlParams' the parameters which were matched from the URL
+ * - array 'get' the $_GET array
+ * - array|string 'post' the $_POST array or JSON string
+ * - array 'files' the $_FILES array
+ * - array 'server' the $_SERVER array
+ * - array 'env' the $_ENV array
+ * - array 'cookies' the $_COOKIE array
+ * - string 'method' the request method (GET, POST etc)
+ * - string|false 'requesttoken' the requesttoken or false when not available
* @param IRequestId $requestId
* @param IConfig $config
* @param CsrfTokenManager|null $csrfTokenManager
@@ -284,11 +284,11 @@ class Request implements \ArrayAccess, \Countable, IRequest {
* In case of json requests the encoded json body is accessed
*
* @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
*/
@@ -837,7 +837,7 @@ class Request implements \ArrayAccess, \Countable, IRequest {
* Returns the overwritehost setting from the config if set and
* if the overwrite condition is met
* @return string|null overwritehost value or null if not defined or the defined condition
- * isn't met
+ * isn't met
*/
private function getOverwriteHost() {
if ($this->config->getSystemValueString('overwritehost') !== '' && $this->isOverwriteCondition()) {
diff --git a/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php b/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php
index 2b5acc8b75f..c9b51f26f34 100644
--- a/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php
+++ b/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php
@@ -23,7 +23,7 @@ class MiddlewareDispatcher {
/**
* @var int counter which tells us what middleware was executed once an
- * exception occurs
+ * exception occurs
*/
private int $middlewareCounter;
@@ -84,10 +84,10 @@ class MiddlewareDispatcher {
*
* @param Controller $controller the controller that is being called
* @param string $methodName the name of the method that will be called on
- * the controller
+ * the controller
* @param \Exception $exception the thrown exception
* @return Response a Response object if the middleware can handle the
- * exception
+ * exception
* @throws \Exception the passed in exception if it can't handle it
*/
public function afterException(Controller $controller, string $methodName, \Exception $exception): Response {
@@ -109,7 +109,7 @@ class MiddlewareDispatcher {
*
* @param Controller $controller the controller that is being called
* @param string $methodName the name of the method that will be called on
- * the controller
+ * the controller
* @param Response $response the generated response from the controller
* @return Response a Response object
*/
diff --git a/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php b/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php
index 3f0755b1b91..10c8f8c7aee 100644
--- a/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php
+++ b/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php
@@ -31,7 +31,7 @@ use ReflectionMethod;
* https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
*/
class CORSMiddleware extends Middleware {
- /** @var IRequest */
+ /** @var IRequest */
private $request;
/** @var ControllerMethodReflector */
private $reflector;
diff --git a/lib/private/AppFramework/Middleware/Security/PasswordConfirmationMiddleware.php b/lib/private/AppFramework/Middleware/Security/PasswordConfirmationMiddleware.php
index a983de23597..34933e13ecd 100644
--- a/lib/private/AppFramework/Middleware/Security/PasswordConfirmationMiddleware.php
+++ b/lib/private/AppFramework/Middleware/Security/PasswordConfirmationMiddleware.php
@@ -93,7 +93,7 @@ class PasswordConfirmationMiddleware extends Middleware {
return;
}
- $lastConfirm = (int) $this->session->get('last-password-confirm');
+ $lastConfirm = (int)$this->session->get('last-password-confirm');
// TODO: confirm excludedUserBackEnds can go away and remove it
if (!isset($this->excludedUserBackEnds[$backendClassName]) && $lastConfirm < ($this->timeFactory->getTime() - (30 * 60 + 15))) { // allow 15 seconds delay
throw new NotConfirmedException();
diff --git a/lib/private/AppFramework/Middleware/Security/RateLimitingMiddleware.php b/lib/private/AppFramework/Middleware/Security/RateLimitingMiddleware.php
index 511ee3fc28a..f4d120ebc30 100644
--- a/lib/private/AppFramework/Middleware/Security/RateLimitingMiddleware.php
+++ b/lib/private/AppFramework/Middleware/Security/RateLimitingMiddleware.php
@@ -112,8 +112,8 @@ class RateLimitingMiddleware extends Middleware {
if ($annotationLimit !== '' && $annotationPeriod !== '') {
return new $attributeClass(
- (int) $annotationLimit,
- (int) $annotationPeriod,
+ (int)$annotationLimit,
+ (int)$annotationPeriod,
);
}
diff --git a/lib/private/AppFramework/Utility/ControllerMethodReflector.php b/lib/private/AppFramework/Utility/ControllerMethodReflector.php
index 9c08f58b384..2031327dfae 100644
--- a/lib/private/AppFramework/Utility/ControllerMethodReflector.php
+++ b/lib/private/AppFramework/Utility/ControllerMethodReflector.php
@@ -82,9 +82,9 @@ class ControllerMethodReflector implements 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
*/
public function getType(string $parameter) {
if (array_key_exists($parameter, $this->types)) {
diff --git a/lib/private/AppFramework/Utility/SimpleContainer.php b/lib/private/AppFramework/Utility/SimpleContainer.php
index bf0ef36d13c..56de4a34cf6 100644
--- a/lib/private/AppFramework/Utility/SimpleContainer.php
+++ b/lib/private/AppFramework/Utility/SimpleContainer.php
@@ -89,7 +89,7 @@ class SimpleContainer implements ArrayAccess, ContainerInterface, IContainer {
}
// don't lose the error we got while trying to query by type
- throw new QueryException($e->getMessage(), (int) $e->getCode(), $e);
+ throw new QueryException($e->getMessage(), (int)$e->getCode(), $e);
}
}
diff --git a/lib/private/Authentication/Listeners/RemoteWipeNotificationsListener.php b/lib/private/Authentication/Listeners/RemoteWipeNotificationsListener.php
index d95bcd98cf9..5781c1edf16 100644
--- a/lib/private/Authentication/Listeners/RemoteWipeNotificationsListener.php
+++ b/lib/private/Authentication/Listeners/RemoteWipeNotificationsListener.php
@@ -45,7 +45,7 @@ class RemoteWipeNotificationsListener implements IEventListener {
$notification->setApp('auth')
->setUser($token->getUID())
->setDateTime($this->timeFactory->getDateTime())
- ->setObject('token', (string) $token->getId())
+ ->setObject('token', (string)$token->getId())
->setSubject($event, [
'name' => $token->getName(),
]);
diff --git a/lib/private/Authentication/Listeners/UserDeletedFilesCleanupListener.php b/lib/private/Authentication/Listeners/UserDeletedFilesCleanupListener.php
index 697aea71c6d..8523fb6abc7 100644
--- a/lib/private/Authentication/Listeners/UserDeletedFilesCleanupListener.php
+++ b/lib/private/Authentication/Listeners/UserDeletedFilesCleanupListener.php
@@ -39,7 +39,7 @@ class UserDeletedFilesCleanupListener implements IEventListener {
$userHome = $this->mountProviderCollection->getHomeMountForUser($event->getUser());
$storage = $userHome->getStorage();
if (!$storage) {
- throw new \Exception("Account has no home storage");
+ throw new \Exception('Account has no home storage');
}
// remove all wrappers, so we do the delete directly on the home storage bypassing any wrapper
@@ -52,7 +52,7 @@ class UserDeletedFilesCleanupListener implements IEventListener {
}
if ($event instanceof UserDeletedEvent) {
if (!isset($this->homeStorageCache[$event->getUser()->getUID()])) {
- throw new \Exception("UserDeletedEvent fired without matching BeforeUserDeletedEvent");
+ throw new \Exception('UserDeletedEvent fired without matching BeforeUserDeletedEvent');
}
$storage = $this->homeStorageCache[$event->getUser()->getUID()];
$cache = $storage->getCache();
@@ -60,7 +60,7 @@ class UserDeletedFilesCleanupListener implements IEventListener {
if ($cache instanceof Cache) {
$cache->clear();
} else {
- throw new \Exception("Home storage has invalid cache");
+ throw new \Exception('Home storage has invalid cache');
}
}
}
diff --git a/lib/private/Authentication/Token/PublicKeyTokenProvider.php b/lib/private/Authentication/Token/PublicKeyTokenProvider.php
index d3b1e7cffd7..4eddd5c80f7 100644
--- a/lib/private/Authentication/Token/PublicKeyTokenProvider.php
+++ b/lib/private/Authentication/Token/PublicKeyTokenProvider.php
@@ -162,7 +162,7 @@ class PublicKeyTokenProvider implements IProvider {
$this->rotate($token, $tokenId, $tokenId);
} catch (DoesNotExistException) {
$this->cacheInvalidHash($tokenHash);
- throw new InvalidTokenException("Token does not exist: " . $ex->getMessage(), 0, $ex);
+ throw new InvalidTokenException('Token does not exist: ' . $ex->getMessage(), 0, $ex);
}
}
@@ -232,7 +232,7 @@ class PublicKeyTokenProvider implements IProvider {
$token = $this->getToken($oldSessionId);
if (!($token instanceof PublicKeyToken)) {
- throw new InvalidTokenException("Invalid token type");
+ throw new InvalidTokenException('Invalid token type');
}
$password = null;
@@ -302,7 +302,7 @@ class PublicKeyTokenProvider implements IProvider {
public function updateToken(OCPIToken $token) {
if (!($token instanceof PublicKeyToken)) {
- throw new InvalidTokenException("Invalid token type");
+ throw new InvalidTokenException('Invalid token type');
}
$this->mapper->update($token);
$this->cacheToken($token);
@@ -310,7 +310,7 @@ class PublicKeyTokenProvider implements IProvider {
public function updateTokenActivity(OCPIToken $token) {
if (!($token instanceof PublicKeyToken)) {
- throw new InvalidTokenException("Invalid token type");
+ throw new InvalidTokenException('Invalid token type');
}
$activityInterval = $this->config->getSystemValueInt('token_auth_activity_update', 60);
@@ -331,7 +331,7 @@ class PublicKeyTokenProvider implements IProvider {
public function getPassword(OCPIToken $savedToken, string $tokenId): string {
if (!($savedToken instanceof PublicKeyToken)) {
- throw new InvalidTokenException("Invalid token type");
+ throw new InvalidTokenException('Invalid token type');
}
if ($savedToken->getPassword() === null) {
@@ -347,7 +347,7 @@ class PublicKeyTokenProvider implements IProvider {
public function setPassword(OCPIToken $token, string $tokenId, string $password) {
if (!($token instanceof PublicKeyToken)) {
- throw new InvalidTokenException("Invalid token type");
+ throw new InvalidTokenException('Invalid token type');
}
$this->atomic(function () use ($password, $token) {
@@ -372,7 +372,7 @@ class PublicKeyTokenProvider implements IProvider {
public function rotate(OCPIToken $token, string $oldTokenId, string $newTokenId): OCPIToken {
if (!($token instanceof PublicKeyToken)) {
- throw new InvalidTokenException("Invalid token type");
+ throw new InvalidTokenException('Invalid token type');
}
// Decrypt private key with oldTokenId
@@ -405,7 +405,7 @@ class PublicKeyTokenProvider implements IProvider {
} catch (\Exception $ex2) {
// Delete the invalid token
$this->invalidateToken($token);
- throw new InvalidTokenException("Could not decrypt token password: " . $ex->getMessage(), 0, $ex2);
+ throw new InvalidTokenException('Could not decrypt token password: ' . $ex->getMessage(), 0, $ex2);
}
}
}
@@ -495,7 +495,7 @@ class PublicKeyTokenProvider implements IProvider {
public function markPasswordInvalid(OCPIToken $token, string $tokenId) {
if (!($token instanceof PublicKeyToken)) {
- throw new InvalidTokenException("Invalid token type");
+ throw new InvalidTokenException('Invalid token type');
}
$token->setPasswordInvalid(true);
diff --git a/lib/private/Authentication/Token/RemoteWipe.php b/lib/private/Authentication/Token/RemoteWipe.php
index 43c2bd060d1..80ba330b66d 100644
--- a/lib/private/Authentication/Token/RemoteWipe.php
+++ b/lib/private/Authentication/Token/RemoteWipe.php
@@ -98,7 +98,7 @@ class RemoteWipe {
$dbToken = $e->getToken();
- $this->logger->info("user " . $dbToken->getUID() . " started a remote wipe");
+ $this->logger->info('user ' . $dbToken->getUID() . ' started a remote wipe');
$this->eventDispatcher->dispatch(RemoteWipeStarted::class, new RemoteWipeStarted($dbToken));
@@ -126,7 +126,7 @@ class RemoteWipe {
$this->tokenProvider->invalidateToken($token);
- $this->logger->info("user " . $dbToken->getUID() . " finished a remote wipe");
+ $this->logger->info('user ' . $dbToken->getUID() . ' finished a remote wipe');
$this->eventDispatcher->dispatch(RemoteWipeFinished::class, new RemoteWipeFinished($dbToken));
return true;
diff --git a/lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php b/lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php
index c84b7f1af20..cdbd8b48cf2 100644
--- a/lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php
+++ b/lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php
@@ -29,7 +29,7 @@ class ProviderUserAssignmentDao {
* Get all assigned provider IDs for the given user ID
*
* @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 getState(string $uid): array {
$qb = $this->conn->getQueryBuilder();
@@ -95,7 +95,7 @@ class ProviderUserAssignmentDao {
return [
'provider_id' => (string)$row['provider_id'],
'uid' => (string)$row['uid'],
- 'enabled' => ((int) $row['enabled']) === 1,
+ 'enabled' => ((int)$row['enabled']) === 1,
];
}, $rows));
}
diff --git a/lib/private/Authentication/TwoFactorAuth/Manager.php b/lib/private/Authentication/TwoFactorAuth/Manager.php
index 2585646c998..072ffc4f86f 100644
--- a/lib/private/Authentication/TwoFactorAuth/Manager.php
+++ b/lib/private/Authentication/TwoFactorAuth/Manager.php
@@ -192,7 +192,7 @@ class Manager {
if (!empty($missing)) {
// There was at least one provider missing
- $this->logger->alert(count($missing) . " two-factor auth providers failed to load", ['app' => 'core']);
+ $this->logger->alert(count($missing) . ' two-factor auth providers failed to load', ['app' => 'core']);
return true;
}
@@ -322,7 +322,7 @@ class Manager {
$tokenId = $token->getId();
$tokensNeeding2FA = $this->config->getUserKeys($user->getUID(), 'login_token_2fa');
- if (!\in_array((string) $tokenId, $tokensNeeding2FA, true)) {
+ if (!\in_array((string)$tokenId, $tokensNeeding2FA, true)) {
$this->session->set(self::SESSION_UID_DONE, $user->getUID());
return false;
}
@@ -359,7 +359,7 @@ class Manager {
$id = $this->session->getId();
$token = $this->tokenProvider->getToken($id);
- $this->config->setUserValue($user->getUID(), 'login_token_2fa', (string) $token->getId(), (string)$this->timeFactory->getTime());
+ $this->config->setUserValue($user->getUID(), 'login_token_2fa', (string)$token->getId(), (string)$this->timeFactory->getTime());
}
public function clearTwoFactorPending(string $userId) {
diff --git a/lib/private/Avatar/Avatar.php b/lib/private/Avatar/Avatar.php
index 1ad70001f13..bf29d57b88d 100644
--- a/lib/private/Avatar/Avatar.php
+++ b/lib/private/Avatar/Avatar.php
@@ -88,8 +88,8 @@ abstract class Avatar implements IAvatar {
$userDisplayName = $this->getDisplayName();
$fgRGB = $this->avatarBackgroundColor($userDisplayName);
$bgRGB = $fgRGB->alphaBlending(0.1, $darkTheme ? new Color(0, 0, 0) : new Color(255, 255, 255));
- $fill = sprintf("%02x%02x%02x", $bgRGB->red(), $bgRGB->green(), $bgRGB->blue());
- $fgFill = sprintf("%02x%02x%02x", $fgRGB->red(), $fgRGB->green(), $fgRGB->blue());
+ $fill = sprintf('%02x%02x%02x', $bgRGB->red(), $bgRGB->green(), $bgRGB->blue());
+ $fgFill = sprintf('%02x%02x%02x', $fgRGB->red(), $fgRGB->green(), $fgRGB->blue());
$text = $this->getAvatarText();
$toReplace = ['{size}', '{fill}', '{fgFill}', '{letter}'];
return str_replace($toReplace, [$size, $fill, $fgFill, $text], $this->svgTemplate);
@@ -104,7 +104,7 @@ abstract class Avatar implements IAvatar {
}
$formats = Imagick::queryFormats();
// Avatar generation breaks if RSVG format is enabled. Fall back to gd in that case
- if (in_array("RSVG", $formats, true)) {
+ if (in_array('RSVG', $formats, true)) {
return null;
}
try {
diff --git a/lib/private/Avatar/AvatarManager.php b/lib/private/Avatar/AvatarManager.php
index f8ce4d5b656..60a3d358bf4 100644
--- a/lib/private/Avatar/AvatarManager.php
+++ b/lib/private/Avatar/AvatarManager.php
@@ -115,7 +115,7 @@ class AvatarManager implements IAvatarManager {
$folder->delete();
} catch (NotFoundException $e) {
$this->logger->debug("No cache for the user $userId. Ignoring avatar deletion");
- } catch (NotPermittedException | StorageNotAvailableException $e) {
+ } catch (NotPermittedException|StorageNotAvailableException $e) {
$this->logger->error("Unable to delete user avatars for $userId. gnoring avatar deletion");
} catch (NoUserException $e) {
$this->logger->debug("Account $userId not found. Ignoring avatar deletion");
diff --git a/lib/private/BackgroundJob/JobList.php b/lib/private/BackgroundJob/JobList.php
index b09124281ea..77fa418cab8 100644
--- a/lib/private/BackgroundJob/JobList.php
+++ b/lib/private/BackgroundJob/JobList.php
@@ -144,7 +144,7 @@ class JobList implements IJobList {
$row = $result->fetch();
$result->closeCursor();
- return (bool) $row;
+ return (bool)$row;
}
public function getJobs($job, ?int $limit, int $offset): array {
@@ -323,8 +323,8 @@ class JobList implements IJobList {
// This most likely means an invalid job was enqueued. We can ignore it.
return null;
}
- $job->setId((int) $row['id']);
- $job->setLastRun((int) $row['last_run']);
+ $job->setId((int)$row['id']);
+ $job->setLastRun((int)$row['last_run']);
$job->setArgument(json_decode($row['argument'], true));
return $job;
} catch (AutoloadNotAllowedException $e) {
diff --git a/lib/private/Blurhash/Listener/GenerateBlurhashMetadata.php b/lib/private/Blurhash/Listener/GenerateBlurhashMetadata.php
index bb5bc3cadb2..1d0a502df6d 100644
--- a/lib/private/Blurhash/Listener/GenerateBlurhashMetadata.php
+++ b/lib/private/Blurhash/Listener/GenerateBlurhashMetadata.php
@@ -70,7 +70,7 @@ class GenerateBlurhashMetadata implements IEventListener {
}
$metadata->setString('blurhash', $this->generateBlurHash($image))
- ->setEtag('blurhash', $currentEtag);
+ ->setEtag('blurhash', $currentEtag);
}
/**
diff --git a/lib/private/Calendar/Manager.php b/lib/private/Calendar/Manager.php
index aa1eeba9517..fa324273f5c 100644
--- a/lib/private/Calendar/Manager.php
+++ b/lib/private/Calendar/Manager.php
@@ -53,7 +53,7 @@ class Manager implements 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/private/Calendar/ResourcesRoomsUpdater.php b/lib/private/Calendar/ResourcesRoomsUpdater.php
index ae2a2f3a650..eacdaf0aeb4 100644
--- a/lib/private/Calendar/ResourcesRoomsUpdater.php
+++ b/lib/private/Calendar/ResourcesRoomsUpdater.php
@@ -406,7 +406,7 @@ class ResourcesRoomsUpdater {
->andWhere($query->expr()->eq('resource_id', $query->createNamedParameter($resourceId)));
$result = $query->executeQuery();
- $id = (int) $result->fetchOne();
+ $id = (int)$result->fetchOne();
$result->closeCursor();
return $id;
}
diff --git a/lib/private/Collaboration/AutoComplete/Manager.php b/lib/private/Collaboration/AutoComplete/Manager.php
index d7298d9deef..382b9188535 100644
--- a/lib/private/Collaboration/AutoComplete/Manager.php
+++ b/lib/private/Collaboration/AutoComplete/Manager.php
@@ -13,7 +13,7 @@ class Manager implements IManager {
/** @var string[] */
protected array $sorters = [];
- /** @var ISorter[] */
+ /** @var ISorter[] */
protected array $sorterInstances = [];
public function __construct(
diff --git a/lib/private/Collaboration/Collaborators/UserPlugin.php b/lib/private/Collaboration/Collaborators/UserPlugin.php
index b4cb77ad5b8..d196abae042 100644
--- a/lib/private/Collaboration/Collaborators/UserPlugin.php
+++ b/lib/private/Collaboration/Collaborators/UserPlugin.php
@@ -73,7 +73,7 @@ class UserPlugin implements ISearchPlugin {
foreach ($currentUserGroups as $userGroupId) {
$usersInGroup = $this->groupManager->displayNamesInGroup($userGroupId, $search, $limit, $offset);
foreach ($usersInGroup as $userId => $displayName) {
- $userId = (string) $userId;
+ $userId = (string)$userId;
$user = $this->userManager->get($userId);
if (!$user->isEnabled()) {
// Ignore disabled users
@@ -130,7 +130,7 @@ class UserPlugin implements ISearchPlugin {
foreach ($users as $uid => $user) {
$userDisplayName = $user->getDisplayName();
$userEmail = $user->getSystemEMailAddress();
- $uid = (string) $uid;
+ $uid = (string)$uid;
$status = [];
if (array_key_exists($uid, $userStatuses)) {
diff --git a/lib/private/Collaboration/Reference/ReferenceManager.php b/lib/private/Collaboration/Reference/ReferenceManager.php
index 5a1b39d9dff..9287b66b2a2 100644
--- a/lib/private/Collaboration/Reference/ReferenceManager.php
+++ b/lib/private/Collaboration/Reference/ReferenceManager.php
@@ -231,7 +231,7 @@ class ReferenceManager implements IReferenceManager {
}
$configKey = 'provider-last-use_' . $providerId;
- $this->config->setUserValue($userId, 'references', $configKey, (string) $timestamp);
+ $this->config->setUserValue($userId, 'references', $configKey, (string)$timestamp);
return true;
}
return false;
@@ -254,7 +254,7 @@ class ReferenceManager implements IReferenceManager {
$timestamps = [];
foreach ($keys as $key) {
$providerId = substr($key, strlen($prefix));
- $timestamp = (int) $this->config->getUserValue($userId, 'references', $key);
+ $timestamp = (int)$this->config->getUserValue($userId, 'references', $key);
$timestamps[$providerId] = $timestamp;
}
return $timestamps;
diff --git a/lib/private/Collaboration/Resources/Manager.php b/lib/private/Collaboration/Resources/Manager.php
index 6c9b77d41c5..8d1e4b13287 100644
--- a/lib/private/Collaboration/Resources/Manager.php
+++ b/lib/private/Collaboration/Resources/Manager.php
@@ -53,7 +53,7 @@ class Manager implements IManager {
throw new CollectionException('Collection not found');
}
- return new Collection($this, $this->connection, (int) $row['id'], (string) $row['name']);
+ return new Collection($this, $this->connection, (int)$row['id'], (string)$row['name']);
}
/**
@@ -82,12 +82,12 @@ class Manager implements IManager {
throw new CollectionException('Collection not found');
}
- $access = $row['access'] === null ? null : (bool) $row['access'];
+ $access = $row['access'] === null ? null : (bool)$row['access'];
if ($user instanceof IUser) {
- return new Collection($this, $this->connection, (int) $row['id'], (string) $row['name'], $user, $access);
+ return new Collection($this, $this->connection, (int)$row['id'], (string)$row['name'], $user, $access);
}
- return new Collection($this, $this->connection, (int) $row['id'], (string) $row['name'], $user, $access);
+ return new Collection($this, $this->connection, (int)$row['id'], (string)$row['name'], $user, $access);
}
/**
@@ -122,7 +122,7 @@ class Manager implements IManager {
$foundResults = 0;
while ($row = $result->fetch()) {
$foundResults++;
- $access = $row['access'] === null ? null : (bool) $row['access'];
+ $access = $row['access'] === null ? null : (bool)$row['access'];
$collection = new Collection($this, $this->connection, (int)$row['id'], (string)$row['name'], $user, $access);
if ($collection->canAccess($user)) {
$collections[] = $collection;
@@ -186,7 +186,7 @@ class Manager implements IManager {
throw new ResourceException('Resource not found');
}
- $access = $row['access'] === null ? null : (bool) $row['access'];
+ $access = $row['access'] === null ? null : (bool)$row['access'];
if ($user instanceof IUser) {
return new Resource($this, $this->connection, $type, $id, $user, $access);
}
@@ -217,7 +217,7 @@ class Manager implements IManager {
$resources = [];
$result = $query->execute();
while ($row = $result->fetch()) {
- $access = $row['access'] === null ? null : (bool) $row['access'];
+ $access = $row['access'] === null ? null : (bool)$row['access'];
$resources[] = new Resource($this, $this->connection, $row['resource_type'], $row['resource_id'], $user, $access);
}
$result->closeCursor();
@@ -311,7 +311,7 @@ class Manager implements IManager {
$hasAccess = null;
$result = $query->execute();
if ($row = $result->fetch()) {
- $hasAccess = (bool) $row['access'];
+ $hasAccess = (bool)$row['access'];
}
$result->closeCursor();
@@ -331,7 +331,7 @@ class Manager implements IManager {
$hasAccess = null;
$result = $query->execute();
if ($row = $result->fetch()) {
- $hasAccess = (bool) $row['access'];
+ $hasAccess = (bool)$row['access'];
}
$result->closeCursor();
diff --git a/lib/private/Collaboration/Resources/Resource.php b/lib/private/Collaboration/Resources/Resource.php
index ae011e319de..34f68aeee11 100644
--- a/lib/private/Collaboration/Resources/Resource.php
+++ b/lib/private/Collaboration/Resources/Resource.php
@@ -104,7 +104,7 @@ class Resource implements IResource {
$result = $query->execute();
while ($row = $result->fetch()) {
- $collections[] = $this->manager->getCollection((int) $row['collection_id']);
+ $collections[] = $this->manager->getCollection((int)$row['collection_id']);
}
$result->closeCursor();
diff --git a/lib/private/Comments/Comment.php b/lib/private/Comments/Comment.php
index 422e29c084d..3c44c02fe2e 100644
--- a/lib/private/Comments/Comment.php
+++ b/lib/private/Comments/Comment.php
@@ -34,8 +34,8 @@ class Comment implements IComment {
/**
* Comment constructor.
*
- * @param array $data optional, array with keys according to column names from
- * the comments database scheme
+ * @param array $data optional, array with keys according to column names from
+ * the comments database scheme
*/
public function __construct(?array $data = null) {
if (is_array($data)) {
diff --git a/lib/private/Comments/Manager.php b/lib/private/Comments/Manager.php
index 21ff5322f23..9237c884691 100644
--- a/lib/private/Comments/Manager.php
+++ b/lib/private/Comments/Manager.php
@@ -33,10 +33,10 @@ class Manager implements ICommentsManager {
/** @var IComment[] */
protected array $commentsCache = [];
- /** @var \Closure[] */
+ /** @var \Closure[] */
protected array $eventHandlerClosures = [];
- /** @var ICommentsEventHandler[] */
+ /** @var ICommentsEventHandler[] */
protected array $eventHandlers = [];
/** @var \Closure[] */
@@ -308,10 +308,10 @@ class Manager implements 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 $notOlderThan optional, timestamp of the oldest comments
- * that may be returned
+ * that may be returned
* @return list<IComment>
* @since 9.0.0
*/
@@ -362,7 +362,7 @@ class Manager implements 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>
*/
@@ -392,7 +392,7 @@ class Manager implements 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>
*/
@@ -608,7 +608,7 @@ class Manager implements ICommentsManager {
* @param $objectType string the object type, e.g. 'files'
* @param $objectId string the id of the object
* @param \DateTime $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
@@ -675,7 +675,7 @@ class Manager implements ICommentsManager {
$result = $query->executeQuery();
while ($row = $result->fetch()) {
- $unreadComments[$row['object_id']] = (int) $row['num_comments'];
+ $unreadComments[$row['object_id']] = (int)$row['num_comments'];
}
$result->closeCursor();
}
@@ -723,7 +723,7 @@ class Manager implements ICommentsManager {
$data = $result->fetch();
$result->closeCursor();
- return (int) ($data['num_messages'] ?? 0);
+ return (int)($data['num_messages'] ?? 0);
}
/**
@@ -751,7 +751,7 @@ class Manager implements ICommentsManager {
$data = $result->fetch();
$result->closeCursor();
- return (int) ($data['id'] ?? 0);
+ return (int)($data['id'] ?? 0);
}
/**
@@ -808,9 +808,9 @@ class Manager implements ICommentsManager {
return [];
}
$children = $directory->getDirectoryListing();
- $ids = array_map(fn (FileInfo $child) => (string) $child->getId(), $children);
+ $ids = array_map(fn (FileInfo $child) => (string)$child->getId(), $children);
- $ids[] = (string) $directory->getId();
+ $ids[] = (string)$directory->getId();
$counts = $this->getNumberOfUnreadCommentsForObjects('files', $ids, $user);
return array_filter($counts, function (int $count) {
return $count > 0;
@@ -1079,7 +1079,7 @@ class Manager implements ICommentsManager {
$result = $this->update($comment);
}
- if ($result && !!$comment->getParentId()) {
+ if ($result && (bool)$comment->getParentId()) {
$this->updateChildrenInformation(
$comment->getParentId(),
$comment->getCreationDateTime()
@@ -1141,7 +1141,7 @@ class Manager implements ICommentsManager {
->andWhere($qb->expr()->eq('actor_id', $qb->createNamedParameter($reaction->getActorId())))
->andWhere($qb->expr()->eq('reaction', $qb->createNamedParameter($reaction->getMessage())));
$result = $qb->executeQuery();
- $exists = (int) $result->fetchOne();
+ $exists = (int)$result->fetchOne();
if (!$exists) {
$qb = $this->dbConn->getQueryBuilder();
try {
diff --git a/lib/private/Config.php b/lib/private/Config.php
index ee30b8efc5e..6a970eafd7e 100644
--- a/lib/private/Config.php
+++ b/lib/private/Config.php
@@ -268,7 +268,7 @@ class Config {
$df = disk_free_space($this->configDir);
$size = strlen($content) + 10240;
if ($df !== false && $df < (float)$size) {
- throw new \Exception($this->configDir . " does not have enough space for writing the config file! Not writing it back!");
+ throw new \Exception($this->configDir . ' does not have enough space for writing the config file! Not writing it back!');
}
}
diff --git a/lib/private/Console/Application.php b/lib/private/Console/Application.php
index 14baa528940..16ed8894386 100644
--- a/lib/private/Console/Application.php
+++ b/lib/private/Console/Application.php
@@ -94,7 +94,7 @@ class Application {
try {
$this->loadCommandsFromInfoXml($info['commands']);
} catch (\Throwable $e) {
- $output->writeln("<error>" . $e->getMessage() . "</error>");
+ $output->writeln('<error>' . $e->getMessage() . '</error>');
$this->logger->error($e->getMessage(), [
'exception' => $e,
]);
@@ -116,13 +116,13 @@ class Application {
}
} elseif ($input->getArgument('command') !== '_completion' && $input->getArgument('command') !== 'maintenance:install') {
$errorOutput = $output->getErrorOutput();
- $errorOutput->writeln("Nextcloud is not installed - only a limited number of commands are available");
+ $errorOutput->writeln('Nextcloud is not installed - only a limited number of commands are available');
}
} catch (NeedsUpdateException $e) {
if ($input->getArgument('command') !== '_completion') {
$errorOutput = $output->getErrorOutput();
- $errorOutput->writeln("Nextcloud or one of the apps require upgrade - only a limited number of commands are available");
- $errorOutput->writeln("You may use your browser or the occ upgrade command to do the upgrade");
+ $errorOutput->writeln('Nextcloud or one of the apps require upgrade - only a limited number of commands are available');
+ $errorOutput->writeln('You may use your browser or the occ upgrade command to do the upgrade');
}
}
@@ -134,7 +134,7 @@ class Application {
$output->writeln((string)$error['hint']);
$output->writeln('');
}
- throw new \Exception("Environment not properly prepared.");
+ throw new \Exception('Environment not properly prepared.');
}
}
}
@@ -145,7 +145,7 @@ class Application {
*
* @param InputInterface $input The input implementation for reading inputs.
* @param ConsoleOutputInterface $output The output implementation
- * for writing outputs.
+ * for writing outputs.
* @return void
*/
private function writeMaintenanceModeInfo(InputInterface $input, ConsoleOutputInterface $output): void {
diff --git a/lib/private/Console/TimestampFormatter.php b/lib/private/Console/TimestampFormatter.php
index de0675cc5df..da1b7ba48dd 100644
--- a/lib/private/Console/TimestampFormatter.php
+++ b/lib/private/Console/TimestampFormatter.php
@@ -81,7 +81,7 @@ class TimestampFormatter implements OutputFormatterInterface {
*
* @param string|null $message The message to style
* @return string|null The styled message, prepended with a timestamp using the
- * log timezone and dateformat, e.g. "2015-06-23T17:24:37+02:00"
+ * log timezone and dateformat, e.g. "2015-06-23T17:24:37+02:00"
*/
public function format(?string $message): ?string {
if (!$this->formatter->isDecorated()) {
diff --git a/lib/private/Contacts/ContactsMenu/ContactsStore.php b/lib/private/Contacts/ContactsMenu/ContactsStore.php
index d7cdb5efebf..d15e6e35706 100644
--- a/lib/private/Contacts/ContactsMenu/ContactsStore.php
+++ b/lib/private/Contacts/ContactsMenu/ContactsStore.php
@@ -348,7 +348,7 @@ class ContactsStore implements IContactsStore {
$entry->setFullName($contact['FN']);
}
- $avatarPrefix = "VALUE=uri:";
+ $avatarPrefix = 'VALUE=uri:';
if (!empty($contact['PHOTO']) && str_starts_with($contact['PHOTO'], $avatarPrefix)) {
$entry->setAvatar(substr($contact['PHOTO'], strlen($avatarPrefix)));
}
diff --git a/lib/private/ContactsManager.php b/lib/private/ContactsManager.php
index f67cb196eef..7dd2bf33124 100644
--- a/lib/private/ContactsManager.php
+++ b/lib/private/ContactsManager.php
@@ -19,14 +19,14 @@ class ContactsManager implements 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
*/
diff --git a/lib/private/DB/Adapter.php b/lib/private/DB/Adapter.php
index b5be14e5dc6..ccbda897bb3 100644
--- a/lib/private/DB/Adapter.php
+++ b/lib/private/DB/Adapter.php
@@ -32,7 +32,7 @@ class Adapter {
* @throws Exception
*/
public function lastInsertId($table) {
- return (int) $this->conn->realLastInsertId($table);
+ return (int)$this->conn->realLastInsertId($table);
}
/**
@@ -73,8 +73,8 @@ class Adapter {
* @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
* @deprecated 15.0.0 - use unique index and "try { $db->insert() } catch (UniqueConstraintViolationException $e) {}" instead, because it is more reliable and does not have the risk for deadlocks - see https://github.com/nextcloud/server/pull/12371
diff --git a/lib/private/DB/AdapterSqlite.php b/lib/private/DB/AdapterSqlite.php
index 24274cbcda6..0023ee15364 100644
--- a/lib/private/DB/AdapterSqlite.php
+++ b/lib/private/DB/AdapterSqlite.php
@@ -38,8 +38,8 @@ class AdapterSqlite extends Adapter {
* @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 \Doctrine\DBAL\Exception
* @deprecated 15.0.0 - use unique index and "try { $db->insert() } catch (UniqueConstraintViolationException $e) {}" instead, because it is more reliable and does not have the risk for deadlocks - see https://github.com/nextcloud/server/pull/12371
diff --git a/lib/private/DB/Connection.php b/lib/private/DB/Connection.php
index 3cdd5fd06c0..ac594a5ed0d 100644
--- a/lib/private/DB/Connection.php
+++ b/lib/private/DB/Connection.php
@@ -239,10 +239,10 @@ class Connection extends PrimaryReadReplicaConnection {
if ($limit === -1 || $limit === null) {
$limit = null;
} else {
- $limit = (int) $limit;
+ $limit = (int)$limit;
}
if ($offset !== null) {
- $offset = (int) $offset;
+ $offset = (int)$offset;
}
if (!is_null($limit)) {
$platform = $this->getDatabasePlatform();
@@ -259,10 +259,10 @@ class Connection extends PrimaryReadReplicaConnection {
* If the query is parametrized, a prepared statement is used.
* If an SQLLogger is configured, the execution is logged.
*
- * @param string $sql The SQL query to execute.
- * @param array $params The parameters to bind to the query, if any.
- * @param array $types The types the previous parameters are in.
- * @param \Doctrine\DBAL\Cache\QueryCacheProfile|null $qcp The query cache profile, optional.
+ * @param string $sql The SQL query to execute.
+ * @param array $params The parameters to bind to the query, if any.
+ * @param array $types The types the previous parameters are in.
+ * @param \Doctrine\DBAL\Cache\QueryCacheProfile|null $qcp The query cache profile, optional.
*
* @return Result The executed statement.
*
@@ -291,7 +291,7 @@ class Connection extends PrimaryReadReplicaConnection {
// Read to a table that has been written to previously
// While this might not necessarily mean that we did a read after write it is an indication for a code path to check
$this->logger->log(
- (int) ($this->systemConfig->getValue('loglevel_dirty_database_queries', null) ?? 0),
+ (int)($this->systemConfig->getValue('loglevel_dirty_database_queries', null) ?? 0),
'dirty table reads: ' . $sql,
[
'tables' => array_keys($this->tableDirtyWrites),
@@ -339,9 +339,9 @@ class Connection extends PrimaryReadReplicaConnection {
*
* This method supports PDO binding types as well as DBAL mapping types.
*
- * @param string $sql The SQL query.
- * @param array $params The query parameters.
- * @param array $types The parameter types.
+ * @param string $sql The SQL query.
+ * @param array $params The query parameters.
+ * @param array $types The parameter types.
*
* @return int The number of affected rows.
*
@@ -426,8 +426,8 @@ class Connection extends PrimaryReadReplicaConnection {
* @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 \Doctrine\DBAL\Exception
* @deprecated 15.0.0 - use unique index and "try { $db->insert() } catch (UniqueConstraintViolationException $e) {}" instead, because it is more reliable and does not have the risk for deadlocks - see https://github.com/nextcloud/server/pull/12371
@@ -609,7 +609,7 @@ class Connection extends PrimaryReadReplicaConnection {
$statement = $this->replaceTablePrefix($statement);
$statement = $this->adapter->fixupStatement($statement);
if ($this->logRequestId) {
- return $statement . " /* reqid: " . $this->requestId . " */";
+ return $statement . ' /* reqid: ' . $this->requestId . ' */';
} else {
return $statement;
}
diff --git a/lib/private/DB/ConnectionFactory.php b/lib/private/DB/ConnectionFactory.php
index dd041f1e41d..af182243787 100644
--- a/lib/private/DB/ConnectionFactory.php
+++ b/lib/private/DB/ConnectionFactory.php
@@ -124,7 +124,7 @@ class ConnectionFactory {
if ($host === '') {
$connectionParams['dbname'] = $dbName; // use dbname as easy connect name
} else {
- $connectionParams['dbname'] = '//' . $host . (!empty($port) ? ":{$port}" : "") . '/' . $dbName;
+ $connectionParams['dbname'] = '//' . $host . (!empty($port) ? ":{$port}" : '') . '/' . $dbName;
}
unset($connectionParams['host']);
break;
@@ -180,7 +180,7 @@ class ConnectionFactory {
$name = $this->config->getValue($configPrefix . 'dbname', $this->config->getValue('dbname', self::DEFAULT_DBNAME));
if ($this->normalizeType($type) === 'sqlite3') {
- $dataDir = $this->config->getValue("datadirectory", \OC::$SERVERROOT . '/data');
+ $dataDir = $this->config->getValue('datadirectory', \OC::$SERVERROOT . '/data');
$connectionParams['path'] = $dataDir . '/' . $name . '.db';
} else {
$host = $this->config->getValue($configPrefix . 'dbhost', $this->config->getValue('dbhost', ''));
@@ -237,7 +237,7 @@ class ConnectionFactory {
// Host variable carries a port or socket.
$params['host'] = $matches[1];
if (is_numeric($matches[2])) {
- $params['port'] = (int) $matches[2];
+ $params['port'] = (int)$matches[2];
} else {
$params['unix_socket'] = $matches[2];
}
diff --git a/lib/private/DB/MigrationService.php b/lib/private/DB/MigrationService.php
index 0a3b0d1dcc7..68f31fff3fc 100644
--- a/lib/private/DB/MigrationService.php
+++ b/lib/private/DB/MigrationService.php
@@ -220,7 +220,7 @@ class MigrationService {
foreach ($files as $file) {
$className = basename($file, '.php');
- $version = (string) substr($className, 7);
+ $version = (string)substr($className, 7);
if ($version === '0') {
throw new \InvalidArgumentException(
"Cannot load a migrations with the name '$version' because it is a reserved number"
diff --git a/lib/private/DB/PreparedStatement.php b/lib/private/DB/PreparedStatement.php
index 5fdfa2b03e8..54561ed96cd 100644
--- a/lib/private/DB/PreparedStatement.php
+++ b/lib/private/DB/PreparedStatement.php
@@ -78,6 +78,6 @@ class PreparedStatement implements IPreparedStatement {
return $this->result;
}
- throw new Exception("You have to execute the prepared statement before accessing the results");
+ throw new Exception('You have to execute the prepared statement before accessing the results');
}
}
diff --git a/lib/private/DB/QueryBuilder/ExpressionBuilder/ExpressionBuilder.php b/lib/private/DB/QueryBuilder/ExpressionBuilder/ExpressionBuilder.php
index b70e20e4d0d..b922c861630 100644
--- a/lib/private/DB/QueryBuilder/ExpressionBuilder/ExpressionBuilder.php
+++ b/lib/private/DB/QueryBuilder/ExpressionBuilder/ExpressionBuilder.php
@@ -57,7 +57,7 @@ class ExpressionBuilder implements 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
*/
@@ -78,7 +78,7 @@ class ExpressionBuilder implements 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
*/
@@ -96,7 +96,7 @@ class ExpressionBuilder implements 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
*/
@@ -119,7 +119,7 @@ class ExpressionBuilder implements 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
*/
@@ -141,7 +141,7 @@ class ExpressionBuilder implements 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
*/
@@ -163,7 +163,7 @@ class ExpressionBuilder implements 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
*/
@@ -185,7 +185,7 @@ class ExpressionBuilder implements 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
*/
@@ -207,7 +207,7 @@ class ExpressionBuilder implements 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
*/
@@ -229,7 +229,7 @@ class ExpressionBuilder implements 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
*/
@@ -269,7 +269,7 @@ class ExpressionBuilder implements 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
*/
@@ -285,7 +285,7 @@ class ExpressionBuilder implements 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
@@ -300,7 +300,7 @@ class ExpressionBuilder implements 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
*/
@@ -316,7 +316,7 @@ class ExpressionBuilder implements 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
*/
@@ -332,7 +332,7 @@ class ExpressionBuilder implements 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
*/
diff --git a/lib/private/DB/QueryBuilder/Literal.php b/lib/private/DB/QueryBuilder/Literal.php
index f0accce1d93..3fb897328e5 100644
--- a/lib/private/DB/QueryBuilder/Literal.php
+++ b/lib/private/DB/QueryBuilder/Literal.php
@@ -18,6 +18,6 @@ class Literal implements ILiteral {
}
public function __toString(): string {
- return (string) $this->literal;
+ return (string)$this->literal;
}
}
diff --git a/lib/private/DB/QueryBuilder/Parameter.php b/lib/private/DB/QueryBuilder/Parameter.php
index dbd723639fc..a272c744d62 100644
--- a/lib/private/DB/QueryBuilder/Parameter.php
+++ b/lib/private/DB/QueryBuilder/Parameter.php
@@ -18,6 +18,6 @@ class Parameter implements IParameter {
}
public function __toString(): string {
- return (string) $this->name;
+ return (string)$this->name;
}
}
diff --git a/lib/private/DB/QueryBuilder/QueryBuilder.php b/lib/private/DB/QueryBuilder/QueryBuilder.php
index b5ee37e3ddf..98280d610b1 100644
--- a/lib/private/DB/QueryBuilder/QueryBuilder.php
+++ b/lib/private/DB/QueryBuilder/QueryBuilder.php
@@ -68,11 +68,11 @@ class QueryBuilder implements 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) {
- $this->automaticTablePrefix = (bool) $enabled;
+ $this->automaticTablePrefix = (bool)$enabled;
}
/**
@@ -405,7 +405,7 @@ class QueryBuilder implements IQueryBuilder {
* @return $this This QueryBuilder instance.
*/
public function setFirstResult($firstResult) {
- $this->queryBuilder->setFirstResult((int) $firstResult);
+ $this->queryBuilder->setFirstResult((int)$firstResult);
return $this;
}
@@ -435,7 +435,7 @@ class QueryBuilder implements IQueryBuilder {
if ($maxResults === null) {
$this->queryBuilder->setMaxResults($maxResults);
} else {
- $this->queryBuilder->setMaxResults((int) $maxResults);
+ $this->queryBuilder->setMaxResults((int)$maxResults);
}
return $this;
@@ -978,7 +978,7 @@ class QueryBuilder implements IQueryBuilder {
public function setValue($column, $value) {
$this->queryBuilder->setValue(
$this->helper->quoteColumnName($column),
- (string) $value
+ (string)$value
);
return $this;
@@ -1287,7 +1287,7 @@ class QueryBuilder implements IQueryBuilder {
*/
public function getTableName($table) {
if ($table instanceof IQueryFunction) {
- return (string) $table;
+ return (string)$table;
}
$table = $this->prefixTableName($table);
diff --git a/lib/private/DB/QueryBuilder/QueryFunction.php b/lib/private/DB/QueryBuilder/QueryFunction.php
index 9cdd6c31c7b..7f2ab584a73 100644
--- a/lib/private/DB/QueryBuilder/QueryFunction.php
+++ b/lib/private/DB/QueryBuilder/QueryFunction.php
@@ -18,6 +18,6 @@ class QueryFunction implements IQueryFunction {
}
public function __toString(): string {
- return (string) $this->function;
+ return (string)$this->function;
}
}
diff --git a/lib/private/DB/QueryBuilder/QuoteHelper.php b/lib/private/DB/QueryBuilder/QuoteHelper.php
index a60a9731aa2..7ce4b359638 100644
--- a/lib/private/DB/QueryBuilder/QuoteHelper.php
+++ b/lib/private/DB/QueryBuilder/QuoteHelper.php
@@ -35,7 +35,7 @@ class QuoteHelper {
*/
public function quoteColumnName($string) {
if ($string instanceof IParameter || $string instanceof ILiteral || $string instanceof IQueryFunction) {
- return (string) $string;
+ return (string)$string;
}
if ($string === null || $string === 'null' || $string === '*') {
diff --git a/lib/private/DateTimeFormatter.php b/lib/private/DateTimeFormatter.php
index cd765a2a14b..2882a7d8cd7 100644
--- a/lib/private/DateTimeFormatter.php
+++ b/lib/private/DateTimeFormatter.php
@@ -28,8 +28,8 @@ class DateTimeFormatter implements \OCP\IDateTimeFormatter {
/**
* Get TimeZone to use
*
- * @param \DateTimeZone $timeZone The timezone to use
- * @return \DateTimeZone The timezone to use, falling back to the current user's timezone
+ * @param \DateTimeZone $timeZone The timezone to use
+ * @return \DateTimeZone The timezone to use, falling back to the current user's timezone
*/
protected function getTimeZone($timeZone = null) {
if ($timeZone === null) {
@@ -42,8 +42,8 @@ class DateTimeFormatter implements \OCP\IDateTimeFormatter {
/**
* Get \OCP\IL10N to use
*
- * @param \OCP\IL10N $l The locale to use
- * @return \OCP\IL10N The locale to use, falling back to the current user's locale
+ * @param \OCP\IL10N $l The locale to use
+ * @return \OCP\IL10N The locale to use, falling back to the current user's locale
*/
protected function getLocale($l = null) {
if ($l === null) {
@@ -57,7 +57,7 @@ class DateTimeFormatter implements \OCP\IDateTimeFormatter {
* Generates a DateTime object with the given timestamp and TimeZone
*
* @param mixed $timestamp
- * @param \DateTimeZone $timeZone The timezone to use
+ * @param \DateTimeZone $timeZone The timezone to use
* @return \DateTime
*/
protected function getDateTime($timestamp, ?\DateTimeZone $timeZone = null) {
@@ -77,15 +77,15 @@ class DateTimeFormatter implements \OCP\IDateTimeFormatter {
/**
* Formats the date of the given timestamp
*
- * @param int|\DateTime $timestamp Either a Unix timestamp or DateTime object
- * @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 $timeZone The timezone to use
- * @param \OCP\IL10N $l The locale to use
+ * @param int|\DateTime $timestamp Either a Unix timestamp or DateTime object
+ * @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 $timeZone The timezone to use
+ * @param \OCP\IL10N $l The locale to use
* @return string Formatted date string
*/
public function formatDate($timestamp, $format = 'long', ?\DateTimeZone $timeZone = null, ?\OCP\IL10N $l = null) {
@@ -95,16 +95,16 @@ class DateTimeFormatter implements \OCP\IDateTimeFormatter {
/**
* Formats the date of the given timestamp
*
- * @param int|\DateTime $timestamp Either a Unix timestamp or DateTime object
- * @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 $timeZone The timezone to use
- * @param \OCP\IL10N $l The locale to use
+ * @param int|\DateTime $timestamp Either a Unix timestamp or DateTime object
+ * @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 $timeZone The timezone to use
+ * @param \OCP\IL10N $l The locale to use
* @return string Formatted relative date string
*/
public function formatDateRelativeDay($timestamp, $format = 'long', ?\DateTimeZone $timeZone = null, ?\OCP\IL10N $l = null) {
@@ -119,13 +119,13 @@ class DateTimeFormatter implements \OCP\IDateTimeFormatter {
* Gives the relative date of the timestamp
* Only works for past dates
*
- * @param int|\DateTime $timestamp Either a Unix timestamp or DateTime object
- * @param int|\DateTime $baseTimestamp Timestamp to compare $timestamp against, defaults to current time
- * @param \OCP\IL10N $l The locale to use
+ * @param int|\DateTime $timestamp Either a Unix timestamp or DateTime object
+ * @param int|\DateTime $baseTimestamp Timestamp to compare $timestamp against, defaults to current time
+ * @param \OCP\IL10N $l The locale to use
* @return string Formatted date span. Dates returned are:
- * < 1 month => Today, Yesterday, n days ago
- * < 13 month => last month, n months ago
- * >= 13 month => last year, n years ago
+ * < 1 month => Today, Yesterday, n days ago
+ * < 13 month => last month, n months ago
+ * >= 13 month => last year, n years ago
*/
public function formatDateSpan($timestamp, $baseTimestamp = null, ?\OCP\IL10N $l = null) {
$l = $this->getLocale($l);
@@ -182,15 +182,15 @@ class DateTimeFormatter implements \OCP\IDateTimeFormatter {
/**
* Formats the time of the given timestamp
*
- * @param int|\DateTime $timestamp Either a Unix timestamp or DateTime object
- * @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 $timeZone The timezone to use
- * @param \OCP\IL10N $l The locale to use
+ * @param int|\DateTime $timestamp Either a Unix timestamp or DateTime object
+ * @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 $timeZone The timezone to use
+ * @param \OCP\IL10N $l The locale to use
* @return string Formatted time string
*/
public function formatTime($timestamp, $format = 'medium', ?\DateTimeZone $timeZone = null, ?\OCP\IL10N $l = null) {
@@ -200,16 +200,16 @@ class DateTimeFormatter implements \OCP\IDateTimeFormatter {
/**
* Gives the relative past time of the timestamp
*
- * @param int|\DateTime $timestamp Either a Unix timestamp or DateTime object
- * @param int|\DateTime $baseTimestamp Timestamp to compare $timestamp against, defaults to current time
- * @param \OCP\IL10N $l The locale to use
+ * @param int|\DateTime $timestamp Either a Unix timestamp or DateTime object
+ * @param int|\DateTime $baseTimestamp Timestamp to compare $timestamp against, defaults to current time
+ * @param \OCP\IL10N $l The locale to use
* @return string Formatted time span. 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
+ * < 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
*/
public function formatTimeSpan($timestamp, $baseTimestamp = null, ?\OCP\IL10N $l = null) {
$l = $this->getLocale($l);
@@ -247,11 +247,11 @@ class DateTimeFormatter implements \OCP\IDateTimeFormatter {
/**
* Formats the date and time of the given timestamp
*
- * @param int|\DateTime $timestamp Either a Unix timestamp or DateTime object
- * @param string $formatDate See formatDate() for description
- * @param string $formatTime See formatTime() for description
- * @param \DateTimeZone $timeZone The timezone to use
- * @param \OCP\IL10N $l The locale to use
+ * @param int|\DateTime $timestamp Either a Unix timestamp or DateTime object
+ * @param string $formatDate See formatDate() for description
+ * @param string $formatTime See formatTime() for description
+ * @param \DateTimeZone $timeZone The timezone to use
+ * @param \OCP\IL10N $l The locale to use
* @return string Formatted date and time string
*/
public function formatDateTime($timestamp, $formatDate = 'long', $formatTime = 'medium', ?\DateTimeZone $timeZone = null, ?\OCP\IL10N $l = null) {
@@ -261,12 +261,12 @@ class DateTimeFormatter implements \OCP\IDateTimeFormatter {
/**
* Formats the date and time of the given timestamp
*
- * @param int|\DateTime $timestamp Either a Unix timestamp or DateTime object
- * @param string $formatDate See formatDate() for description
- * Uses 'Today', 'Yesterday' and 'Tomorrow' when applicable
- * @param string $formatTime See formatTime() for description
- * @param \DateTimeZone $timeZone The timezone to use
- * @param \OCP\IL10N $l The locale to use
+ * @param int|\DateTime $timestamp Either a Unix timestamp or DateTime object
+ * @param string $formatDate See formatDate() for description
+ * Uses 'Today', 'Yesterday' and 'Tomorrow' when applicable
+ * @param string $formatTime See formatTime() for description
+ * @param \DateTimeZone $timeZone The timezone to use
+ * @param \OCP\IL10N $l The locale to use
* @return string Formatted relative date and time string
*/
public function formatDateTimeRelativeDay($timestamp, $formatDate = 'long', $formatTime = 'medium', ?\DateTimeZone $timeZone = null, ?\OCP\IL10N $l = null) {
@@ -280,11 +280,11 @@ class DateTimeFormatter implements \OCP\IDateTimeFormatter {
/**
* Formats the date and time of the given timestamp
*
- * @param int|\DateTime $timestamp Either a Unix timestamp or DateTime object
- * @param string $type One of 'date', 'datetime' or 'time'
- * @param string $format Format string
- * @param \DateTimeZone $timeZone The timezone to use
- * @param \OCP\IL10N $l The locale to use
+ * @param int|\DateTime $timestamp Either a Unix timestamp or DateTime object
+ * @param string $type One of 'date', 'datetime' or 'time'
+ * @param string $format Format string
+ * @param \DateTimeZone $timeZone The timezone to use
+ * @param \OCP\IL10N $l The locale to use
* @return string Formatted date and time string
*/
protected function format($timestamp, $type, $format, ?\DateTimeZone $timeZone = null, ?\OCP\IL10N $l = null) {
diff --git a/lib/private/DirectEditing/Token.php b/lib/private/DirectEditing/Token.php
index 594cef98086..12ad9411216 100644
--- a/lib/private/DirectEditing/Token.php
+++ b/lib/private/DirectEditing/Token.php
@@ -42,7 +42,7 @@ class Token implements IToken {
}
public function hasBeenAccessed(): bool {
- return (bool) $this->data['accessed'];
+ return (bool)$this->data['accessed'];
}
public function getEditor(): string {
diff --git a/lib/private/Encryption/DecryptAll.php b/lib/private/Encryption/DecryptAll.php
index f9a92d07d20..0007467298c 100644
--- a/lib/private/Encryption/DecryptAll.php
+++ b/lib/private/Encryption/DecryptAll.php
@@ -17,13 +17,13 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class DecryptAll {
- /** @var OutputInterface */
+ /** @var OutputInterface */
protected $output;
- /** @var InputInterface */
+ /** @var InputInterface */
protected $input;
- /** @var array files which couldn't be decrypted */
+ /** @var array files which couldn't be decrypted */
protected $failed;
public function __construct(
@@ -114,7 +114,7 @@ class DecryptAll {
$fetchUsersProgress = new ProgressBar($this->output);
$fetchUsersProgress->setFormat(" %message% \n [%bar%]");
$fetchUsersProgress->start();
- $fetchUsersProgress->setMessage("Fetch list of users...");
+ $fetchUsersProgress->setMessage('Fetch list of users...');
$fetchUsersProgress->advance();
foreach ($this->userManager->getBackends() as $backend) {
@@ -128,7 +128,7 @@ class DecryptAll {
$offset += $limit;
$fetchUsersProgress->advance();
} while (count($users) >= $limit);
- $fetchUsersProgress->setMessage("Fetch list of users... finished");
+ $fetchUsersProgress->setMessage('Fetch list of users... finished');
$fetchUsersProgress->finish();
}
} else {
@@ -140,7 +140,7 @@ class DecryptAll {
$progress = new ProgressBar($this->output);
$progress->setFormat(" %message% \n [%bar%]");
$progress->start();
- $progress->setMessage("starting to decrypt files...");
+ $progress->setMessage('starting to decrypt files...');
$progress->advance();
$numberOfUsers = count($userList);
@@ -151,7 +151,7 @@ class DecryptAll {
$userNo++;
}
- $progress->setMessage("starting to decrypt files... finished");
+ $progress->setMessage('starting to decrypt files... finished');
$progress->finish();
$this->output->writeln("\n\n");
diff --git a/lib/private/Encryption/EncryptionWrapper.php b/lib/private/Encryption/EncryptionWrapper.php
index d3bf0aeb4d8..aec93a3ce4d 100644
--- a/lib/private/Encryption/EncryptionWrapper.php
+++ b/lib/private/Encryption/EncryptionWrapper.php
@@ -26,10 +26,10 @@ use Psr\Log\LoggerInterface;
* @package OC\Encryption
*/
class EncryptionWrapper {
- /** @var ArrayCache */
+ /** @var ArrayCache */
private $arrayCache;
- /** @var Manager */
+ /** @var Manager */
private $manager;
private LoggerInterface $logger;
diff --git a/lib/private/Encryption/File.php b/lib/private/Encryption/File.php
index a29d62946c4..26e643d1006 100644
--- a/lib/private/Encryption/File.php
+++ b/lib/private/Encryption/File.php
@@ -92,7 +92,7 @@ class File implements \OCP\Encryption\IFile {
}
// check if it is a group mount
- if ($this->getAppManager()->isEnabledForUser("files_external")) {
+ if ($this->getAppManager()->isEnabledForUser('files_external')) {
/** @var GlobalStoragesService $storageService */
$storageService = \OC::$server->get(GlobalStoragesService::class);
$storages = $storageService->getAllStorages();
diff --git a/lib/private/Encryption/HookManager.php b/lib/private/Encryption/HookManager.php
index 5ce51229e4e..39e7edabb95 100644
--- a/lib/private/Encryption/HookManager.php
+++ b/lib/private/Encryption/HookManager.php
@@ -42,7 +42,7 @@ class HookManager {
$user = \OC::$server->getUserManager()->get($owner);
}
if (!$user) {
- throw new \Exception("Inconsistent data, File unshared, but owner not found. Should not happen");
+ throw new \Exception('Inconsistent data, File unshared, but owner not found. Should not happen');
}
$uid = '';
diff --git a/lib/private/EventSource.php b/lib/private/EventSource.php
index dbeda25049e..18af6e35832 100644
--- a/lib/private/EventSource.php
+++ b/lib/private/EventSource.php
@@ -45,10 +45,10 @@ class EventSource implements IEventSource {
* @link https://github.com/owncloud/core/issues/14286
*/
header("Content-Security-Policy: default-src 'none'; script-src 'unsafe-inline'");
- header("Content-Type: text/html");
+ header('Content-Type: text/html');
echo str_repeat('<span></span>' . PHP_EOL, 10); //dummy data to keep IE happy
} else {
- header("Content-Type: text/event-stream");
+ header('Content-Type: text/event-stream');
}
if (!$this->request->passesStrictCookieCheck()) {
header('Location: '.\OC::$WEBROOT);
@@ -69,7 +69,7 @@ class EventSource implements IEventSource {
* @param mixed $data
*
* @throws \BadMethodCallException
- * if only one parameter is given, a typeless message will be send with that parameter as data
+ * if only one parameter is given, a typeless message will be send with that parameter as data
* @suppress PhanDeprecatedFunction
*/
public function send($type, $data = null) {
diff --git a/lib/private/Federation/CloudIdManager.php b/lib/private/Federation/CloudIdManager.php
index 3528d06a167..69d48a148b3 100644
--- a/lib/private/Federation/CloudIdManager.php
+++ b/lib/private/Federation/CloudIdManager.php
@@ -59,7 +59,7 @@ class CloudIdManager implements ICloudIdManager {
if ($event instanceof CardUpdatedEvent) {
$data = $event->getCardData()['carddata'];
foreach (explode("\r\n", $data) as $line) {
- if (str_starts_with($line, "CLOUD;")) {
+ if (str_starts_with($line, 'CLOUD;')) {
$parts = explode(':', $line, 2);
if (isset($parts[1])) {
$key = $parts[1];
diff --git a/lib/private/Files/Cache/Cache.php b/lib/private/Files/Cache/Cache.php
index a4290549dd9..4b2ca13b3d7 100644
--- a/lib/private/Files/Cache/Cache.php
+++ b/lib/private/Files/Cache/Cache.php
@@ -839,7 +839,7 @@ class Cache implements 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
*/
public function searchByMime($mimetype) {
@@ -1133,7 +1133,7 @@ class Cache implements ICache {
*/
public function copyFromCache(ICache $sourceCache, ICacheEntry $sourceEntry, string $targetPath): int {
if ($sourceEntry->getId() < 0) {
- throw new \RuntimeException("Invalid source cache entry on copyFromCache");
+ throw new \RuntimeException('Invalid source cache entry on copyFromCache');
}
$data = $this->cacheEntryToArray($sourceEntry);
@@ -1144,7 +1144,7 @@ class Cache implements ICache {
$fileId = $this->put($targetPath, $data);
if ($fileId <= 0) {
- throw new \RuntimeException("Failed to copy to " . $targetPath . " from cache with source data " . json_encode($data) . " ");
+ throw new \RuntimeException('Failed to copy to ' . $targetPath . ' from cache with source data ' . json_encode($data) . ' ');
}
if ($sourceEntry->getMimeType() === ICacheEntry::DIRECTORY_MIMETYPE) {
$folderContent = $sourceCache->getFolderContentsById($sourceEntry->getId());
diff --git a/lib/private/Files/Cache/FailedCache.php b/lib/private/Files/Cache/FailedCache.php
index 8ba2ac491bf..44c1016ca8e 100644
--- a/lib/private/Files/Cache/FailedCache.php
+++ b/lib/private/Files/Cache/FailedCache.php
@@ -125,7 +125,7 @@ class FailedCache implements ICache {
}
public function copyFromCache(ICache $sourceCache, ICacheEntry $sourceEntry, string $targetPath): int {
- throw new \Exception("Invalid cache");
+ throw new \Exception('Invalid cache');
}
public function getQueryFilterForStorage(): ISearchOperator {
diff --git a/lib/private/Files/Cache/QuerySearchHelper.php b/lib/private/Files/Cache/QuerySearchHelper.php
index 0b164912301..82f9ec3be66 100644
--- a/lib/private/Files/Cache/QuerySearchHelper.php
+++ b/lib/private/Files/Cache/QuerySearchHelper.php
@@ -194,7 +194,7 @@ class QuerySearchHelper {
protected function requireUser(ISearchQuery $searchQuery): IUser {
$user = $searchQuery->getUser();
if ($user === null) {
- throw new \InvalidArgumentException("This search operation requires the user to be set in the query");
+ throw new \InvalidArgumentException('This search operation requires the user to be set in the query');
}
return $user;
}
diff --git a/lib/private/Files/Cache/Storage.php b/lib/private/Files/Cache/Storage.php
index 0929907fcff..8d99a268dc0 100644
--- a/lib/private/Files/Cache/Storage.php
+++ b/lib/private/Files/Cache/Storage.php
@@ -80,7 +80,7 @@ class Storage {
* Adjusts the storage id to use md5 if too long
* @param string $storageId storage id
* @return string unchanged $storageId if its length is less than 64 characters,
- * else returns the md5 of $storageId
+ * else returns the md5 of $storageId
*/
public static function adjustStorageId($storageId) {
if (strlen($storageId) > 64) {
diff --git a/lib/private/Files/Cache/Updater.php b/lib/private/Files/Cache/Updater.php
index e8c6d32599e..eab68b4f545 100644
--- a/lib/private/Files/Cache/Updater.php
+++ b/lib/private/Files/Cache/Updater.php
@@ -114,7 +114,7 @@ class Updater implements IUpdater {
}
// encryption is a pita and touches the cache itself
- if (isset($data['encrypted']) && !!$data['encrypted']) {
+ if (isset($data['encrypted']) && (bool)$data['encrypted']) {
$sizeDifference = null;
}
@@ -246,7 +246,7 @@ class Updater implements IUpdater {
// ignore the failure.
// with failures concurrent updates, someone else would have already done it.
// in the worst case the `storage_mtime` isn't updated, which should at most only trigger an extra rescan
- $this->logger->warning("Error while updating parent storage_mtime, should be safe to ignore", ['exception' => $e]);
+ $this->logger->warning('Error while updating parent storage_mtime, should be safe to ignore', ['exception' => $e]);
}
}
}
diff --git a/lib/private/Files/Config/MountProviderCollection.php b/lib/private/Files/Config/MountProviderCollection.php
index 0e103690b6b..1dbc469c8c3 100644
--- a/lib/private/Files/Config/MountProviderCollection.php
+++ b/lib/private/Files/Config/MountProviderCollection.php
@@ -131,9 +131,9 @@ class MountProviderCollection implements IMountProviderCollection, Emitter {
}
$lateMounts = $this->filterMounts($user, $lateMounts);
- $this->eventLogger->start("fs:setup:add-mounts", "Add mounts to the filesystem");
+ $this->eventLogger->start('fs:setup:add-mounts', 'Add mounts to the filesystem');
array_walk($lateMounts, [$mountManager, 'addMount']);
- $this->eventLogger->end("fs:setup:add-mounts");
+ $this->eventLogger->end('fs:setup:add-mounts');
return array_merge($lateMounts, $firstMounts);
}
@@ -223,7 +223,7 @@ class MountProviderCollection implements IMountProviderCollection, Emitter {
}, []);
if (count($mounts) === 0) {
- throw new \Exception("No root mounts provided by any provider");
+ throw new \Exception('No root mounts provided by any provider');
}
return $mounts;
diff --git a/lib/private/Files/Config/UserMountCache.php b/lib/private/Files/Config/UserMountCache.php
index 67b2cad7ea2..94da770b63f 100644
--- a/lib/private/Files/Config/UserMountCache.php
+++ b/lib/private/Files/Config/UserMountCache.php
@@ -477,7 +477,7 @@ class UserMountCache implements IUserMountCache {
}
}
- throw new NotFoundException("No cached mount for path " . $path);
+ throw new NotFoundException('No cached mount for path ' . $path);
}
public function getMountsInPath(IUser $user, string $path): array {
diff --git a/lib/private/Files/FileInfo.php b/lib/private/Files/FileInfo.php
index c3dcb531342..c47b8b1d1a7 100644
--- a/lib/private/Files/FileInfo.php
+++ b/lib/private/Files/FileInfo.php
@@ -134,7 +134,7 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess {
* @return int|null
*/
public function getId() {
- return isset($this->data['fileid']) ? (int) $this->data['fileid'] : null;
+ return isset($this->data['fileid']) ? (int)$this->data['fileid'] : null;
}
/**
@@ -196,7 +196,7 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess {
*/
public function getMTime() {
$this->updateEntryfromSubMounts();
- return (int) $this->data['mtime'];
+ return (int)$this->data['mtime'];
}
/**
@@ -210,14 +210,14 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess {
* Return the current version used for the HMAC in the encryption app
*/
public function getEncryptedVersion(): int {
- return isset($this->data['encryptedVersion']) ? (int) $this->data['encryptedVersion'] : 1;
+ return isset($this->data['encryptedVersion']) ? (int)$this->data['encryptedVersion'] : 1;
}
/**
* @return int
*/
public function getPermissions() {
- return (int) $this->data['permissions'];
+ return (int)$this->data['permissions'];
}
/**
@@ -379,11 +379,11 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess {
}
public function getCreationTime(): int {
- return (int) $this->data['creation_time'];
+ return (int)$this->data['creation_time'];
}
public function getUploadTime(): int {
- return (int) $this->data['upload_time'];
+ return (int)$this->data['upload_time'];
}
public function getParentId(): int {
diff --git a/lib/private/Files/Filesystem.php b/lib/private/Files/Filesystem.php
index db7420c3c4c..48c069de0b9 100644
--- a/lib/private/Files/Filesystem.php
+++ b/lib/private/Files/Filesystem.php
@@ -674,7 +674,7 @@ class Filesystem {
*
* @param string $path
* @param bool|string $includeMountPoints whether to add mountpoint sizes,
- * defaults to true
+ * defaults to true
* @return \OC\Files\FileInfo|false False if file does not exist
*/
public static function getFileInfo($path, $includeMountPoints = true) {
diff --git a/lib/private/Files/Mount/Manager.php b/lib/private/Files/Mount/Manager.php
index c2267af3c96..d118021afa2 100644
--- a/lib/private/Files/Mount/Manager.php
+++ b/lib/private/Files/Mount/Manager.php
@@ -84,7 +84,7 @@ class Manager implements IMountManager {
if (count($this->mounts) === 0) {
$this->setupManager->setupRoot();
if (count($this->mounts) === 0) {
- throw new \Exception("No mounts even after explicitly setting up the root mounts");
+ throw new \Exception('No mounts even after explicitly setting up the root mounts');
}
}
@@ -104,7 +104,7 @@ class Manager implements IMountManager {
}
}
- throw new NotFoundException("No mount for path " . $path . " existing mounts (" . count($this->mounts) ."): " . implode(",", array_keys($this->mounts)));
+ throw new NotFoundException('No mount for path ' . $path . ' existing mounts (' . count($this->mounts) .'): ' . implode(',', array_keys($this->mounts)));
}
/**
diff --git a/lib/private/Files/Mount/RootMountProvider.php b/lib/private/Files/Mount/RootMountProvider.php
index 7ad7a7f059c..86f8188978f 100644
--- a/lib/private/Files/Mount/RootMountProvider.php
+++ b/lib/private/Files/Mount/RootMountProvider.php
@@ -56,7 +56,7 @@ class RootMountProvider implements IRootMountProvider {
}
private function getLocalRootMount(IStorageFactory $loader): MountPoint {
- $configDataDirectory = $this->config->getSystemValue("datadirectory", OC::$SERVERROOT . "/data");
+ $configDataDirectory = $this->config->getSystemValue('datadirectory', OC::$SERVERROOT . '/data');
return new MountPoint(LocalRootStorage::class, '/', ['datadir' => $configDataDirectory], $loader, null, null, self::class);
}
diff --git a/lib/private/Files/Node/Folder.php b/lib/private/Files/Node/Folder.php
index 9936487abb3..ca256b09d33 100644
--- a/lib/private/Files/Node/Folder.php
+++ b/lib/private/Files/Node/Folder.php
@@ -422,7 +422,7 @@ class Folder extends Node implements \OCP\Files\Folder {
$filterNonRecentFiles = new SearchComparison(
ISearchComparison::COMPARE_GREATER_THAN,
'mtime',
- strtotime("-2 week")
+ strtotime('-2 week')
);
if ($offset === 0 && $limit <= 100) {
$query = new SearchQuery(
diff --git a/lib/private/Files/Node/LazyUserFolder.php b/lib/private/Files/Node/LazyUserFolder.php
index f9908b9b7b6..77479c2fa5e 100644
--- a/lib/private/Files/Node/LazyUserFolder.php
+++ b/lib/private/Files/Node/LazyUserFolder.php
@@ -59,7 +59,7 @@ class LazyUserFolder extends LazyFolder {
}
$mountPoint = $this->mountManager->find('/' . $this->user->getUID());
if (is_null($mountPoint)) {
- throw new \Exception("No mountpoint for user folder");
+ throw new \Exception('No mountpoint for user folder');
}
return $mountPoint;
}
diff --git a/lib/private/Files/Node/Node.php b/lib/private/Files/Node/Node.php
index e7f533e73a9..b49a04e6f62 100644
--- a/lib/private/Files/Node/Node.php
+++ b/lib/private/Files/Node/Node.php
@@ -158,7 +158,7 @@ class Node implements INode {
public function getStorage() {
$storage = $this->getMountPoint()->getStorage();
if (!$storage) {
- throw new \Exception("No storage for node");
+ throw new \Exception('No storage for node');
}
return $storage;
}
diff --git a/lib/private/Files/Node/Root.php b/lib/private/Files/Node/Root.php
index 5fb4013cfc9..416adc7f374 100644
--- a/lib/private/Files/Node/Root.php
+++ b/lib/private/Files/Node/Root.php
@@ -459,7 +459,7 @@ class Root extends Folder implements IRootFolder {
if ($folder instanceof Folder) {
return $folder->getByIdInRootMount($id);
} else {
- throw new \Exception("getByIdInPath with non folder");
+ throw new \Exception('getByIdInPath with non folder');
}
}
return [];
diff --git a/lib/private/Files/ObjectStore/Azure.php b/lib/private/Files/ObjectStore/Azure.php
index 55400d4131c..2dacdac1f8d 100644
--- a/lib/private/Files/ObjectStore/Azure.php
+++ b/lib/private/Files/ObjectStore/Azure.php
@@ -21,7 +21,7 @@ class Azure implements IObjectStore {
private $blobClient = null;
/** @var string|null */
private $endpoint = null;
- /** @var bool */
+ /** @var bool */
private $autoCreate = false;
/**
@@ -45,7 +45,7 @@ class Azure implements IObjectStore {
private function getBlobClient() {
if (!$this->blobClient) {
$protocol = $this->endpoint ? substr($this->endpoint, 0, strpos($this->endpoint, ':')) : 'https';
- $connectionString = "DefaultEndpointsProtocol=" . $protocol . ";AccountName=" . $this->accountName . ";AccountKey=" . $this->accountKey;
+ $connectionString = 'DefaultEndpointsProtocol=' . $protocol . ';AccountName=' . $this->accountName . ';AccountKey=' . $this->accountKey;
if ($this->endpoint) {
$connectionString .= ';BlobEndpoint=' . $this->endpoint;
}
diff --git a/lib/private/Files/ObjectStore/ObjectStoreStorage.php b/lib/private/Files/ObjectStore/ObjectStoreStorage.php
index 389f744eab4..310b65ac939 100644
--- a/lib/private/Files/ObjectStore/ObjectStoreStorage.php
+++ b/lib/private/Files/ObjectStore/ObjectStoreStorage.php
@@ -632,7 +632,7 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common implements IChunkedFil
$sourceUrn = $this->getURN($sourceEntry->getId());
if (!$cache instanceof Cache) {
- throw new \Exception("Invalid source cache for object store copy");
+ throw new \Exception('Invalid source cache for object store copy');
}
$targetId = $cache->copyFromCache($cache, $sourceEntry, $to);
diff --git a/lib/private/Files/ObjectStore/S3ConnectionTrait.php b/lib/private/Files/ObjectStore/S3ConnectionTrait.php
index 0506eb35353..9de85f00620 100644
--- a/lib/private/Files/ObjectStore/S3ConnectionTrait.php
+++ b/lib/private/Files/ObjectStore/S3ConnectionTrait.php
@@ -28,7 +28,7 @@ trait S3ConnectionTrait {
protected function parseParams($params) {
if (empty($params['bucket'])) {
- throw new \Exception("Bucket has to be configured.");
+ throw new \Exception('Bucket has to be configured.');
}
$this->id = 'amazon::' . $params['bucket'];
@@ -132,7 +132,7 @@ trait S3ConnectionTrait {
try {
$logger->info('Bucket "' . $this->bucket . '" does not exist - creating it.', ['app' => 'objectstore']);
if (!$this->connection::isBucketDnsCompatible($this->bucket)) {
- throw new \Exception("The bucket will not be created because the name is not dns compatible, please correct it: " . $this->bucket);
+ throw new \Exception('The bucket will not be created because the name is not dns compatible, please correct it: ' . $this->bucket);
}
$this->connection->createBucket(['Bucket' => $this->bucket]);
$this->testTimeout();
@@ -197,7 +197,7 @@ trait S3ConnectionTrait {
}
protected function getCertificateBundlePath(): ?string {
- if ((int)($this->params['use_nextcloud_bundle'] ?? "0")) {
+ if ((int)($this->params['use_nextcloud_bundle'] ?? '0')) {
// since we store the certificate bundles on the primary storage, we can't get the bundle while setting up the primary storage
if (!isset($this->params['primary_storage'])) {
/** @var ICertificateManager $certManager */
diff --git a/lib/private/Files/ObjectStore/S3ObjectTrait.php b/lib/private/Files/ObjectStore/S3ObjectTrait.php
index 5d00c184ca7..2e625033751 100644
--- a/lib/private/Files/ObjectStore/S3ObjectTrait.php
+++ b/lib/private/Files/ObjectStore/S3ObjectTrait.php
@@ -127,7 +127,7 @@ trait S3ObjectTrait {
if ($e->getState()->isInitiated() && (array_key_exists('UploadId', $uploadInfo))) {
$this->getConnection()->abortMultipartUpload($uploadInfo);
}
- throw new \OCA\DAV\Connector\Sabre\Exception\BadGateway("Error while uploading to S3 bucket", 0, $e);
+ throw new \OCA\DAV\Connector\Sabre\Exception\BadGateway('Error while uploading to S3 bucket', 0, $e);
}
}
@@ -144,7 +144,7 @@ trait S3ObjectTrait {
// ($psrStream->isSeekable() && $psrStream->getSize() !== null) evaluates to true for a On-Seekable stream
// so the optimisation does not apply
- $buffer = new Psr7\Stream(fopen("php://memory", 'rwb+'));
+ $buffer = new Psr7\Stream(fopen('php://memory', 'rwb+'));
Utils::copyToStream($psrStream, $buffer, $this->putSizeLimit);
$buffer->seek(0);
if ($buffer->getSize() < $this->putSizeLimit) {
@@ -183,14 +183,14 @@ trait S3ObjectTrait {
if ($this->useMultipartCopy && $size > $this->copySizeLimit) {
$copy = new MultipartCopy($this->getConnection(), [
- "source_bucket" => $this->getBucket(),
- "source_key" => $from
+ 'source_bucket' => $this->getBucket(),
+ 'source_key' => $from
], array_merge([
- "bucket" => $this->getBucket(),
- "key" => $to,
- "acl" => "private",
- "params" => $this->getSSECParameters() + $this->getSSECParameters(true),
- "source_metadata" => $sourceMetadata
+ 'bucket' => $this->getBucket(),
+ 'key' => $to,
+ 'acl' => 'private',
+ 'params' => $this->getSSECParameters() + $this->getSSECParameters(true),
+ 'source_metadata' => $sourceMetadata
], $options));
$copy->copy();
} else {
diff --git a/lib/private/Files/ObjectStore/S3Signature.php b/lib/private/Files/ObjectStore/S3Signature.php
index e3a522b6581..4e9784ee81a 100644
--- a/lib/private/Files/ObjectStore/S3Signature.php
+++ b/lib/private/Files/ObjectStore/S3Signature.php
@@ -99,7 +99,7 @@ class S3Signature implements SignatureInterface {
}
/**
- * @param RequestInterface $request
+ * @param RequestInterface $request
* @param CredentialsInterface $creds
*
* @return RequestInterface
diff --git a/lib/private/Files/ObjectStore/SwiftFactory.php b/lib/private/Files/ObjectStore/SwiftFactory.php
index 0db5c9762d2..a2e22e45de2 100644
--- a/lib/private/Files/ObjectStore/SwiftFactory.php
+++ b/lib/private/Files/ObjectStore/SwiftFactory.php
@@ -170,7 +170,7 @@ class SwiftFactory {
try {
/** @var \OpenStack\Identity\v2\Models\Token $token */
$token = $authService->model(\OpenStack\Identity\v2\Models\Token::class, $cachedToken['token']);
- $now = new \DateTimeImmutable("now");
+ $now = new \DateTimeImmutable('now');
if ($token->expires > $now) {
$hasValidCachedToken = true;
$this->params['v2cachedToken'] = $token;
diff --git a/lib/private/Files/Search/SearchQuery.php b/lib/private/Files/Search/SearchQuery.php
index e7cb031da3e..3c8711facd8 100644
--- a/lib/private/Files/Search/SearchQuery.php
+++ b/lib/private/Files/Search/SearchQuery.php
@@ -11,13 +11,13 @@ use OCP\Files\Search\ISearchQuery;
use OCP\IUser;
class SearchQuery implements ISearchQuery {
- /** @var ISearchOperator */
+ /** @var ISearchOperator */
private $searchOperation;
- /** @var integer */
+ /** @var integer */
private $limit;
- /** @var integer */
+ /** @var integer */
private $offset;
- /** @var ISearchOrder[] */
+ /** @var ISearchOrder[] */
private $order;
/** @var ?IUser */
private $user;
diff --git a/lib/private/Files/SetupManager.php b/lib/private/Files/SetupManager.php
index 3a3f7ba9c11..e74dd1042d6 100644
--- a/lib/private/Files/SetupManager.php
+++ b/lib/private/Files/SetupManager.php
@@ -382,7 +382,7 @@ class SetupManager {
}
// for the user's home folder, and includes children we need everything always
- if (rtrim($path) === "/" . $user->getUID() . "/files" && $includeChildren) {
+ if (rtrim($path) === '/' . $user->getUID() . '/files' && $includeChildren) {
$this->setupForUser($user);
return;
}
@@ -412,7 +412,7 @@ class SetupManager {
$setupProviders[] = $cachedMount->getMountProvider();
$mounts = $this->mountProviderCollection->getUserMountsForProviderClasses($user, [$cachedMount->getMountProvider()]);
} else {
- $this->logger->debug("mount at " . $cachedMount->getMountPoint() . " has no provider set, performing full setup");
+ $this->logger->debug('mount at ' . $cachedMount->getMountPoint() . ' has no provider set, performing full setup');
$this->eventLogger->end('fs:setup:user:path:find');
$this->setupForUser($user);
$this->eventLogger->end('fs:setup:user:path');
@@ -429,7 +429,7 @@ class SetupManager {
}, false);
if ($needsFullSetup) {
- $this->logger->debug("mount has no provider set, performing full setup");
+ $this->logger->debug('mount has no provider set, performing full setup');
$this->setupForUser($user);
$this->eventLogger->end('fs:setup:user:path');
return;
@@ -491,7 +491,7 @@ class SetupManager {
return;
}
- $this->eventLogger->start('fs:setup:user:providers', "Setup filesystem for " . implode(', ', $providers));
+ $this->eventLogger->start('fs:setup:user:providers', 'Setup filesystem for ' . implode(', ', $providers));
$this->oneTimeUserSetup($user);
diff --git a/lib/private/Files/Storage/Common.php b/lib/private/Files/Storage/Common.php
index 823ff65474b..77e5b95fc20 100644
--- a/lib/private/Files/Storage/Common.php
+++ b/lib/private/Files/Storage/Common.php
@@ -159,7 +159,7 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage {
}
public function file_get_contents($path) {
- $handle = $this->fopen($path, "r");
+ $handle = $this->fopen($path, 'r');
if (!$handle) {
return false;
}
@@ -169,7 +169,7 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage {
}
public function file_put_contents($path, $data) {
- $handle = $this->fopen($path, "w");
+ $handle = $this->fopen($path, 'w');
if (!$handle) {
return false;
}
@@ -430,11 +430,11 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage {
if ($this->stat('')) {
return true;
}
- \OC::$server->get(LoggerInterface::class)->info("External storage not available: stat() failed");
+ \OC::$server->get(LoggerInterface::class)->info('External storage not available: stat() failed');
return false;
} catch (\Exception $e) {
\OC::$server->get(LoggerInterface::class)->warning(
- "External storage not available: " . $e->getMessage(),
+ 'External storage not available: ' . $e->getMessage(),
['exception' => $e]
);
return false;
@@ -816,7 +816,7 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage {
try {
[$count, $result] = \OC_Helper::streamCopy($stream, $target);
if (!$result) {
- throw new GenericFileException("Failed to copy stream");
+ throw new GenericFileException('Failed to copy stream');
}
} finally {
fclose($target);
diff --git a/lib/private/Files/Storage/DAV.php b/lib/private/Files/Storage/DAV.php
index 63ef1399a69..7abc0ccc182 100644
--- a/lib/private/Files/Storage/DAV.php
+++ b/lib/private/Files/Storage/DAV.php
@@ -90,9 +90,9 @@ class DAV extends Common {
if (isset($params['host']) && isset($params['user']) && isset($params['password'])) {
$host = $params['host'];
//remove leading http[s], will be generated in createBaseUri()
- if (str_starts_with($host, "https://")) {
+ if (str_starts_with($host, 'https://')) {
$host = substr($host, 8);
- } elseif (str_starts_with($host, "http://")) {
+ } elseif (str_starts_with($host, 'http://')) {
$host = substr($host, 7);
}
$this->host = $host;
@@ -162,13 +162,13 @@ class DAV extends Common {
$lastRequestStart = 0;
$this->client->on('beforeRequest', function (RequestInterface $request) use (&$lastRequestStart) {
- $this->logger->debug("sending dav " . $request->getMethod() . " request to external storage: " . $request->getAbsoluteUrl(), ['app' => 'dav']);
+ $this->logger->debug('sending dav ' . $request->getMethod() . ' request to external storage: ' . $request->getAbsoluteUrl(), ['app' => 'dav']);
$lastRequestStart = microtime(true);
- $this->eventLogger->start('fs:storage:dav:request', "Sending dav request to external storage");
+ $this->eventLogger->start('fs:storage:dav:request', 'Sending dav request to external storage');
});
$this->client->on('afterRequest', function (RequestInterface $request) use (&$lastRequestStart) {
$elapsed = microtime(true) - $lastRequestStart;
- $this->logger->debug("dav " . $request->getMethod() . " request to external storage: " . $request->getAbsoluteUrl() . " took " . round($elapsed * 1000, 1) . "ms", ['app' => 'dav']);
+ $this->logger->debug('dav ' . $request->getMethod() . ' request to external storage: ' . $request->getAbsoluteUrl() . ' took ' . round($elapsed * 1000, 1) . 'ms', ['app' => 'dav']);
$this->eventLogger->end('fs:storage:dav:request');
});
}
@@ -283,11 +283,11 @@ class DAV extends Common {
return false;
}
$responseType = [];
- if (isset($response["{DAV:}resourcetype"])) {
+ if (isset($response['{DAV:}resourcetype'])) {
/** @var ResourceType[] $response */
- $responseType = $response["{DAV:}resourcetype"]->getValue();
+ $responseType = $response['{DAV:}resourcetype']->getValue();
}
- return (count($responseType) > 0 and $responseType[0] == "{DAV:}collection") ? 'dir' : 'file';
+ return (count($responseType) > 0 and $responseType[0] == '{DAV:}collection') ? 'dir' : 'file';
} catch (\Exception $e) {
$this->convertException($e, $path);
}
@@ -582,11 +582,11 @@ class DAV extends Common {
}
$responseType = [];
- if (isset($response["{DAV:}resourcetype"])) {
+ if (isset($response['{DAV:}resourcetype'])) {
/** @var ResourceType[] $response */
- $responseType = $response["{DAV:}resourcetype"]->getValue();
+ $responseType = $response['{DAV:}resourcetype']->getValue();
}
- $type = (count($responseType) > 0 and $responseType[0] == "{DAV:}collection") ? 'dir' : 'file';
+ $type = (count($responseType) > 0 and $responseType[0] == '{DAV:}collection') ? 'dir' : 'file';
if ($type === 'dir') {
$mimeType = 'httpd/unix-directory';
} elseif (isset($response['{DAV:}getcontenttype'])) {
@@ -832,9 +832,9 @@ class DAV extends Common {
* @param string $path optional path from the operation
*
* @throws StorageInvalidException if the storage is invalid, for example
- * when the authentication expired or is invalid
+ * when the authentication expired or is invalid
* @throws StorageNotAvailableException if the storage is not available,
- * which might be temporary
+ * which might be temporary
* @throws ForbiddenException if the action is not allowed
*/
protected function convertException(Exception $e, $path = '') {
diff --git a/lib/private/Files/Storage/Home.php b/lib/private/Files/Storage/Home.php
index 9a336d2efcc..a8d1f82b987 100644
--- a/lib/private/Files/Storage/Home.php
+++ b/lib/private/Files/Storage/Home.php
@@ -28,7 +28,7 @@ class Home extends Local implements \OCP\Files\IHomeStorage {
* Construct a Home storage instance
*
* @param array $arguments array with "user" containing the
- * storage owner
+ * storage owner
*/
public function __construct($arguments) {
$this->user = $arguments['user'];
diff --git a/lib/private/Files/Storage/StorageFactory.php b/lib/private/Files/Storage/StorageFactory.php
index 18fca1d28e3..612592e2d3a 100644
--- a/lib/private/Files/Storage/StorageFactory.php
+++ b/lib/private/Files/Storage/StorageFactory.php
@@ -26,7 +26,7 @@ class StorageFactory implements IStorageFactory {
* @param int $priority wrappers with the lower priority are applied last (meaning they get called first)
* @param \OCP\Files\Mount\IMountPoint[] $existingMounts existing mount points to apply the wrapper to
* @return bool true if the wrapper was added, false if there was already a wrapper with this
- * name registered
+ * name registered
*/
public function addStorageWrapper($wrapperName, $callback, $priority = 50, $existingMounts = []) {
if (isset($this->storageWrappers[$wrapperName])) {
diff --git a/lib/private/Files/Storage/Wrapper/Encryption.php b/lib/private/Files/Storage/Wrapper/Encryption.php
index 09048c239ee..1ead1c342b0 100644
--- a/lib/private/Files/Storage/Wrapper/Encryption.php
+++ b/lib/private/Files/Storage/Wrapper/Encryption.php
@@ -65,7 +65,7 @@ class Encryption extends Wrapper {
/** @var array remember for which path we execute the repair step to avoid recursions */
private $fixUnencryptedSizeOf = [];
- /** @var ArrayCache */
+ /** @var ArrayCache */
private $arrayCache;
/** @var CappedMemoryCache<bool> */
@@ -204,7 +204,7 @@ class Encryption extends Wrapper {
$encryptionModule = $this->getEncryptionModule($path);
if ($encryptionModule) {
- $handle = $this->fopen($path, "r");
+ $handle = $this->fopen($path, 'r');
if (!$handle) {
return false;
}
diff --git a/lib/private/Files/Storage/Wrapper/Quota.php b/lib/private/Files/Storage/Wrapper/Quota.php
index 8c6799fdd2d..b642c438266 100644
--- a/lib/private/Files/Storage/Wrapper/Quota.php
+++ b/lib/private/Files/Storage/Wrapper/Quota.php
@@ -40,7 +40,7 @@ class Quota extends Wrapper {
if ($this->quota === null) {
$quotaCallback = $this->quotaCallback;
if ($quotaCallback === null) {
- throw new \Exception("No quota or quota callback provider");
+ throw new \Exception('No quota or quota callback provider');
}
$this->quota = $quotaCallback();
}
diff --git a/lib/private/Files/Storage/Wrapper/Wrapper.php b/lib/private/Files/Storage/Wrapper/Wrapper.php
index 29acc9ad1c2..f8aa9d963dc 100644
--- a/lib/private/Files/Storage/Wrapper/Wrapper.php
+++ b/lib/private/Files/Storage/Wrapper/Wrapper.php
@@ -40,7 +40,7 @@ class Wrapper implements \OC\Files\Storage\Storage, ILockingStorage, IWriteStrea
*/
public function getWrapperStorage() {
if (!$this->storage) {
- $message = "storage wrapper " . get_class($this) . " doesn't have a wrapped storage set";
+ $message = 'storage wrapper ' . get_class($this) . " doesn't have a wrapped storage set";
$logger = Server::get(LoggerInterface::class);
$logger->error($message);
$this->storage = new FailedStorage(['exception' => new \Exception($message)]);
diff --git a/lib/private/Files/Stream/Encryption.php b/lib/private/Files/Stream/Encryption.php
index 32c0021cd23..8f08f925da0 100644
--- a/lib/private/Files/Stream/Encryption.php
+++ b/lib/private/Files/Stream/Encryption.php
@@ -55,7 +55,7 @@ class Encryption extends Wrapper {
/** @var string */
protected $fullPath;
- /** @var bool */
+ /** @var bool */
protected $signed;
/**
diff --git a/lib/private/Files/Stream/SeekableHttpStream.php b/lib/private/Files/Stream/SeekableHttpStream.php
index 02ed1470fbd..5ed04ed9066 100644
--- a/lib/private/Files/Stream/SeekableHttpStream.php
+++ b/lib/private/Files/Stream/SeekableHttpStream.php
@@ -90,7 +90,7 @@ class SeekableHttpStream implements File {
continue 2;
}
}
- throw new \Exception("Failed to get source stream from stream wrapper of " . get_class($responseHead));
+ throw new \Exception('Failed to get source stream from stream wrapper of ' . get_class($responseHead));
}
$rangeHeaders = array_values(array_filter($responseHead, function ($v) {
diff --git a/lib/private/Files/Type/Loader.php b/lib/private/Files/Type/Loader.php
index 247acf0141a..407df59b2e2 100644
--- a/lib/private/Files/Type/Loader.php
+++ b/lib/private/Files/Type/Loader.php
@@ -115,7 +115,7 @@ class Loader implements IMimeTypeLoader {
throw new \Exception("Database threw an unique constraint on inserting a new mimetype, but couldn't return the ID for this very mimetype");
}
- $mimetypeId = (int) $id;
+ $mimetypeId = (int)$id;
}
$this->mimetypes[$mimetypeId] = $mimetype;
@@ -136,8 +136,8 @@ class Loader implements IMimeTypeLoader {
$result->closeCursor();
foreach ($results as $row) {
- $this->mimetypes[(int) $row['id']] = $row['mimetype'];
- $this->mimetypeIds[$row['mimetype']] = (int) $row['id'];
+ $this->mimetypes[(int)$row['id']] = $row['mimetype'];
+ $this->mimetypeIds[$row['mimetype']] = (int)$row['id'];
}
}
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php
index 0e5e433ccb6..494b4493d2c 100644
--- a/lib/private/Files/View.php
+++ b/lib/private/Files/View.php
@@ -221,7 +221,7 @@ class View {
$relPath = '/' . $pathParts[3];
$this->lockFile($relPath, ILockingProvider::LOCK_SHARED, true);
\OC_Hook::emit(
- Filesystem::CLASSNAME, "umount",
+ Filesystem::CLASSNAME, 'umount',
[Filesystem::signal_param_path => $relPath]
);
$this->changeLock($relPath, ILockingProvider::LOCK_EXCLUSIVE, true);
@@ -229,7 +229,7 @@ class View {
$this->changeLock($relPath, ILockingProvider::LOCK_SHARED, true);
if ($result) {
\OC_Hook::emit(
- Filesystem::CLASSNAME, "post_umount",
+ Filesystem::CLASSNAME, 'post_umount',
[Filesystem::signal_param_path => $relPath]
);
}
@@ -697,7 +697,7 @@ class View {
$absolutePath2 = Filesystem::normalizePath($this->getAbsolutePath($target));
if (str_starts_with($absolutePath2, $absolutePath1 . '/')) {
- throw new ForbiddenException("Moving a folder into a child folder is forbidden", false);
+ throw new ForbiddenException('Moving a folder into a child folder is forbidden', false);
}
$targetParts = explode('/', $absolutePath2);
@@ -1330,7 +1330,7 @@ class View {
*
* @param string $path
* @param bool|string $includeMountPoints true to add mountpoint sizes,
- * 'ext' to add only ext storage mount point sizes. Defaults to true.
+ * 'ext' to add only ext storage mount point sizes. Defaults to true.
* @return \OC\Files\FileInfo|false False if file does not exist
*/
public function getFileInfo($path, $includeMountPoints = true) {
@@ -1889,7 +1889,7 @@ class View {
*
* @param string $absolutePath absolute path
* @param bool $useParentMount true to return parent mount instead of whatever
- * is mounted directly on the given path, false otherwise
+ * is mounted directly on the given path, false otherwise
* @return IMountPoint mount point for which to apply locks
*/
private function getMountForLock(string $absolutePath, bool $useParentMount = false): IMountPoint {
@@ -2103,7 +2103,7 @@ class View {
* @param string $absolutePath absolute path which is under "files"
*
* @return string path relative to "files" with trimmed slashes or null
- * if the path was NOT relative to files
+ * if the path was NOT relative to files
*
* @throws \InvalidArgumentException if the given path was not under "files"
* @since 8.1.0
diff --git a/lib/private/FilesMetadata/Service/IndexRequestService.php b/lib/private/FilesMetadata/Service/IndexRequestService.php
index 32248ff5c24..b50fb378325 100644
--- a/lib/private/FilesMetadata/Service/IndexRequestService.php
+++ b/lib/private/FilesMetadata/Service/IndexRequestService.php
@@ -82,9 +82,9 @@ class IndexRequestService {
private function insertIndexString(int $fileId, string $key, string $value): void {
$qb = $this->dbConnection->getQueryBuilder();
$qb->insert(self::TABLE_METADATA_INDEX)
- ->setValue('meta_key', $qb->createNamedParameter($key))
- ->setValue('meta_value_string', $qb->createNamedParameter($value))
- ->setValue('file_id', $qb->createNamedParameter($fileId, IQueryBuilder::PARAM_INT));
+ ->setValue('meta_key', $qb->createNamedParameter($key))
+ ->setValue('meta_value_string', $qb->createNamedParameter($value))
+ ->setValue('file_id', $qb->createNamedParameter($fileId, IQueryBuilder::PARAM_INT));
$qb->executeStatement();
}
@@ -100,9 +100,9 @@ class IndexRequestService {
public function insertIndexInt(int $fileId, string $key, int $value): void {
$qb = $this->dbConnection->getQueryBuilder();
$qb->insert(self::TABLE_METADATA_INDEX)
- ->setValue('meta_key', $qb->createNamedParameter($key))
- ->setValue('meta_value_int', $qb->createNamedParameter($value, IQueryBuilder::PARAM_INT))
- ->setValue('file_id', $qb->createNamedParameter($fileId, IQueryBuilder::PARAM_INT));
+ ->setValue('meta_key', $qb->createNamedParameter($key))
+ ->setValue('meta_value_int', $qb->createNamedParameter($value, IQueryBuilder::PARAM_INT))
+ ->setValue('file_id', $qb->createNamedParameter($fileId, IQueryBuilder::PARAM_INT));
$qb->executeStatement();
}
@@ -118,9 +118,9 @@ class IndexRequestService {
public function insertIndexBool(int $fileId, string $key, bool $value): void {
$qb = $this->dbConnection->getQueryBuilder();
$qb->insert(self::TABLE_METADATA_INDEX)
- ->setValue('meta_key', $qb->createNamedParameter($key))
- ->setValue('meta_value_int', $qb->createNamedParameter(($value) ? '1' : '0', IQueryBuilder::PARAM_INT))
- ->setValue('file_id', $qb->createNamedParameter($fileId, IQueryBuilder::PARAM_INT));
+ ->setValue('meta_key', $qb->createNamedParameter($key))
+ ->setValue('meta_value_int', $qb->createNamedParameter(($value) ? '1' : '0', IQueryBuilder::PARAM_INT))
+ ->setValue('file_id', $qb->createNamedParameter($fileId, IQueryBuilder::PARAM_INT));
$qb->executeStatement();
}
@@ -167,7 +167,7 @@ class IndexRequestService {
$qb = $this->dbConnection->getQueryBuilder();
$expr = $qb->expr();
$qb->delete(self::TABLE_METADATA_INDEX)
- ->where($expr->eq('file_id', $qb->createNamedParameter($fileId, IQueryBuilder::PARAM_INT)));
+ ->where($expr->eq('file_id', $qb->createNamedParameter($fileId, IQueryBuilder::PARAM_INT)));
if ($key !== '') {
$qb->andWhere($expr->eq('meta_key', $qb->createNamedParameter($key)));
diff --git a/lib/private/FilesMetadata/Service/MetadataRequestService.php b/lib/private/FilesMetadata/Service/MetadataRequestService.php
index 08982a2a659..b58912b0216 100644
--- a/lib/private/FilesMetadata/Service/MetadataRequestService.php
+++ b/lib/private/FilesMetadata/Service/MetadataRequestService.php
@@ -38,10 +38,10 @@ class MetadataRequestService {
public function store(IFilesMetadata $filesMetadata): void {
$qb = $this->dbConnection->getQueryBuilder();
$qb->insert(self::TABLE_METADATA)
- ->setValue('file_id', $qb->createNamedParameter($filesMetadata->getFileId(), IQueryBuilder::PARAM_INT))
- ->setValue('json', $qb->createNamedParameter(json_encode($filesMetadata->jsonSerialize())))
- ->setValue('sync_token', $qb->createNamedParameter($this->generateSyncToken()))
- ->setValue('last_update', (string) $qb->createFunction('NOW()'));
+ ->setValue('file_id', $qb->createNamedParameter($filesMetadata->getFileId(), IQueryBuilder::PARAM_INT))
+ ->setValue('json', $qb->createNamedParameter(json_encode($filesMetadata->jsonSerialize())))
+ ->setValue('sync_token', $qb->createNamedParameter($this->generateSyncToken()))
+ ->setValue('last_update', (string)$qb->createFunction('NOW()'));
$qb->executeStatement();
}
@@ -92,7 +92,7 @@ class MetadataRequestService {
$list = [];
$result = $qb->executeQuery();
while ($data = $result->fetch()) {
- $fileId = (int) $data['file_id'];
+ $fileId = (int)$data['file_id'];
$metadata = new FilesMetadata($fileId);
try {
$metadata->importFromDatabase($data);
@@ -117,7 +117,7 @@ class MetadataRequestService {
public function dropMetadata(int $fileId): void {
$qb = $this->dbConnection->getQueryBuilder();
$qb->delete(self::TABLE_METADATA)
- ->where($qb->expr()->eq('file_id', $qb->createNamedParameter($fileId, IQueryBuilder::PARAM_INT)));
+ ->where($qb->expr()->eq('file_id', $qb->createNamedParameter($fileId, IQueryBuilder::PARAM_INT)));
$qb->executeStatement();
}
@@ -134,15 +134,15 @@ class MetadataRequestService {
$expr = $qb->expr();
$qb->update(self::TABLE_METADATA)
- ->set('json', $qb->createNamedParameter(json_encode($filesMetadata->jsonSerialize())))
- ->set('sync_token', $qb->createNamedParameter($this->generateSyncToken()))
- ->set('last_update', $qb->createFunction('NOW()'))
- ->where(
- $expr->andX(
- $expr->eq('file_id', $qb->createNamedParameter($filesMetadata->getFileId(), IQueryBuilder::PARAM_INT)),
- $expr->eq('sync_token', $qb->createNamedParameter($filesMetadata->getSyncToken()))
- )
- );
+ ->set('json', $qb->createNamedParameter(json_encode($filesMetadata->jsonSerialize())))
+ ->set('sync_token', $qb->createNamedParameter($this->generateSyncToken()))
+ ->set('last_update', $qb->createFunction('NOW()'))
+ ->where(
+ $expr->andX(
+ $expr->eq('file_id', $qb->createNamedParameter($filesMetadata->getFileId(), IQueryBuilder::PARAM_INT)),
+ $expr->eq('sync_token', $qb->createNamedParameter($filesMetadata->getSyncToken()))
+ )
+ );
return $qb->executeStatement();
}
diff --git a/lib/private/FullTextSearch/Model/IndexDocument.php b/lib/private/FullTextSearch/Model/IndexDocument.php
index 6f9da9416fa..8bd20bad1e0 100644
--- a/lib/private/FullTextSearch/Model/IndexDocument.php
+++ b/lib/private/FullTextSearch/Model/IndexDocument.php
@@ -402,7 +402,7 @@ class IndexDocument implements IIndexDocument, JsonSerializable {
return $this;
}
- $this->hash = hash("md5", $this->getContent());
+ $this->hash = hash('md5', $this->getContent());
return $this;
}
@@ -556,9 +556,9 @@ class IndexDocument implements IIndexDocument, JsonSerializable {
* @since 16.0.0
*/
private function cleanExcerpt(string $excerpt): string {
- $excerpt = str_replace("\\n", ' ', $excerpt);
- $excerpt = str_replace("\\r", ' ', $excerpt);
- $excerpt = str_replace("\\t", ' ', $excerpt);
+ $excerpt = str_replace('\\n', ' ', $excerpt);
+ $excerpt = str_replace('\\r', ' ', $excerpt);
+ $excerpt = str_replace('\\t', ' ', $excerpt);
$excerpt = str_replace("\n", ' ', $excerpt);
$excerpt = str_replace("\r", ' ', $excerpt);
$excerpt = str_replace("\t", ' ', $excerpt);
diff --git a/lib/private/Group/Database.php b/lib/private/Group/Database.php
index 5827a31172d..72cd0ea4a91 100644
--- a/lib/private/Group/Database.php
+++ b/lib/private/Group/Database.php
@@ -325,8 +325,8 @@ class Database extends ABackend implements
$qb = $this->dbConn->getQueryBuilder();
$qb->select('gid', 'displayname')
- ->from('groups')
- ->where($qb->expr()->in('gid', $qb->createParameter('ids')));
+ ->from('groups')
+ ->where($qb->expr()->in('gid', $qb->createParameter('ids')));
foreach (array_chunk($notFoundGids, 1000) as $chunk) {
$qb->setParameter('ids', $chunk, IQueryBuilder::PARAM_STR_ARRAY);
$result = $qb->executeQuery();
@@ -488,7 +488,7 @@ class Database extends ABackend implements
$displayName = $result->fetchOne();
$result->closeCursor();
- return (string) $displayName;
+ return (string)$displayName;
}
public function getGroupDetails(string $gid): array {
diff --git a/lib/private/Group/Group.php b/lib/private/Group/Group.php
index dcda7c29bb5..147c5baf543 100644
--- a/lib/private/Group/Group.php
+++ b/lib/private/Group/Group.php
@@ -30,7 +30,7 @@ use OCP\IUser;
use OCP\IUserManager;
class Group implements IGroup {
- /** @var null|string */
+ /** @var null|string */
protected $displayName;
/** @var string */
@@ -46,7 +46,7 @@ class Group implements IGroup {
private $backends;
/** @var IEventDispatcher */
private $dispatcher;
- /** @var \OC\User\Manager|IUserManager */
+ /** @var \OC\User\Manager|IUserManager */
private $userManager;
/** @var PublicEmitter */
private $emitter;
diff --git a/lib/private/Group/Manager.php b/lib/private/Group/Manager.php
index cad8e76fbbd..d18c7796805 100644
--- a/lib/private/Group/Manager.php
+++ b/lib/private/Group/Manager.php
@@ -452,7 +452,7 @@ class Manager extends PublicEmitter implements IGroupManager {
$matchingUsers = [];
foreach ($groupUsers as $groupUser) {
- $matchingUsers[(string) $groupUser->getUID()] = $groupUser->getDisplayName();
+ $matchingUsers[(string)$groupUser->getUID()] = $groupUser->getDisplayName();
}
return $matchingUsers;
}
diff --git a/lib/private/Group/MetaData.php b/lib/private/Group/MetaData.php
index da553c89a7b..fe0d931cb09 100644
--- a/lib/private/Group/MetaData.php
+++ b/lib/private/Group/MetaData.php
@@ -41,7 +41,7 @@ class MetaData {
* [0] array containing meta data about admin groups
* [1] array containing meta data about unprivileged groups
* @param string $groupSearch only effective when instance was created with
- * isAdmin being true
+ * isAdmin being true
* @param string $userSearch the pattern users are search for
*/
public function get(string $groupSearch = '', string $userSearch = ''): array {
diff --git a/lib/private/Http/Client/Client.php b/lib/private/Http/Client/Client.php
index 7cadf3fdf6e..0b72522c218 100644
--- a/lib/private/Http/Client/Client.php
+++ b/lib/private/Http/Client/Client.php
@@ -176,27 +176,27 @@ class Client implements IClient {
*
* @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,
- * 'timeout' => 5,
+ * '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,
+ * 'timeout' => 5,
* @return IResponse
* @throws \Exception If the request could not get completed
*/
@@ -212,22 +212,22 @@ class Client implements IClient {
*
* @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,
- * 'timeout' => 5,
+ * '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,
+ * 'timeout' => 5,
* @return IResponse
* @throws \Exception If the request could not get completed
*/
@@ -242,27 +242,27 @@ class Client implements IClient {
*
* @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,
- * 'timeout' => 5,
+ * '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,
+ * 'timeout' => 5,
* @return IResponse
* @throws \Exception If the request could not get completed
*/
@@ -283,27 +283,27 @@ class Client implements IClient {
*
* @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,
- * 'timeout' => 5,
+ * '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,
+ * 'timeout' => 5,
* @return IResponse
* @throws \Exception If the request could not get completed
*/
@@ -318,27 +318,27 @@ class Client implements IClient {
*
* @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,
- * 'timeout' => 5,
+ * '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,
+ * 'timeout' => 5,
* @return IResponse
* @throws \Exception If the request could not get completed
*/
@@ -353,27 +353,27 @@ class Client implements IClient {
*
* @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,
- * 'timeout' => 5,
+ * '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,
+ * 'timeout' => 5,
* @return IResponse
* @throws \Exception If the request could not get completed
*/
@@ -388,27 +388,27 @@ class Client implements IClient {
*
* @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,
- * 'timeout' => 5,
+ * '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,
+ * 'timeout' => 5,
* @return IResponse
* @throws \Exception If the request could not get completed
*/
@@ -440,27 +440,27 @@ class Client implements 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,
- * 'timeout' => 5,
+ * '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,
+ * 'timeout' => 5,
* @return IResponse
* @throws \Exception If the request could not get completed
*/
@@ -483,27 +483,27 @@ class Client implements IClient {
*
* @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,
- * 'timeout' => 5,
+ * '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,
+ * 'timeout' => 5,
* @return IPromise
*/
public function getAsync(string $uri, array $options = []): IPromise {
@@ -517,22 +517,22 @@ class Client implements IClient {
*
* @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,
- * 'timeout' => 5,
+ * '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,
+ * 'timeout' => 5,
* @return IPromise
*/
public function headAsync(string $uri, array $options = []): IPromise {
@@ -546,27 +546,27 @@ class Client implements IClient {
*
* @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,
- * 'timeout' => 5,
+ * '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,
+ * 'timeout' => 5,
* @return IPromise
*/
public function postAsync(string $uri, array $options = []): IPromise {
@@ -585,27 +585,27 @@ class Client implements IClient {
*
* @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,
- * 'timeout' => 5,
+ * '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,
+ * 'timeout' => 5,
* @return IPromise
*/
public function putAsync(string $uri, array $options = []): IPromise {
@@ -619,27 +619,27 @@ class Client implements IClient {
*
* @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,
- * 'timeout' => 5,
+ * '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,
+ * 'timeout' => 5,
* @return IPromise
*/
public function deleteAsync(string $uri, array $options = []): IPromise {
@@ -653,27 +653,27 @@ class Client implements IClient {
*
* @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,
- * 'timeout' => 5,
+ * '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,
+ * 'timeout' => 5,
* @return IPromise
*/
public function optionsAsync(string $uri, array $options = []): IPromise {
diff --git a/lib/private/Http/Client/ClientService.php b/lib/private/Http/Client/ClientService.php
index 9a170be8752..b719f3d369d 100644
--- a/lib/private/Http/Client/ClientService.php
+++ b/lib/private/Http/Client/ClientService.php
@@ -61,7 +61,7 @@ class ClientService implements IClientService {
$stack->push($this->dnsPinMiddleware->addDnsPinning());
}
$stack->push(Middleware::tap(function (RequestInterface $request) {
- $this->eventLogger->start('http:request', $request->getMethod() . " request to " . $request->getRequestTarget());
+ $this->eventLogger->start('http:request', $request->getMethod() . ' request to ' . $request->getRequestTarget());
}, function () {
$this->eventLogger->end('http:request');
}), 'event logger');
diff --git a/lib/private/Http/Client/GuzzlePromiseAdapter.php b/lib/private/Http/Client/GuzzlePromiseAdapter.php
index dc8be9bd2e0..03a9ed9a599 100644
--- a/lib/private/Http/Client/GuzzlePromiseAdapter.php
+++ b/lib/private/Http/Client/GuzzlePromiseAdapter.php
@@ -36,7 +36,7 @@ class GuzzlePromiseAdapter implements 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
@@ -115,7 +115,7 @@ class GuzzlePromiseAdapter implements 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/private/Http/Client/NegativeDnsCache.php b/lib/private/Http/Client/NegativeDnsCache.php
index d5e32fa7c2d..ca8a477d6be 100644
--- a/lib/private/Http/Client/NegativeDnsCache.php
+++ b/lib/private/Http/Client/NegativeDnsCache.php
@@ -20,11 +20,11 @@ class NegativeDnsCache {
}
private function createCacheKey(string $domain, int $type) : string {
- return $domain . "-" . (string)$type;
+ return $domain . '-' . (string)$type;
}
public function setNegativeCacheForDnsType(string $domain, int $type, int $ttl) : void {
- $this->cache->set($this->createCacheKey($domain, $type), "true", $ttl);
+ $this->cache->set($this->createCacheKey($domain, $type), 'true', $ttl);
}
public function isNegativeCached(string $domain, int $type) : bool {
diff --git a/lib/private/Http/WellKnown/RequestManager.php b/lib/private/Http/WellKnown/RequestManager.php
index 38dde0eade2..3624bf73962 100644
--- a/lib/private/Http/WellKnown/RequestManager.php
+++ b/lib/private/Http/WellKnown/RequestManager.php
@@ -74,11 +74,11 @@ class RequestManager {
$context = $this->coordinator->getRegistrationContext();
if ($context === null) {
- throw new RuntimeException("Well known handlers requested before the apps had been fully registered");
+ throw new RuntimeException('Well known handlers requested before the apps had been fully registered');
}
$registrations = $context->getWellKnownHandlers();
- $this->logger->debug(count($registrations) . " well known handlers registered");
+ $this->logger->debug(count($registrations) . ' well known handlers registered');
return array_filter(
array_map(function (ServiceRegistration $registration) {
diff --git a/lib/private/Installer.php b/lib/private/Installer.php
index ad80b26d8bc..e0f7644304e 100644
--- a/lib/private/Installer.php
+++ b/lib/private/Installer.php
@@ -499,7 +499,7 @@ class Installer {
while (false !== ($filename = readdir($dir))) {
if ($filename[0] !== '.' and is_dir($app_dir['path']."/$filename")) {
if (file_exists($app_dir['path']."/$filename/appinfo/info.xml")) {
- if ($config->getAppValue($filename, "installed_version", null) === null) {
+ if ($config->getAppValue($filename, 'installed_version', null) === null) {
$enabled = $appManager->isDefaultEnabled($filename);
if (($enabled || in_array($filename, $appManager->getAlwaysEnabledApps()))
&& $config->getAppValue($filename, 'enabled') !== 'no') {
diff --git a/lib/private/L10N/L10N.php b/lib/private/L10N/L10N.php
index 39d778f80d6..50db373a65d 100644
--- a/lib/private/L10N/L10N.php
+++ b/lib/private/L10N/L10N.php
@@ -83,7 +83,7 @@ class L10N implements IL10N {
$parameters = [$parameters];
}
- return (string) new L10NString($this, $text, $parameters);
+ return (string)new L10NString($this, $text, $parameters);
}
/**
@@ -104,14 +104,14 @@ class L10N implements IL10N {
public function n(string $text_singular, string $text_plural, int $count, array $parameters = []): string {
$identifier = "_{$text_singular}_::_{$text_plural}_";
if (isset($this->translations[$identifier])) {
- return (string) new L10NString($this, $identifier, $parameters, $count);
+ return (string)new L10NString($this, $identifier, $parameters, $count);
}
if ($count === 1) {
- return (string) new L10NString($this, $text_singular, $parameters, $count);
+ return (string)new L10NString($this, $text_singular, $parameters, $count);
}
- return (string) new L10NString($this, $text_plural, $parameters, $count);
+ return (string)new L10NString($this, $text_plural, $parameters, $count);
}
/**
@@ -146,10 +146,10 @@ class L10N implements IL10N {
}
if ($type === 'firstday') {
- return (int) Calendar::getFirstWeekday($this->locale);
+ return (int)Calendar::getFirstWeekday($this->locale);
}
if ($type === 'jsdate') {
- return (string) Calendar::getDateFormat('short', $this->locale);
+ return (string)Calendar::getDateFormat('short', $this->locale);
}
$value = new \DateTime();
@@ -167,13 +167,13 @@ class L10N implements IL10N {
$width = $options['width'];
switch ($type) {
case 'date':
- return (string) Calendar::formatDate($value, $width, $this->locale);
+ return (string)Calendar::formatDate($value, $width, $this->locale);
case 'datetime':
- return (string) Calendar::formatDatetime($value, $width, $this->locale);
+ return (string)Calendar::formatDatetime($value, $width, $this->locale);
case 'time':
- return (string) Calendar::formatTime($value, $width, $this->locale);
+ return (string)Calendar::formatTime($value, $width, $this->locale);
case 'weekdayName':
- return (string) Calendar::getWeekdayName($value, $width, $this->locale);
+ return (string)Calendar::getWeekdayName($value, $width, $this->locale);
default:
return false;
}
diff --git a/lib/private/LDAP/NullLDAPProviderFactory.php b/lib/private/LDAP/NullLDAPProviderFactory.php
index 55561b5692e..60588e4d15b 100644
--- a/lib/private/LDAP/NullLDAPProviderFactory.php
+++ b/lib/private/LDAP/NullLDAPProviderFactory.php
@@ -16,7 +16,7 @@ class NullLDAPProviderFactory implements ILDAPProviderFactory {
}
public function getLDAPProvider() {
- throw new \Exception("No LDAP provider is available");
+ throw new \Exception('No LDAP provider is available');
}
public function isAvailable(): bool {
diff --git a/lib/private/LargeFileHelper.php b/lib/private/LargeFileHelper.php
index 4d96e79ead4..238fb0790b8 100755
--- a/lib/private/LargeFileHelper.php
+++ b/lib/private/LargeFileHelper.php
@@ -153,7 +153,7 @@ class LargeFileHelper {
// For file sizes between 2 GiB and 4 GiB, filesize() will return a
// negative int, as the PHP data type int is signed. Interpret the
// returned int as an unsigned integer and put it into a float.
- return (float) sprintf('%u', $result);
+ return (float)sprintf('%u', $result);
}
return $result;
}
diff --git a/lib/private/Lock/MemcacheLockingProvider.php b/lib/private/Lock/MemcacheLockingProvider.php
index 883abb5da98..b249e08d717 100644
--- a/lib/private/Lock/MemcacheLockingProvider.php
+++ b/lib/private/Lock/MemcacheLockingProvider.php
@@ -62,8 +62,8 @@ class MemcacheLockingProvider extends AbstractLockingProvider {
if ($type === self::LOCK_SHARED) {
// save the old TTL to for `restoreTTL`
$this->oldTTLs[$path] = [
- "ttl" => $this->getTTL($path),
- "time" => $this->timeFactory->getTime()
+ 'ttl' => $this->getTTL($path),
+ 'time' => $this->timeFactory->getTime()
];
if (!$this->memcache->inc($path)) {
throw new LockedException($path, null, $this->getExistingLockForException($path), $readablePath);
diff --git a/lib/private/Log.php b/lib/private/Log.php
index ea995642832..4f6003cf53d 100644
--- a/lib/private/Log.php
+++ b/lib/private/Log.php
@@ -326,7 +326,7 @@ class Log implements ILogger, IDataLogger {
try {
$serializer = $this->getSerializer();
} catch (Throwable $e) {
- $this->error("Failed to load ExceptionSerializer serializer while trying to log " . $exception->getMessage());
+ $this->error('Failed to load ExceptionSerializer serializer while trying to log ' . $exception->getMessage());
return;
}
$data = $context;
diff --git a/lib/private/Log/File.php b/lib/private/Log/File.php
index 28cc856b980..bc14de4ffdf 100644
--- a/lib/private/Log/File.php
+++ b/lib/private/Log/File.php
@@ -73,7 +73,7 @@ class File extends LogDetails implements IWriter, IFileBased {
* get entries from the log in reverse chronological order
*/
public function getEntries(int $limit = 50, int $offset = 0): array {
- $minLevel = $this->config->getValue("loglevel", ILogger::WARN);
+ $minLevel = $this->config->getValue('loglevel', ILogger::WARN);
$entries = [];
$handle = @fopen($this->logFile, 'rb');
if ($handle) {
diff --git a/lib/private/Log/LogDetails.php b/lib/private/Log/LogDetails.php
index bf2c1a22c49..95b09c0a181 100644
--- a/lib/private/Log/LogDetails.php
+++ b/lib/private/Log/LogDetails.php
@@ -22,7 +22,7 @@ abstract class LogDetails {
} catch (\Exception $e) {
$timezone = new \DateTimeZone('UTC');
}
- $time = \DateTime::createFromFormat("U.u", number_format(microtime(true), 4, ".", ""));
+ $time = \DateTime::createFromFormat('U.u', number_format(microtime(true), 4, '.', ''));
if ($time === false) {
$time = new \DateTime('now', $timezone);
} else {
diff --git a/lib/private/Log/PsrLoggerAdapter.php b/lib/private/Log/PsrLoggerAdapter.php
index 16e609eefdb..57a67bd67a7 100644
--- a/lib/private/Log/PsrLoggerAdapter.php
+++ b/lib/private/Log/PsrLoggerAdapter.php
@@ -35,7 +35,7 @@ final class PsrLoggerAdapter implements LoggerInterface, IDataLogger {
/**
* System is unusable.
*
- * @param $message
+ * @param $message
* @param mixed[] $context
*/
public function emergency($message, array $context = []): void {
@@ -58,7 +58,7 @@ final class PsrLoggerAdapter implements LoggerInterface, IDataLogger {
* Example: Entire website down, database unavailable, etc. This should
* trigger the SMS alerts and wake you up.
*
- * @param $message
+ * @param $message
* @param mixed[] $context
*/
public function alert($message, array $context = []): void {
@@ -80,7 +80,7 @@ final class PsrLoggerAdapter implements LoggerInterface, IDataLogger {
*
* Example: Application component unavailable, unexpected exception.
*
- * @param $message
+ * @param $message
* @param mixed[] $context
*/
public function critical($message, array $context = []): void {
@@ -101,7 +101,7 @@ final class PsrLoggerAdapter implements LoggerInterface, IDataLogger {
* Runtime errors that do not require immediate action but should typically
* be logged and monitored.
*
- * @param $message
+ * @param $message
* @param mixed[] $context
*/
public function error($message, array $context = []): void {
@@ -124,7 +124,7 @@ final class PsrLoggerAdapter implements LoggerInterface, IDataLogger {
* Example: Use of deprecated APIs, poor use of an API, undesirable things
* that are not necessarily wrong.
*
- * @param $message
+ * @param $message
* @param mixed[] $context
*/
public function warning($message, array $context = []): void {
@@ -144,7 +144,7 @@ final class PsrLoggerAdapter implements LoggerInterface, IDataLogger {
/**
* Normal but significant events.
*
- * @param $message
+ * @param $message
* @param mixed[] $context
*/
public function notice($message, array $context = []): void {
@@ -166,7 +166,7 @@ final class PsrLoggerAdapter implements LoggerInterface, IDataLogger {
*
* Example: User logs in, SQL logs.
*
- * @param $message
+ * @param $message
* @param mixed[] $context
*/
public function info($message, array $context = []): void {
@@ -186,7 +186,7 @@ final class PsrLoggerAdapter implements LoggerInterface, IDataLogger {
/**
* Detailed debug information.
*
- * @param $message
+ * @param $message
* @param mixed[] $context
*/
public function debug($message, array $context = []): void {
@@ -207,7 +207,7 @@ final class PsrLoggerAdapter implements LoggerInterface, IDataLogger {
* Logs with an arbitrary level.
*
* @param mixed $level
- * @param $message
+ * @param $message
* @param mixed[] $context
*
* @throws InvalidArgumentException
diff --git a/lib/private/Mail/EMailTemplate.php b/lib/private/Mail/EMailTemplate.php
index 8047cb80bad..2cb222fd137 100644
--- a/lib/private/Mail/EMailTemplate.php
+++ b/lib/private/Mail/EMailTemplate.php
@@ -346,7 +346,7 @@ EOF;
* Adds a heading to the email
*
* @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
*/
public function addHeading(string $title, $plainTitle = ''): void {
if ($this->footerAdded) {
@@ -379,7 +379,7 @@ EOF;
*
* @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
*/
public function addBodyText(string $text, $plainText = ''): void {
if ($this->footerAdded) {
@@ -406,9 +406,9 @@ EOF;
* @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 or true the $text is used, if false none will be used
+ * if empty or true 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 or true the $metaInfo is used, if false none will be used
+ * if empty or true the $metaInfo is used, if false none will be used
* @param integer $plainIndent plainIndent If > 0, Indent plainText by this amount.
* @since 12.0.0
*/
@@ -425,7 +425,7 @@ EOF;
if ($plainText === '' || $plainText === true) {
$plainText = $text;
$text = htmlspecialchars($text);
- $text = str_replace("\n", "<br/>", $text); // convert newlines to HTML breaks
+ $text = str_replace("\n", '<br/>', $text); // convert newlines to HTML breaks
}
if ($plainMetaInfo === '' || $plainMetaInfo === true) {
$plainMetaInfo = $metaInfo;
@@ -536,7 +536,7 @@ EOF;
* @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/private/Mail/Mailer.php b/lib/private/Mail/Mailer.php
index 4ddb748fc26..b24e52ce95b 100644
--- a/lib/private/Mail/Mailer.php
+++ b/lib/private/Mail/Mailer.php
@@ -118,8 +118,8 @@ class Mailer implements IMailer {
$logoDimensions = $this->config->getAppValue('theming', 'logoDimensions', self::DEFAULT_DIMENSIONS);
if (str_contains($logoDimensions, 'x')) {
[$width, $height] = explode('x', $logoDimensions);
- $width = (int) $width;
- $height = (int) $height;
+ $width = (int)$width;
+ $height = (int)$height;
if ($width > self::MAX_LOGO_SIZE || $height > self::MAX_LOGO_SIZE) {
if ($width === $height) {
@@ -127,9 +127,9 @@ class Mailer implements IMailer {
$logoHeight = self::MAX_LOGO_SIZE;
} elseif ($width > $height) {
$logoWidth = self::MAX_LOGO_SIZE;
- $logoHeight = (int) (($height / $width) * self::MAX_LOGO_SIZE);
+ $logoHeight = (int)(($height / $width) * self::MAX_LOGO_SIZE);
} else {
- $logoWidth = (int) (($width / $height) * self::MAX_LOGO_SIZE);
+ $logoWidth = (int)(($width / $height) * self::MAX_LOGO_SIZE);
$logoHeight = self::MAX_LOGO_SIZE;
}
} else {
diff --git a/lib/private/Mail/Provider/Manager.php b/lib/private/Mail/Provider/Manager.php
index 244aa86d68d..14ffeac287b 100644
--- a/lib/private/Mail/Provider/Manager.php
+++ b/lib/private/Mail/Provider/Manager.php
@@ -60,7 +60,7 @@ class Manager implements 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 {
@@ -80,7 +80,7 @@ class Manager implements 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 {
@@ -121,11 +121,11 @@ class Manager implements 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 {
// evaluate if we already have a cached collection of providers
if (!is_array($this->providersCollection)) {
@@ -145,9 +145,9 @@ class Manager implements IManager {
*
* @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 {
@@ -172,13 +172,13 @@ class Manager implements 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 {
// evaluate if provider id was specified
if ($providerId !== null) {
@@ -216,13 +216,13 @@ class Manager implements 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 {
// evaluate if provider id was specified
if ($providerId !== null) {
diff --git a/lib/private/Memcache/ProfilerWrapperCache.php b/lib/private/Memcache/ProfilerWrapperCache.php
index a13d647c6a4..97d9d828a32 100644
--- a/lib/private/Memcache/ProfilerWrapperCache.php
+++ b/lib/private/Memcache/ProfilerWrapperCache.php
@@ -18,7 +18,7 @@ use OCP\IMemcacheTTL;
* @template-implements \ArrayAccess<string,mixed>
*/
class ProfilerWrapperCache extends AbstractDataCollector implements IMemcacheTTL, \ArrayAccess {
- /** @var Redis $wrappedCache*/
+ /** @var Redis $wrappedCache */
protected $wrappedCache;
/** @var string $prefix */
diff --git a/lib/private/Memcache/Redis.php b/lib/private/Memcache/Redis.php
index 714759e8fbf..711531e0ac2 100644
--- a/lib/private/Memcache/Redis.php
+++ b/lib/private/Memcache/Redis.php
@@ -212,10 +212,10 @@ class Redis extends Cache implements IMemcacheTTL {
}
protected static function encodeValue(mixed $value): string {
- return is_int($value) ? (string) $value : json_encode($value);
+ return is_int($value) ? (string)$value : json_encode($value);
}
protected static function decodeValue(string $value): mixed {
- return is_numeric($value) ? (int) $value : json_decode($value, true);
+ return is_numeric($value) ? (int)$value : json_decode($value, true);
}
}
diff --git a/lib/private/NaturalSort.php b/lib/private/NaturalSort.php
index 120e05a8eb2..9b097340b63 100644
--- a/lib/private/NaturalSort.php
+++ b/lib/private/NaturalSort.php
@@ -82,7 +82,7 @@ class NaturalSort {
* @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
*/
public function compare($a, $b) {
// Needed because PHP doesn't sort correctly when numbers are enclosed in
diff --git a/lib/private/Notification/Manager.php b/lib/private/Notification/Manager.php
index 7d042e6f8d8..8edbca0380d 100644
--- a/lib/private/Notification/Manager.php
+++ b/lib/private/Notification/Manager.php
@@ -68,7 +68,7 @@ class Manager implements IManager {
}
/**
* @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 {
@@ -78,8 +78,8 @@ class Manager implements IManager {
/**
* @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
*/
@@ -93,7 +93,7 @@ class Manager implements IManager {
/**
* @param string $notifierService The service must implement INotifier, otherwise a
- * \InvalidArgumentException is thrown later
+ * \InvalidArgumentException is thrown later
* @since 17.0.0
*/
public function registerNotifierService(string $notifierService): void {
diff --git a/lib/private/OCM/Model/OCMProvider.php b/lib/private/OCM/Model/OCMProvider.php
index 17a356428f7..9bda95ebc17 100644
--- a/lib/private/OCM/Model/OCMProvider.php
+++ b/lib/private/OCM/Model/OCMProvider.php
@@ -163,8 +163,8 @@ class OCMProvider implements IOCMProvider {
*/
public function import(array $data): static {
$this->setEnabled(is_bool($data['enabled'] ?? '') ? $data['enabled'] : false)
- ->setApiVersion((string)($data['apiVersion'] ?? ''))
- ->setEndPoint($data['endPoint'] ?? '');
+ ->setApiVersion((string)($data['apiVersion'] ?? ''))
+ ->setEndPoint($data['endPoint'] ?? '');
$resources = [];
foreach (($data['resourceTypes'] ?? []) as $resourceData) {
diff --git a/lib/private/OCM/Model/OCMResource.php b/lib/private/OCM/Model/OCMResource.php
index c69763ca4ba..68f9ee18f79 100644
--- a/lib/private/OCM/Model/OCMResource.php
+++ b/lib/private/OCM/Model/OCMResource.php
@@ -85,8 +85,8 @@ class OCMResource implements IOCMResource {
*/
public function import(array $data): static {
return $this->setName((string)($data['name'] ?? ''))
- ->setShareTypes($data['shareTypes'] ?? [])
- ->setProtocols($data['protocols'] ?? []);
+ ->setShareTypes($data['shareTypes'] ?? [])
+ ->setProtocols($data['protocols'] ?? []);
}
/**
diff --git a/lib/private/Preview/Bitmap.php b/lib/private/Preview/Bitmap.php
index c9fad50841f..a3d5fbfd4ec 100644
--- a/lib/private/Preview/Bitmap.php
+++ b/lib/private/Preview/Bitmap.php
@@ -61,7 +61,7 @@ abstract class Bitmap extends ProviderV2 {
//new bitmap image object
$image = new \OCP\Image();
- $image->loadFromData((string) $bp);
+ $image->loadFromData((string)$bp);
//check if image object is valid
return $image->valid() ? $image : null;
}
diff --git a/lib/private/Preview/Generator.php b/lib/private/Preview/Generator.php
index 4083b9f4f61..460637c9a99 100644
--- a/lib/private/Preview/Generator.php
+++ b/lib/private/Preview/Generator.php
@@ -171,7 +171,7 @@ class Generator {
$previewFiles[] = $preview;
}
} catch (\InvalidArgumentException $e) {
- throw new NotFoundException("", 0, $e);
+ throw new NotFoundException('', 0, $e);
}
if ($preview->getSize() === 0) {
@@ -272,13 +272,13 @@ class Generator {
$hardwareConcurrency = self::getHardwareConcurrency();
switch ($type) {
- case "preview_concurrency_all":
+ case 'preview_concurrency_all':
$fallback = $hardwareConcurrency > 0 ? $hardwareConcurrency * 2 : 8;
$concurrency_all = $this->config->getSystemValueInt($type, $fallback);
- $concurrency_new = $this->getNumConcurrentPreviews("preview_concurrency_new");
+ $concurrency_new = $this->getNumConcurrentPreviews('preview_concurrency_new');
$cached[$type] = max($concurrency_all, $concurrency_new);
break;
- case "preview_concurrency_new":
+ case 'preview_concurrency_new':
$fallback = $hardwareConcurrency > 0 ? $hardwareConcurrency : 4;
$cached[$type] = $this->config->getSystemValueInt($type, $fallback);
break;
diff --git a/lib/private/Preview/HEIC.php b/lib/private/Preview/HEIC.php
index d198f11fdef..e5d73c943a4 100644
--- a/lib/private/Preview/HEIC.php
+++ b/lib/private/Preview/HEIC.php
@@ -31,7 +31,7 @@ class HEIC extends ProviderV2 {
* {@inheritDoc}
*/
public function isAvailable(FileInfo $file): bool {
- return in_array('HEIC', \Imagick::queryFormats("HEI*"));
+ return in_array('HEIC', \Imagick::queryFormats('HEI*'));
}
/**
@@ -70,7 +70,7 @@ class HEIC extends ProviderV2 {
//new bitmap image object
$image = new \OCP\Image();
- $image->loadFromData((string) $bp);
+ $image->loadFromData((string)$bp);
//check if image object is valid
return $image->valid() ? $image : null;
}
diff --git a/lib/private/Preview/MarkDown.php b/lib/private/Preview/MarkDown.php
index 41a79455042..c20433a1ac0 100644
--- a/lib/private/Preview/MarkDown.php
+++ b/lib/private/Preview/MarkDown.php
@@ -52,7 +52,7 @@ class MarkDown extends TXT {
$lines = preg_split("/\r\n|\n|\r/", $content);
// Define text size of text file preview
- $fontSize = $maxX ? (int) ((1 / ($maxX >= 512 ? 60 : 40) * $maxX)) : 10;
+ $fontSize = $maxX ? (int)((1 / ($maxX >= 512 ? 60 : 40) * $maxX)) : 10;
$image = imagecreate($maxX, $maxY);
imagecolorallocate($image, 255, 255, 255);
diff --git a/lib/private/Preview/Movie.php b/lib/private/Preview/Movie.php
index cfc05b8cce9..4a6104930d6 100644
--- a/lib/private/Preview/Movie.php
+++ b/lib/private/Preview/Movie.php
@@ -120,7 +120,7 @@ class Movie extends ProviderV2 {
$proc = proc_open($cmd, [1 => ['pipe', 'w'], 2 => ['pipe', 'w']], $pipes);
$returnCode = -1;
- $output = "";
+ $output = '';
if (is_resource($proc)) {
$stdout = trim(stream_get_contents($pipes[1]));
$stderr = trim(stream_get_contents($pipes[2]));
diff --git a/lib/private/Preview/SVG.php b/lib/private/Preview/SVG.php
index 73dc0488bf1..d9f7701f411 100644
--- a/lib/private/Preview/SVG.php
+++ b/lib/private/Preview/SVG.php
@@ -58,7 +58,7 @@ class SVG extends ProviderV2 {
//new image object
$image = new \OCP\Image();
- $image->loadFromData((string) $svg);
+ $image->loadFromData((string)$svg);
//check if image object is valid
if ($image->valid()) {
$image->scaleDownToFit($maxX, $maxY);
diff --git a/lib/private/Preview/TXT.php b/lib/private/Preview/TXT.php
index 68597f8dbd0..1a1d64f3e08 100644
--- a/lib/private/Preview/TXT.php
+++ b/lib/private/Preview/TXT.php
@@ -50,7 +50,7 @@ class TXT extends ProviderV2 {
$lines = preg_split("/\r\n|\n|\r/", $content);
// Define text size of text file preview
- $fontSize = $maxX ? (int) ((1 / 32) * $maxX) : 5; //5px
+ $fontSize = $maxX ? (int)((1 / 32) * $maxX) : 5; //5px
$lineSize = ceil($fontSize * 1.5);
$image = imagecreate($maxX, $maxY);
@@ -67,7 +67,7 @@ class TXT extends ProviderV2 {
$index = $index + 1;
$x = 1;
- $y = (int) ($index * $lineSize);
+ $y = (int)($index * $lineSize);
if ($canUseTTF === true) {
imagettftext($image, $fontSize, 0, $x, $y, $textColor, $fontFile, $line);
diff --git a/lib/private/PreviewManager.php b/lib/private/PreviewManager.php
index f19ff25abb7..6f43687ceea 100644
--- a/lib/private/PreviewManager.php
+++ b/lib/private/PreviewManager.php
@@ -389,7 +389,7 @@ class PreviewManager implements IPreview {
if (is_string($movieBinary)) {
- $this->registerCoreProvider(Preview\Movie::class, '/video\/.*/', ["movieBinary" => $movieBinary]);
+ $this->registerCoreProvider(Preview\Movie::class, '/video\/.*/', ['movieBinary' => $movieBinary]);
}
}
}
diff --git a/lib/private/Profile/ProfileManager.php b/lib/private/Profile/ProfileManager.php
index e575740f970..5e36a9c2f56 100644
--- a/lib/private/Profile/ProfileManager.php
+++ b/lib/private/Profile/ProfileManager.php
@@ -93,7 +93,7 @@ class ProfileManager implements IProfileManager {
}
$account = $this->accountManager->getAccount($user);
- return (bool) filter_var(
+ return (bool)filter_var(
$account->getProperty(IAccountManager::PROPERTY_PROFILE_ENABLED)->getValue(),
FILTER_VALIDATE_BOOLEAN,
FILTER_NULL_ON_FAILURE,
diff --git a/lib/private/Profiler/FileProfilerStorage.php b/lib/private/Profiler/FileProfilerStorage.php
index 8cb6f2e6f79..b4494ef7a37 100644
--- a/lib/private/Profiler/FileProfilerStorage.php
+++ b/lib/private/Profiler/FileProfilerStorage.php
@@ -46,7 +46,7 @@ class FileProfilerStorage {
while (\count($result) < $limit && $line = $this->readLineFromFile($file)) {
$values = str_getcsv($line);
[$csvToken, $csvMethod, $csvUrl, $csvTime, $csvParent, $csvStatusCode] = $values;
- $csvTime = (int) $csvTime;
+ $csvTime = (int)$csvTime;
if ($url && !str_contains($csvUrl, $url) || $method && !str_contains($csvMethod, $method) || $statusCode && !str_contains($csvStatusCode, $statusCode)) {
continue;
diff --git a/lib/private/RedisFactory.php b/lib/private/RedisFactory.php
index b5779cbfbaa..dcb56cee9ef 100644
--- a/lib/private/RedisFactory.php
+++ b/lib/private/RedisFactory.php
@@ -13,7 +13,7 @@ class RedisFactory {
public const REDIS_MINIMAL_VERSION = '4.0.0';
public const REDIS_EXTRA_PARAMETERS_MINIMAL_VERSION = '5.3.0';
- /** @var \Redis|\RedisCluster */
+ /** @var \Redis|\RedisCluster */
private $instance;
private SystemConfig $config;
diff --git a/lib/private/Repair.php b/lib/private/Repair.php
index d1904e08431..630ee249209 100644
--- a/lib/private/Repair.php
+++ b/lib/private/Repair.php
@@ -99,7 +99,7 @@ class Repair implements IOutput {
try {
$step->run($this);
} catch (\Exception $e) {
- $this->logger->error("Exception while executing repair step " . $step->getName(), ['exception' => $e]);
+ $this->logger->error('Exception while executing repair step ' . $step->getName(), ['exception' => $e]);
$this->dispatcher->dispatchTyped(new RepairErrorEvent($e->getMessage()));
}
}
diff --git a/lib/private/Repair/CleanTags.php b/lib/private/Repair/CleanTags.php
index f2fc8156f29..41ee111a20d 100644
--- a/lib/private/Repair/CleanTags.php
+++ b/lib/private/Repair/CleanTags.php
@@ -147,8 +147,8 @@ class CleanTags implements IRepairStep {
* @param string $deleteId
* @param string $sourceTable
* @param string $sourceId
- * @param string $sourceNullColumn If this column is null in the source table,
- * the entry is deleted in the $deleteTable
+ * @param string $sourceNullColumn If this column is null in the source table,
+ * the entry is deleted in the $deleteTable
*/
protected function deleteOrphanEntries(IOutput $output, $repairInfo, $deleteTable, $deleteId, $sourceTable, $sourceId, $sourceNullColumn) {
$qb = $this->connection->getQueryBuilder();
@@ -166,7 +166,7 @@ class CleanTags implements IRepairStep {
$orphanItems = [];
while ($row = $result->fetch()) {
- $orphanItems[] = (int) $row[$deleteId];
+ $orphanItems[] = (int)$row[$deleteId];
}
if (!empty($orphanItems)) {
diff --git a/lib/private/Repair/Collation.php b/lib/private/Repair/Collation.php
index a01a684151b..9557aabd718 100644
--- a/lib/private/Repair/Collation.php
+++ b/lib/private/Repair/Collation.php
@@ -15,7 +15,7 @@ use OCP\Migration\IRepairStep;
use Psr\Log\LoggerInterface;
class Collation implements IRepairStep {
- /** @var IConfig */
+ /** @var IConfig */
protected $config;
protected LoggerInterface $logger;
@@ -92,14 +92,14 @@ class Collation implements IRepairStep {
* @return string[]
*/
protected function getAllNonUTF8BinTables(IDBConnection $connection) {
- $dbName = $this->config->getSystemValueString("dbname");
+ $dbName = $this->config->getSystemValueString('dbname');
$characterSet = $this->config->getSystemValueBool('mysql.utf8mb4', false) ? 'utf8mb4' : 'utf8';
// fetch tables by columns
$statement = $connection->executeQuery(
- "SELECT DISTINCT(TABLE_NAME) AS `table`" .
- " FROM INFORMATION_SCHEMA . COLUMNS" .
- " WHERE TABLE_SCHEMA = ?" .
+ 'SELECT DISTINCT(TABLE_NAME) AS `table`' .
+ ' FROM INFORMATION_SCHEMA . COLUMNS' .
+ ' WHERE TABLE_SCHEMA = ?' .
" AND (COLLATION_NAME <> '" . $characterSet . "_bin' OR CHARACTER_SET_NAME <> '" . $characterSet . "')" .
" AND TABLE_NAME LIKE '*PREFIX*%'",
[$dbName]
@@ -112,9 +112,9 @@ class Collation implements IRepairStep {
// fetch tables by collation
$statement = $connection->executeQuery(
- "SELECT DISTINCT(TABLE_NAME) AS `table`" .
- " FROM INFORMATION_SCHEMA . TABLES" .
- " WHERE TABLE_SCHEMA = ?" .
+ 'SELECT DISTINCT(TABLE_NAME) AS `table`' .
+ ' FROM INFORMATION_SCHEMA . TABLES' .
+ ' WHERE TABLE_SCHEMA = ?' .
" AND TABLE_COLLATION <> '" . $characterSet . "_bin'" .
" AND TABLE_NAME LIKE '*PREFIX*%'",
[$dbName]
diff --git a/lib/private/Repair/NC25/AddMissingSecretJob.php b/lib/private/Repair/NC25/AddMissingSecretJob.php
index b407ef2a2a9..46b89d5f6f7 100644
--- a/lib/private/Repair/NC25/AddMissingSecretJob.php
+++ b/lib/private/Repair/NC25/AddMissingSecretJob.php
@@ -33,7 +33,7 @@ class AddMissingSecretJob implements IRepairStep {
try {
$this->config->setSystemValue('passwordsalt', $this->random->generate(30));
} catch (HintException $e) {
- $output->warning("passwordsalt is missing from your config.php and your config.php is read only. Please fix it manually.");
+ $output->warning('passwordsalt is missing from your config.php and your config.php is read only. Please fix it manually.');
}
}
@@ -42,7 +42,7 @@ class AddMissingSecretJob implements IRepairStep {
try {
$this->config->setSystemValue('secret', $this->random->generate(48));
} catch (HintException $e) {
- $output->warning("secret is missing from your config.php and your config.php is read only. Please fix it manually.");
+ $output->warning('secret is missing from your config.php and your config.php is read only. Please fix it manually.');
}
}
}
diff --git a/lib/private/Repair/OldGroupMembershipShares.php b/lib/private/Repair/OldGroupMembershipShares.php
index 54f2078395e..027f179596c 100644
--- a/lib/private/Repair/OldGroupMembershipShares.php
+++ b/lib/private/Repair/OldGroupMembershipShares.php
@@ -57,9 +57,9 @@ class OldGroupMembershipShares implements IRepairStep {
->from('share', 's1')
->where($query->expr()->isNotNull('s1.parent'))
// \OC\Share\Constant::$shareTypeGroupUserUnique === 2
- ->andWhere($query->expr()->eq('s1.share_type', $query->expr()->literal(2)))
- ->andWhere($query->expr()->isNotNull('s2.id'))
- ->andWhere($query->expr()->eq('s2.share_type', $query->expr()->literal(IShare::TYPE_GROUP)))
+ ->andWhere($query->expr()->eq('s1.share_type', $query->expr()->literal(2)))
+ ->andWhere($query->expr()->isNotNull('s2.id'))
+ ->andWhere($query->expr()->eq('s2.share_type', $query->expr()->literal(IShare::TYPE_GROUP)))
->leftJoin('s1', 'share', 's2', $query->expr()->eq('s1.parent', 's2.id'));
$deleteQuery = $this->connection->getQueryBuilder();
@@ -69,7 +69,7 @@ class OldGroupMembershipShares implements IRepairStep {
$result = $query->execute();
while ($row = $result->fetch()) {
if (!$this->isMember($row['group'], $row['user'])) {
- $deletedEntries += $deleteQuery->setParameter('share', (int) $row['id'])
+ $deletedEntries += $deleteQuery->setParameter('share', (int)$row['id'])
->execute();
}
}
diff --git a/lib/private/Repair/Owncloud/MigrateOauthTables.php b/lib/private/Repair/Owncloud/MigrateOauthTables.php
index e8728cd2f66..94ec0eba3e6 100644
--- a/lib/private/Repair/Owncloud/MigrateOauthTables.php
+++ b/lib/private/Repair/Owncloud/MigrateOauthTables.php
@@ -32,11 +32,11 @@ class MigrateOauthTables implements IRepairStep {
public function run(IOutput $output) {
$schema = new SchemaWrapper($this->db);
if (!$schema->hasTable('oauth2_clients')) {
- $output->info("oauth2_clients table does not exist.");
+ $output->info('oauth2_clients table does not exist.');
return;
}
- $output->info("Update the oauth2_access_tokens table schema.");
+ $output->info('Update the oauth2_access_tokens table schema.');
$schema = new SchemaWrapper($this->db);
$table = $schema->getTable('oauth2_access_tokens');
if (!$table->hasColumn('hashed_code')) {
@@ -58,7 +58,7 @@ class MigrateOauthTables implements IRepairStep {
$table->addIndex(['client_id'], 'oauth2_access_client_id_idx');
}
- $output->info("Update the oauth2_clients table schema.");
+ $output->info('Update the oauth2_clients table schema.');
$schema = new SchemaWrapper($this->db);
$table = $schema->getTable('oauth2_clients');
if ($table->getColumn('name')->getLength() !== 64) {
@@ -114,7 +114,7 @@ class MigrateOauthTables implements IRepairStep {
$result->closeCursor();
// 2. Insert them into the client_identifier column.
- foreach ($identifiers as ["id" => $id, "identifier" => $clientIdentifier]) {
+ foreach ($identifiers as ['id' => $id, 'identifier' => $clientIdentifier]) {
$insertQuery = $this->db->getQueryBuilder();
$insertQuery->update('oauth2_clients')
->set('client_identifier', $insertQuery->createNamedParameter($clientIdentifier, IQueryBuilder::PARAM_STR))
@@ -122,7 +122,7 @@ class MigrateOauthTables implements IRepairStep {
->executeStatement();
}
- $output->info("Drop the identifier column.");
+ $output->info('Drop the identifier column.');
$schema = new SchemaWrapper($this->db);
$table = $schema->getTable('oauth2_clients');
$table->dropColumn('identifier');
diff --git a/lib/private/Repair/Owncloud/SaveAccountsTableData.php b/lib/private/Repair/Owncloud/SaveAccountsTableData.php
index 1b6da7c858f..08665687b29 100644
--- a/lib/private/Repair/Owncloud/SaveAccountsTableData.php
+++ b/lib/private/Repair/Owncloud/SaveAccountsTableData.php
@@ -150,7 +150,7 @@ class SaveAccountsTableData implements IRepairStep {
* @throws \UnexpectedValueException
*/
protected function migrateUserInfo(IQueryBuilder $update, $userdata) {
- $state = (int) $userdata['state'];
+ $state = (int)$userdata['state'];
if ($state === 3) {
// Deleted user, ignore
return;
diff --git a/lib/private/Repair/RemoveLinkShares.php b/lib/private/Repair/RemoveLinkShares.php
index f128b6f731b..634494acb2f 100644
--- a/lib/private/Repair/RemoveLinkShares.php
+++ b/lib/private/Repair/RemoveLinkShares.php
@@ -111,7 +111,7 @@ class RemoveLinkShares implements IRepairStep {
$data = $result->fetch();
$result->closeCursor();
- return (int) $data['total'];
+ return (int)$data['total'];
}
/**
@@ -180,7 +180,7 @@ class RemoveLinkShares implements IRepairStep {
$users = array_keys($this->userToNotify);
foreach ($users as $user) {
- $notification->setUser((string) $user);
+ $notification->setUser((string)$user);
$this->notificationManager->notify($notification);
}
}
diff --git a/lib/private/Repair/RepairInvalidShares.php b/lib/private/Repair/RepairInvalidShares.php
index f28ae1c45fb..71e6359da5b 100644
--- a/lib/private/Repair/RepairInvalidShares.php
+++ b/lib/private/Repair/RepairInvalidShares.php
@@ -65,7 +65,7 @@ class RepairInvalidShares implements IRepairStep {
$query->select('s1.parent')
->from('share', 's1')
->where($query->expr()->isNotNull('s1.parent'))
- ->andWhere($query->expr()->isNull('s2.id'))
+ ->andWhere($query->expr()->isNull('s2.id'))
->leftJoin('s1', 'share', 's2', $query->expr()->eq('s1.parent', 's2.id'))
->groupBy('s1.parent')
->setMaxResults(self::CHUNK_SIZE);
@@ -80,7 +80,7 @@ class RepairInvalidShares implements IRepairStep {
$result = $query->execute();
while ($row = $result->fetch()) {
$deletedInLastChunk++;
- $deletedEntries += $deleteQuery->setParameter('parent', (int) $row['parent'])
+ $deletedEntries += $deleteQuery->setParameter('parent', (int)$row['parent'])
->execute();
}
$result->closeCursor();
diff --git a/lib/private/Repair/RepairMimeTypes.php b/lib/private/Repair/RepairMimeTypes.php
index 2eece761c8d..5e81f8d801b 100644
--- a/lib/private/Repair/RepairMimeTypes.php
+++ b/lib/private/Repair/RepairMimeTypes.php
@@ -226,10 +226,10 @@ class RepairMimeTypes implements IRepairStep {
*/
private function introduceFlatOpenDocumentType(): IResult|int|null {
$updatedMimetypes = [
- "fodt" => "application/vnd.oasis.opendocument.text-flat-xml",
- "fods" => "application/vnd.oasis.opendocument.spreadsheet-flat-xml",
- "fodg" => "application/vnd.oasis.opendocument.graphics-flat-xml",
- "fodp" => "application/vnd.oasis.opendocument.presentation-flat-xml",
+ 'fodt' => 'application/vnd.oasis.opendocument.text-flat-xml',
+ 'fods' => 'application/vnd.oasis.opendocument.spreadsheet-flat-xml',
+ 'fodg' => 'application/vnd.oasis.opendocument.graphics-flat-xml',
+ 'fodp' => 'application/vnd.oasis.opendocument.presentation-flat-xml',
];
return $this->updateMimetypes($updatedMimetypes);
@@ -251,8 +251,8 @@ class RepairMimeTypes implements IRepairStep {
*/
private function introduceOnlyofficeFormType(): IResult|int|null {
$updatedMimetypes = [
- "oform" => "application/vnd.openxmlformats-officedocument.wordprocessingml.document.oform",
- "docxf" => "application/vnd.openxmlformats-officedocument.wordprocessingml.document.docxf",
+ 'oform' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document.oform',
+ 'docxf' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document.docxf',
];
return $this->updateMimetypes($updatedMimetypes);
diff --git a/lib/private/Route/Route.php b/lib/private/Route/Route.php
index 2fef3b10806..ab5a1f6b59a 100644
--- a/lib/private/Route/Route.php
+++ b/lib/private/Route/Route.php
@@ -128,7 +128,7 @@ class Route extends SymfonyRoute implements IRoute {
*/
public function actionInclude($file) {
$function = function ($param) use ($file) {
- unset($param["_route"]);
+ unset($param['_route']);
$_GET = array_merge($_GET, $param);
unset($param);
require_once "$file";
diff --git a/lib/private/Search/FilterFactory.php b/lib/private/Search/FilterFactory.php
index 1317dd759af..1466042291d 100644
--- a/lib/private/Search/FilterFactory.php
+++ b/lib/private/Search/FilterFactory.php
@@ -27,7 +27,7 @@ final class FilterFactory {
FilterDefinition::TYPE_NC_USER => new Filter\UserFilter($filter, \OC::$server->get(IUserManager::class)),
FilterDefinition::TYPE_PERSON => self::getPerson($filter),
FilterDefinition::TYPE_STRING => new Filter\StringFilter($filter),
- FilterDefinition::TYPE_STRINGS => new Filter\StringsFilter(... (array) $filter),
+ FilterDefinition::TYPE_STRINGS => new Filter\StringsFilter(... (array)$filter),
default => throw new RuntimeException('Invalid filter type '. $type),
};
}
diff --git a/lib/private/Security/Bruteforce/Backend/DatabaseBackend.php b/lib/private/Security/Bruteforce/Backend/DatabaseBackend.php
index 0e272d94d0d..33c2a3aae62 100644
--- a/lib/private/Security/Bruteforce/Backend/DatabaseBackend.php
+++ b/lib/private/Security/Bruteforce/Backend/DatabaseBackend.php
@@ -45,7 +45,7 @@ class DatabaseBackend implements IBackend {
$row = $result->fetch();
$result->closeCursor();
- return (int) $row['attempts'];
+ return (int)$row['attempts'];
}
/**
diff --git a/lib/private/Security/Bruteforce/Throttler.php b/lib/private/Security/Bruteforce/Throttler.php
index 7e310035ce4..596fcf408fa 100644
--- a/lib/private/Security/Bruteforce/Throttler.php
+++ b/lib/private/Security/Bruteforce/Throttler.php
@@ -176,7 +176,7 @@ class Throttler implements IThrottler {
return 0;
}
- $maxAgeTimestamp = (int) ($this->timeFactory->getTime() - 3600 * $maxAgeHours);
+ $maxAgeTimestamp = (int)($this->timeFactory->getTime() - 3600 * $maxAgeHours);
return $this->backend->getAttempts(
$ipAddress->getSubnet(),
@@ -204,7 +204,7 @@ class Throttler implements IThrottler {
if ($delay > self::MAX_DELAY) {
return self::MAX_DELAY_MS;
}
- return (int) \ceil($delay * 1000);
+ return (int)\ceil($delay * 1000);
}
/**
diff --git a/lib/private/Security/Ip/Range.php b/lib/private/Security/Ip/Range.php
index 4f960166d6a..39c03677f81 100644
--- a/lib/private/Security/Ip/Range.php
+++ b/lib/private/Security/Ip/Range.php
@@ -30,7 +30,7 @@ class Range implements IRange {
}
public function contains(IAddress $address): bool {
- return $this->range->contains(Factory::parseAddressString((string) $address));
+ return $this->range->contains(Factory::parseAddressString((string)$address));
}
public function __toString(): string {
diff --git a/lib/private/Security/Ip/RemoteAddress.php b/lib/private/Security/Ip/RemoteAddress.php
index 54cdb96132a..cef511099b1 100644
--- a/lib/private/Security/Ip/RemoteAddress.php
+++ b/lib/private/Security/Ip/RemoteAddress.php
@@ -66,6 +66,6 @@ class RemoteAddress implements IRemoteAddress, IAddress {
}
public function __toString(): string {
- return (string) $this->ip;
+ return (string)$this->ip;
}
}
diff --git a/lib/private/Security/SecureRandom.php b/lib/private/Security/SecureRandom.php
index 459d43475b7..b2a3d19ce74 100644
--- a/lib/private/Security/SecureRandom.php
+++ b/lib/private/Security/SecureRandom.php
@@ -24,7 +24,7 @@ class SecureRandom implements ISecureRandom {
* Generate a secure 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.
* @throws \LengthException if an invalid length is requested
*/
public function generate(
diff --git a/lib/private/Settings/Section.php b/lib/private/Settings/Section.php
index 4f8234254b1..9cc6523b9ae 100644
--- a/lib/private/Settings/Section.php
+++ b/lib/private/Settings/Section.php
@@ -32,7 +32,7 @@ class Section implements IIconSection {
/**
* @return string The ID of the section. It is supposed to be a lower case string,
- * e.g. 'ldap'
+ * e.g. 'ldap'
*/
public function getID() {
return $this->id;
@@ -40,7 +40,7 @@ class Section implements IIconSection {
/**
* @return string The translated name as it should be displayed, e.g. 'LDAP / AD
- * integration'. Use the L10N service to translate it.
+ * integration'. Use the L10N service to translate it.
*/
public function getName() {
return $this->name;
@@ -48,8 +48,8 @@ class Section implements 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
*/
@@ -59,7 +59,7 @@ class Section implements IIconSection {
/**
* @return string The relative path to an 16*16 icon describing the section.
- * e.g. '/core/img/places/files.svg'
+ * e.g. '/core/img/places/files.svg'
*
* @since 12
*/
diff --git a/lib/private/Setup.php b/lib/private/Setup.php
index 62db4879bbc..6212a561abb 100644
--- a/lib/private/Setup.php
+++ b/lib/private/Setup.php
@@ -147,7 +147,7 @@ class Setup {
* a few system checks.
*
* @return array of system info, including an "errors" value
- * in case of errors/warnings
+ * in case of errors/warnings
*/
public function getSystemInfo(bool $allowAllDatabases = false): array {
$databases = $this->getSupportedDatabases($allowAllDatabases);
@@ -230,7 +230,7 @@ class Setup {
$error[] = $l->t('Set an admin password.');
}
if (empty($options['directory'])) {
- $options['directory'] = \OC::$SERVERROOT . "/data";
+ $options['directory'] = \OC::$SERVERROOT . '/data';
}
if (!isset(self::$dbSetupClasses[$dbType])) {
@@ -248,7 +248,7 @@ class Setup {
// validate the data directory
if ((!is_dir($dataDir) && !mkdir($dataDir)) || !is_writable($dataDir)) {
- $error[] = $l->t("Cannot create or write into the data directory %s", [$dataDir]);
+ $error[] = $l->t('Cannot create or write into the data directory %s', [$dataDir]);
}
if (!empty($error)) {
@@ -392,7 +392,7 @@ class Setup {
$userSession->login($username, $password);
$user = $userSession->getUser();
if (!$user) {
- $error[] = "No account found in session.";
+ $error[] = 'No account found in session.';
return $error;
}
$userSession->createSessionToken($request, $user->getUID(), $username, $password);
@@ -509,7 +509,7 @@ class Setup {
$df = disk_free_space(\OC::$SERVERROOT);
$size = strlen($content) + 10240;
if ($df !== false && $df < (float)$size) {
- throw new \Exception(\OC::$SERVERROOT . " does not have enough space for writing the htaccess file! Not writing it back!");
+ throw new \Exception(\OC::$SERVERROOT . ' does not have enough space for writing the htaccess file! Not writing it back!');
}
}
//suppress errors in case we don't have permissions for it
@@ -542,7 +542,7 @@ class Setup {
$content .= "# Section for Apache 2.2 to 2.6\n";
$content .= "<IfModule mod_autoindex.c>\n";
$content .= " IndexIgnore *\n";
- $content .= "</IfModule>";
+ $content .= '</IfModule>';
$baseDir = Server::get(IConfig::class)->getSystemValueString('datadirectory', \OC::$SERVERROOT . '/data');
file_put_contents($baseDir . '/.htaccess', $content);
diff --git a/lib/private/Setup/AbstractDatabase.php b/lib/private/Setup/AbstractDatabase.php
index e96ca8a2f3e..b1d93f55cc0 100644
--- a/lib/private/Setup/AbstractDatabase.php
+++ b/lib/private/Setup/AbstractDatabase.php
@@ -50,14 +50,14 @@ abstract class AbstractDatabase {
public function validate($config) {
$errors = [];
if (empty($config['dbuser']) && empty($config['dbname'])) {
- $errors[] = $this->trans->t("Enter the database Login and name for %s", [$this->dbprettyname]);
+ $errors[] = $this->trans->t('Enter the database Login and name for %s', [$this->dbprettyname]);
} elseif (empty($config['dbuser'])) {
- $errors[] = $this->trans->t("Enter the database Login for %s", [$this->dbprettyname]);
+ $errors[] = $this->trans->t('Enter the database Login for %s', [$this->dbprettyname]);
} elseif (empty($config['dbname'])) {
- $errors[] = $this->trans->t("Enter the database name for %s", [$this->dbprettyname]);
+ $errors[] = $this->trans->t('Enter the database name for %s', [$this->dbprettyname]);
}
if (substr_count($config['dbname'], '.') >= 1) {
- $errors[] = $this->trans->t("You cannot use dots in the database name %s", [$this->dbprettyname]);
+ $errors[] = $this->trans->t('You cannot use dots in the database name %s', [$this->dbprettyname]);
}
return $errors;
}
@@ -70,9 +70,9 @@ abstract class AbstractDatabase {
$dbPort = !empty($config['dbport']) ? $config['dbport'] : '';
$dbTablePrefix = $config['dbtableprefix'] ?? 'oc_';
- $createUserConfig = $this->config->getValue("setup_create_db_user", true);
+ $createUserConfig = $this->config->getValue('setup_create_db_user', true);
// accept `false` both as bool and string, since setting config values from env will result in a string
- $this->tryCreateDbUser = $createUserConfig !== false && $createUserConfig !== "false";
+ $this->tryCreateDbUser = $createUserConfig !== false && $createUserConfig !== 'false';
$this->config->setValues([
'dbname' => $dbName,
@@ -133,7 +133,7 @@ abstract class AbstractDatabase {
abstract public function setupDatabase($username);
public function runMigrations(?IOutput $output = null) {
- if (!is_dir(\OC::$SERVERROOT."/core/Migrations")) {
+ if (!is_dir(\OC::$SERVERROOT.'/core/Migrations')) {
return;
}
$ms = new MigrationService('core', \OC::$server->get(Connection::class), $output);
diff --git a/lib/private/Setup/OCI.php b/lib/private/Setup/OCI.php
index 3a0fa34d8d1..47e5e5436a5 100644
--- a/lib/private/Setup/OCI.php
+++ b/lib/private/Setup/OCI.php
@@ -31,11 +31,11 @@ class OCI extends AbstractDatabase {
public function validate($config) {
$errors = [];
if (empty($config['dbuser']) && empty($config['dbname'])) {
- $errors[] = $this->trans->t("Enter the database Login and name for %s", [$this->dbprettyname]);
+ $errors[] = $this->trans->t('Enter the database Login and name for %s', [$this->dbprettyname]);
} elseif (empty($config['dbuser'])) {
- $errors[] = $this->trans->t("Enter the database Login for %s", [$this->dbprettyname]);
+ $errors[] = $this->trans->t('Enter the database Login for %s', [$this->dbprettyname]);
} elseif (empty($config['dbname'])) {
- $errors[] = $this->trans->t("Enter the database name for %s", [$this->dbprettyname]);
+ $errors[] = $this->trans->t('Enter the database name for %s', [$this->dbprettyname]);
}
return $errors;
}
diff --git a/lib/private/Setup/PostgreSQL.php b/lib/private/Setup/PostgreSQL.php
index 7d204bb6d16..73f2dfe0623 100644
--- a/lib/private/Setup/PostgreSQL.php
+++ b/lib/private/Setup/PostgreSQL.php
@@ -105,7 +105,7 @@ class PostgreSQL extends AbstractDatabase {
private function createDatabase(Connection $connection) {
if (!$this->databaseExists($connection)) {
//The database does not exists... let's create it
- $query = $connection->prepare("CREATE DATABASE " . addslashes($this->dbName) . " OWNER \"" . addslashes($this->dbUser) . '"');
+ $query = $connection->prepare('CREATE DATABASE ' . addslashes($this->dbName) . ' OWNER "' . addslashes($this->dbUser) . '"');
try {
$query->execute();
} catch (DatabaseException $e) {
@@ -114,7 +114,7 @@ class PostgreSQL extends AbstractDatabase {
]);
}
} else {
- $query = $connection->prepare("REVOKE ALL PRIVILEGES ON DATABASE " . addslashes($this->dbName) . " FROM PUBLIC");
+ $query = $connection->prepare('REVOKE ALL PRIVILEGES ON DATABASE ' . addslashes($this->dbName) . ' FROM PUBLIC');
try {
$query->execute();
} catch (DatabaseException $e) {
@@ -155,7 +155,7 @@ class PostgreSQL extends AbstractDatabase {
}
// create the user
- $query = $connection->prepare("CREATE USER \"" . addslashes($this->dbUser) . "\" CREATEDB PASSWORD '" . addslashes($this->dbPassword) . "'");
+ $query = $connection->prepare('CREATE USER "' . addslashes($this->dbUser) . "\" CREATEDB PASSWORD '" . addslashes($this->dbPassword) . "'");
$query->execute();
if ($this->databaseExists($connection)) {
$query = $connection->prepare('GRANT CONNECT ON DATABASE ' . addslashes($this->dbName) . ' TO "' . addslashes($this->dbUser) . '"');
diff --git a/lib/private/Share20/DefaultShareProvider.php b/lib/private/Share20/DefaultShareProvider.php
index 6d1d04d3c0b..99646b15acd 100644
--- a/lib/private/Share20/DefaultShareProvider.php
+++ b/lib/private/Share20/DefaultShareProvider.php
@@ -609,7 +609,7 @@ class DefaultShareProvider implements IShareProviderWithNotification, IShareProv
public function getSharesInFolder($userId, Folder $node, $reshares, $shallow = true) {
if (!$shallow) {
- throw new \Exception("non-shallow getSharesInFolder is no longer supported");
+ throw new \Exception('non-shallow getSharesInFolder is no longer supported');
}
$qb = $this->dbConn->getQueryBuilder();
@@ -773,7 +773,7 @@ class DefaultShareProvider implements IShareProviderWithNotification, IShareProv
// If the recipient is set for a group share resolve to that user
if ($recipientId !== null && $share->getShareType() === IShare::TYPE_GROUP) {
- $share = $this->resolveGroupShares([(int) $share->getId() => $share], $recipientId)[0];
+ $share = $this->resolveGroupShares([(int)$share->getId() => $share], $recipientId)[0];
}
return $share;
@@ -882,9 +882,9 @@ class DefaultShareProvider implements IShareProviderWithNotification, IShareProv
while ($data = $cursor->fetch()) {
if ($data['fileid'] && $data['path'] === null) {
- $data['path'] = (string) $data['path'];
- $data['name'] = (string) $data['name'];
- $data['checksum'] = (string) $data['checksum'];
+ $data['path'] = (string)$data['path'];
+ $data['name'] = (string)$data['name'];
+ $data['checksum'] = (string)$data['checksum'];
}
if ($this->isAccessibleResult($data)) {
$shares[] = $this->createShare($data);
@@ -1381,8 +1381,8 @@ class DefaultShareProvider implements IShareProviderWithNotification, IShareProv
protected function filterSharesOfUser(array $shares) {
// Group shares when the user has a share exception
foreach ($shares as $id => $share) {
- $type = (int) $share['share_type'];
- $permissions = (int) $share['permissions'];
+ $type = (int)$share['share_type'];
+ $permissions = (int)$share['permissions'];
if ($type === IShare::TYPE_USERGROUP) {
unset($shares[$share['parent']]);
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php
index 55e10602e72..3e085e08d7d 100644
--- a/lib/private/Share20/Manager.php
+++ b/lib/private/Share20/Manager.php
@@ -932,7 +932,7 @@ class Manager implements IManager {
*
* @param IShare $share the share to update its password.
* @param IShare $originalShare the original share to compare its
- * password with.
+ * password with.
* @return boolean whether the password was updated or not.
*/
private function updateSharePasswordIfNeeded(IShare $share, IShare $originalShare) {
@@ -1102,7 +1102,7 @@ class Manager implements IManager {
public function getSharesInFolder($userId, Folder $node, $reshares = false, $shallow = true) {
$providers = $this->factory->getAllProviders();
if (!$shallow) {
- throw new \Exception("non-shallow getSharesInFolder is no longer supported");
+ throw new \Exception('non-shallow getSharesInFolder is no longer supported');
}
return array_reduce($providers, function ($shares, IShareProvider $provider) use ($userId, $node, $reshares) {
diff --git a/lib/private/Share20/ProviderFactory.php b/lib/private/Share20/ProviderFactory.php
index 37af0482838..e1a2c9a5375 100644
--- a/lib/private/Share20/ProviderFactory.php
+++ b/lib/private/Share20/ProviderFactory.php
@@ -44,9 +44,9 @@ class ProviderFactory implements IProviderFactory {
private $defaultProvider = null;
/** @var FederatedShareProvider */
private $federatedProvider = null;
- /** @var ShareByMailProvider */
+ /** @var ShareByMailProvider */
private $shareByMailProvider;
- /** @var \OCA\Circles\ShareByCircleProvider */
+ /** @var \OCA\Circles\ShareByCircleProvider */
private $shareByCircleProvider = null;
/** @var bool */
private $circlesAreNotAvailable = false;
diff --git a/lib/private/Share20/Share.php b/lib/private/Share20/Share.php
index ac95e3ac0d4..b01d05ca4b9 100644
--- a/lib/private/Share20/Share.php
+++ b/lib/private/Share20/Share.php
@@ -191,7 +191,7 @@ class Share implements IShare {
}
if ($this->fileId === null) {
- throw new NotFoundException("Share source not found");
+ throw new NotFoundException('Share source not found');
} else {
return $this->fileId;
}
diff --git a/lib/private/Share20/ShareAttributes.php b/lib/private/Share20/ShareAttributes.php
index fbdcbf1ad26..96da1e336e3 100644
--- a/lib/private/Share20/ShareAttributes.php
+++ b/lib/private/Share20/ShareAttributes.php
@@ -47,9 +47,9 @@ class ShareAttributes implements IAttributes {
foreach ($this->attributes as $scope => $keys) {
foreach ($keys as $key => $value) {
$result[] = [
- "scope" => $scope,
- "key" => $key,
- "value" => $value,
+ 'scope' => $scope,
+ 'key' => $key,
+ 'value' => $value,
];
}
}
diff --git a/lib/private/Streamer.php b/lib/private/Streamer.php
index 4eca1105002..1f510f730ee 100644
--- a/lib/private/Streamer.php
+++ b/lib/private/Streamer.php
@@ -32,7 +32,7 @@ class Streamer {
* @param IRequest $request
* @param int|float $size The size of the files in bytes
* @param int $numberOfFiles The number of files (and directories) that will
- * be included in the streamed file
+ * be included in the streamed file
*/
public function __construct(IRequest $request, int|float $size, int $numberOfFiles) {
/**
diff --git a/lib/private/SystemTag/SystemTagObjectMapper.php b/lib/private/SystemTag/SystemTagObjectMapper.php
index 10117eebeaa..157948e6e0c 100644
--- a/lib/private/SystemTag/SystemTagObjectMapper.php
+++ b/lib/private/SystemTag/SystemTagObjectMapper.php
@@ -234,7 +234,7 @@ class SystemTagObjectMapper implements ISystemTagObjectMapper {
return ((int)$row[0] === \count($objIds));
}
- return (bool) $row;
+ return (bool)$row;
}
/**
diff --git a/lib/private/TagManager.php b/lib/private/TagManager.php
index 3258ce50bc5..f99653f2c05 100644
--- a/lib/private/TagManager.php
+++ b/lib/private/TagManager.php
@@ -43,7 +43,7 @@ class TagManager implements ITagManager, IEventListener {
* @param array $defaultTags An array of default tags to be used if none are stored.
* @param boolean $includeShared Whether to include tags for items shared with this user by others.
* @param string $userId user for which to retrieve the tags, defaults to the currently
- * logged in user
+ * logged in user
* @return \OCP\ITags
*
* since 20.0.0 $includeShared isn't used anymore
diff --git a/lib/private/Tags.php b/lib/private/Tags.php
index 420cabc36b9..20fd644132b 100644
--- a/lib/private/Tags.php
+++ b/lib/private/Tags.php
@@ -149,7 +149,7 @@ class Tags implements ITags {
*
* @param array $objIds array of object ids
* @return array|false of tags id as key to array of tag names
- * or false if an error occurred
+ * or false if an error occurred
*/
public function getTagsForObjects(array $objIds) {
$entries = [];
@@ -343,7 +343,7 @@ class Tags implements 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 tag(s) to add.
+ * the name(s) of the tag(s) to add.
* @param bool $sync When true, save the tags
* @param int|null $id int Optional object id to add to this|these tag(s)
* @return bool Returns false on error.
diff --git a/lib/private/Talk/Broker.php b/lib/private/Talk/Broker.php
index fc8e0280043..86e7e7ff4c1 100644
--- a/lib/private/Talk/Broker.php
+++ b/lib/private/Talk/Broker.php
@@ -47,7 +47,7 @@ class Broker implements IBroker {
$context = $this->coordinator->getRegistrationContext();
if ($context === null) {
// Backend requested too soon, e.g. from the bootstrap `register` method of an app
- throw new RuntimeException("Not all apps have been registered yet");
+ throw new RuntimeException('Not all apps have been registered yet');
}
$backendRegistration = $context->getTalkBackendRegistration();
if ($backendRegistration === null) {
@@ -63,7 +63,7 @@ class Broker implements IBroker {
// Remember and return
return $this->hasBackend = true;
} catch (Throwable $e) {
- $this->logger->error("Talk backend {class} could not be loaded: " . $e->getMessage(), [
+ $this->logger->error('Talk backend {class} could not be loaded: ' . $e->getMessage(), [
'class' => $backendRegistration->getService(),
'exception' => $e,
]);
@@ -81,7 +81,7 @@ class Broker implements IBroker {
array $moderators,
?IConversationOptions $options = null): IConversation {
if (!$this->hasBackend()) {
- throw new NoBackendException("The Talk broker has no registered backend");
+ throw new NoBackendException('The Talk broker has no registered backend');
}
return $this->backend->createConversation(
@@ -93,7 +93,7 @@ class Broker implements IBroker {
public function deleteConversation(string $id): void {
if (!$this->hasBackend()) {
- throw new NoBackendException("The Talk broker has no registered backend");
+ throw new NoBackendException('The Talk broker has no registered backend');
}
$this->backend->deleteConversation($id);
diff --git a/lib/private/TaskProcessing/Manager.php b/lib/private/TaskProcessing/Manager.php
index 37533df088f..51dcc7c94da 100644
--- a/lib/private/TaskProcessing/Manager.php
+++ b/lib/private/TaskProcessing/Manager.php
@@ -68,7 +68,7 @@ class Manager implements IManager {
public const LEGACY_PREFIX_TEXTTOIMAGE = 'legacy:TextToImage:';
public const LEGACY_PREFIX_SPEECHTOTEXT = 'legacy:SpeechToText:';
- /** @var list<IProvider>|null */
+ /** @var list<IProvider>|null */
private ?array $providers = null;
/**
@@ -1189,9 +1189,9 @@ class Manager implements IManager {
];
try {
$client->request($httpMethod, $uri, $options);
- } catch (ClientException | ServerException $e) {
+ } catch (ClientException|ServerException $e) {
$this->logger->warning('Task processing HTTP webhook failed for task ' . $task->getId() . '. Request failed', ['exception' => $e]);
- } catch (\Exception | \Throwable $e) {
+ } catch (\Exception|\Throwable $e) {
$this->logger->warning('Task processing HTTP webhook failed for task ' . $task->getId() . '. Unknown error', ['exception' => $e]);
}
} elseif (str_starts_with($method, 'AppAPI:') && str_starts_with($uri, '/')) {
diff --git a/lib/private/TempManager.php b/lib/private/TempManager.php
index 68a53f493db..74b4d6b1f24 100644
--- a/lib/private/TempManager.php
+++ b/lib/private/TempManager.php
@@ -138,7 +138,7 @@ class TempManager implements ITempManager {
\OC_Helper::rmdirr($file);
} catch (\UnexpectedValueException $ex) {
$this->log->warning(
- "Error deleting temporary file/folder: {file} - Reason: {error}",
+ 'Error deleting temporary file/folder: {file} - Reason: {error}',
[
'file' => $file,
'error' => $ex->getMessage(),
diff --git a/lib/private/Template/JSConfigHelper.php b/lib/private/Template/JSConfigHelper.php
index eb253042f19..55fb348f01b 100644
--- a/lib/private/Template/JSConfigHelper.php
+++ b/lib/private/Template/JSConfigHelper.php
@@ -160,16 +160,16 @@ class JSConfigHelper {
];
$array = [
- "_oc_debug" => $this->config->getSystemValue('debug', false) ? 'true' : 'false',
- "_oc_isadmin" => $uid !== null && $this->groupManager->isAdmin($uid) ? 'true' : 'false',
- "backendAllowsPasswordConfirmation" => $userBackendAllowsPasswordConfirmation ? 'true' : 'false',
- "oc_dataURL" => is_string($dataLocation) ? "\"" . $dataLocation . "\"" : 'false',
- "_oc_webroot" => "\"" . \OC::$WEBROOT . "\"",
- "_oc_appswebroots" => str_replace('\\/', '/', json_encode($apps_paths)), // Ugly unescape slashes waiting for better solution
- "datepickerFormatDate" => json_encode($this->l->l('jsdate', null)),
+ '_oc_debug' => $this->config->getSystemValue('debug', false) ? 'true' : 'false',
+ '_oc_isadmin' => $uid !== null && $this->groupManager->isAdmin($uid) ? 'true' : 'false',
+ 'backendAllowsPasswordConfirmation' => $userBackendAllowsPasswordConfirmation ? 'true' : 'false',
+ 'oc_dataURL' => is_string($dataLocation) ? '"' . $dataLocation . '"' : 'false',
+ '_oc_webroot' => '"' . \OC::$WEBROOT . '"',
+ '_oc_appswebroots' => str_replace('\\/', '/', json_encode($apps_paths)), // Ugly unescape slashes waiting for better solution
+ 'datepickerFormatDate' => json_encode($this->l->l('jsdate', null)),
'nc_lastLogin' => $lastConfirmTimestamp,
'nc_pageLoad' => time(),
- "dayNames" => json_encode([
+ 'dayNames' => json_encode([
$this->l->t('Sunday'),
$this->l->t('Monday'),
$this->l->t('Tuesday'),
@@ -178,7 +178,7 @@ class JSConfigHelper {
$this->l->t('Friday'),
$this->l->t('Saturday')
]),
- "dayNamesShort" => json_encode([
+ 'dayNamesShort' => json_encode([
$this->l->t('Sun.'),
$this->l->t('Mon.'),
$this->l->t('Tue.'),
@@ -187,7 +187,7 @@ class JSConfigHelper {
$this->l->t('Fri.'),
$this->l->t('Sat.')
]),
- "dayNamesMin" => json_encode([
+ 'dayNamesMin' => json_encode([
$this->l->t('Su'),
$this->l->t('Mo'),
$this->l->t('Tu'),
@@ -196,7 +196,7 @@ class JSConfigHelper {
$this->l->t('Fr'),
$this->l->t('Sa')
]),
- "monthNames" => json_encode([
+ 'monthNames' => json_encode([
$this->l->t('January'),
$this->l->t('February'),
$this->l->t('March'),
@@ -210,7 +210,7 @@ class JSConfigHelper {
$this->l->t('November'),
$this->l->t('December')
]),
- "monthNamesShort" => json_encode([
+ 'monthNamesShort' => json_encode([
$this->l->t('Jan.'),
$this->l->t('Feb.'),
$this->l->t('Mar.'),
@@ -224,9 +224,9 @@ class JSConfigHelper {
$this->l->t('Nov.'),
$this->l->t('Dec.')
]),
- "firstDay" => json_encode($firstDay),
- "_oc_config" => json_encode($config),
- "oc_appconfig" => json_encode([
+ 'firstDay' => json_encode($firstDay),
+ '_oc_config' => json_encode($config),
+ 'oc_appconfig' => json_encode([
'core' => [
'defaultExpireDateEnabled' => $defaultExpireDateEnabled,
'defaultExpireDate' => $defaultExpireDate,
@@ -246,7 +246,7 @@ class JSConfigHelper {
'defaultRemoteExpireDateEnforced' => $defaultRemoteExpireDateEnforced,
]
]),
- "_theme" => json_encode([
+ '_theme' => json_encode([
'entity' => $this->defaults->getEntity(),
'name' => $this->defaults->getName(),
'productName' => $this->defaults->getProductName(),
diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php
index fd6b7b27a97..2e397d2a3e2 100644
--- a/lib/private/TemplateLayout.php
+++ b/lib/private/TemplateLayout.php
@@ -309,7 +309,7 @@ class TemplateLayout extends \OC_Template {
protected function getVersionHashSuffix($path = false, $file = false) {
if ($this->config->getSystemValueBool('debug', false)) {
// allows chrome workspace mapping in debug mode
- return "";
+ return '';
}
$themingSuffix = '';
$v = [];
diff --git a/lib/private/TextProcessing/Manager.php b/lib/private/TextProcessing/Manager.php
index a03c028a5c9..4cc5ff77527 100644
--- a/lib/private/TextProcessing/Manager.php
+++ b/lib/private/TextProcessing/Manager.php
@@ -169,7 +169,7 @@ class Manager implements IManager {
throw new PreConditionNotMetException('No LanguageModel provider is installed that can handle this task');
}
[$provider,] = $this->getPreferredProviders($task);
- $maxExecutionTime = (int) ini_get('max_execution_time');
+ $maxExecutionTime = (int)ini_get('max_execution_time');
// Offload the task to a background job if the expected runtime of the likely provider is longer than 80% of our max execution time
// or if the provider doesn't provide a getExpectedRuntime() method
if (!$provider instanceof IProviderWithExpectedRuntime || $provider->getExpectedRuntime() > $maxExecutionTime * 0.8) {
diff --git a/lib/private/TextToImage/Manager.php b/lib/private/TextToImage/Manager.php
index 6ad3592a1b7..2d6cc6450a1 100644
--- a/lib/private/TextToImage/Manager.php
+++ b/lib/private/TextToImage/Manager.php
@@ -124,16 +124,16 @@ class Manager implements IManager {
$folder = $this->appData->newFolder('text2image');
}
try {
- $folder = $folder->getFolder((string) $task->getId());
+ $folder = $folder->getFolder((string)$task->getId());
} catch(NotFoundException) {
$this->logger->debug('Creating new folder in appdata Text2Image results folder');
- $folder = $folder->newFolder((string) $task->getId());
+ $folder = $folder->newFolder((string)$task->getId());
}
$this->logger->debug('Creating result files for Text2Image task');
$resources = [];
$files = [];
for ($i = 0; $i < $task->getNumberOfImages(); $i++) {
- $file = $folder->newFile((string) $i);
+ $file = $folder->newFile((string)$i);
$files[] = $file;
$resource = $file->write();
if ($resource !== false && $resource !== true && is_resource($resource)) {
@@ -216,7 +216,7 @@ class Manager implements IManager {
throw new PreConditionNotMetException('No text to image provider is installed that can handle this task');
}
$providers = $this->getPreferredProviders();
- $maxExecutionTime = (int) ini_get('max_execution_time');
+ $maxExecutionTime = (int)ini_get('max_execution_time');
// Offload the task to a background job if the expected runtime of the likely provider is longer than 80% of our max execution time
if ($providers[0]->getExpectedRuntime() > $maxExecutionTime * 0.8) {
$this->scheduleTask($task);
diff --git a/lib/private/URLGenerator.php b/lib/private/URLGenerator.php
index ab568a3296d..1ddc9aaa0e1 100644
--- a/lib/private/URLGenerator.php
+++ b/lib/private/URLGenerator.php
@@ -112,7 +112,7 @@ class URLGenerator implements IURLGenerator {
* @param string $appName 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
*
* Returns a url to the given app and file.
@@ -303,7 +303,7 @@ class URLGenerator implements IURLGenerator {
*/
public function getBaseUrl(): string {
// BaseUrl can be equal to 'http(s)://' during the first steps of the initial setup.
- if ($this->baseUrl === null || $this->baseUrl === "http://" || $this->baseUrl === "https://") {
+ if ($this->baseUrl === null || $this->baseUrl === 'http://' || $this->baseUrl === 'https://') {
$this->baseUrl = $this->request->getServerProtocol() . '://' . $this->request->getServerHost() . \OC::$WEBROOT;
}
return $this->baseUrl;
diff --git a/lib/private/Updater.php b/lib/private/Updater.php
index e26faf86f92..2722c172f1a 100644
--- a/lib/private/Updater.php
+++ b/lib/private/Updater.php
@@ -147,7 +147,7 @@ class Updater extends BasicEmitter {
// this should really be a JSON file
require \OC::$SERVERROOT . '/version.php';
/** @var string $vendor */
- return (string) $vendor;
+ return (string)$vendor;
}
/**
diff --git a/lib/private/Updater/VersionCheck.php b/lib/private/Updater/VersionCheck.php
index 9ad129db1a4..cc5ff63379c 100644
--- a/lib/private/Updater/VersionCheck.php
+++ b/lib/private/Updater/VersionCheck.php
@@ -61,7 +61,7 @@ class VersionCheck {
$version['php_minor'] = PHP_MINOR_VERSION;
$version['php_release'] = PHP_RELEASE_VERSION;
$version['category'] = $this->computeCategory();
- $version['isSubscriber'] = (int) $this->registry->delegateHasValidSubscription();
+ $version['isSubscriber'] = (int)$this->registry->delegateHasValidSubscription();
$versionString = implode('x', $version);
//fetch xml data from updater
diff --git a/lib/private/User/Database.php b/lib/private/User/Database.php
index bd6aa7ba2c2..a80cc39a732 100644
--- a/lib/private/User/Database.php
+++ b/lib/private/User/Database.php
@@ -108,7 +108,7 @@ class Database extends ABackend implements
// Repopulate the cache
$this->loadUser($uid);
- return (bool) $result;
+ return (bool)$result;
}, $this->dbConn);
}
diff --git a/lib/private/User/Manager.php b/lib/private/User/Manager.php
index 2c8cc10dc15..96be58a84a2 100644
--- a/lib/private/User/Manager.php
+++ b/lib/private/User/Manager.php
@@ -455,7 +455,7 @@ class Manager extends PublicEmitter implements IUserManager {
* returns how many users per backend exist (if supported by backend)
*
* @param boolean $hasLoggedIn when true only users that have a lastLogin
- * entry in the preferences table will be affected
+ * entry in the preferences table will be affected
* @return array<string, int> an array of backend class as key and count number as value
*/
public function countUsers() {
@@ -486,7 +486,7 @@ class Manager extends PublicEmitter implements IUserManager {
*
* @param IGroup[] $groups an array of gid to search in
* @return array|int an array of backend class as key and count number as value
- * if $hasLoggedIn is true only an int is returned
+ * if $hasLoggedIn is true only an int is returned
*/
public function countUsersOfGroups(array $groups) {
$users = [];
@@ -506,7 +506,7 @@ class Manager extends PublicEmitter implements IUserManager {
* @psalm-param \Closure(\OCP\IUser):?bool $callback
* @param string $search
* @param boolean $onlySeen when true only users that have a lastLogin entry
- * in the preferences table will be affected
+ * in the preferences table will be affected
* @since 9.0.0
*/
public function callForAllUsers(\Closure $callback, $search = '', $onlySeen = false) {
diff --git a/lib/private/User/User.php b/lib/private/User/User.php
index 6495b5cf276..6f7ceb08532 100644
--- a/lib/private/User/User.php
+++ b/lib/private/User/User.php
@@ -216,9 +216,9 @@ class User implements IUser {
*/
public function getLastLogin() {
if ($this->lastLogin === null) {
- $this->lastLogin = (int) $this->config->getUserValue($this->uid, 'login', 'lastLogin', 0);
+ $this->lastLogin = (int)$this->config->getUserValue($this->uid, 'login', 'lastLogin', 0);
}
- return (int) $this->lastLogin;
+ return (int)$this->lastLogin;
}
/**
diff --git a/lib/private/legacy/OC_App.php b/lib/private/legacy/OC_App.php
index 3347e4a6ec2..f48f4fd0b98 100644
--- a/lib/private/legacy/OC_App.php
+++ b/lib/private/legacy/OC_App.php
@@ -171,7 +171,7 @@ class OC_App {
*
* @param bool $forceRefresh whether to refresh the cache
* @param bool $all whether to return apps for all users, not only the
- * currently logged in one
+ * currently logged in one
* @return string[]
*/
public static function getEnabledApps(bool $forceRefresh = false, bool $all = false): array {
@@ -886,7 +886,7 @@ class OC_App {
} elseif ($englishFallback !== false) {
return $englishFallback;
}
- return (string) $fallback;
+ return (string)$fallback;
}
/**
diff --git a/lib/private/legacy/OC_Files.php b/lib/private/legacy/OC_Files.php
index 76d61a98558..07caba42ff2 100644
--- a/lib/private/legacy/OC_Files.php
+++ b/lib/private/legacy/OC_Files.php
@@ -43,7 +43,7 @@ class OC_Files {
OC_Response::setContentDispositionHeader($name, 'attachment');
header('Content-Transfer-Encoding: binary', true);
header('Expires: 0');
- header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
+ header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
$fileSize = \OC\Files\Filesystem::filesize($filename);
$type = \OC::$server->getMimeTypeDetector()->getSecureMimeType(\OC\Files\Filesystem::getMimeType($filename));
if ($fileSize > -1) {
@@ -334,8 +334,8 @@ class OC_Files {
foreach ($rangeArray as $range) {
echo "\r\n--".self::getBoundary()."\r\n".
- "Content-type: ".$type."\r\n".
- "Content-range: bytes ".$range['from']."-".$range['to']."/".$range['size']."\r\n\r\n";
+ 'Content-type: '.$type."\r\n".
+ 'Content-range: bytes '.$range['from'].'-'.$range['to'].'/'.$range['size']."\r\n\r\n";
$view->readfilePart($filename, $range['from'], $range['to']);
}
echo "\r\n--".self::getBoundary()."--\r\n";
diff --git a/lib/private/legacy/OC_Helper.php b/lib/private/legacy/OC_Helper.php
index 7db60363ff3..33cc966da2a 100644
--- a/lib/private/legacy/OC_Helper.php
+++ b/lib/private/legacy/OC_Helper.php
@@ -44,7 +44,7 @@ class OC_Helper {
*/
public static function humanFileSize(int|float $bytes): string {
if ($bytes < 0) {
- return "?";
+ return '?';
}
if ($bytes < 1024) {
return "$bytes B";
@@ -127,7 +127,7 @@ class OC_Helper {
}
$files = scandir($src);
foreach ($files as $file) {
- if ($file != "." && $file != "..") {
+ if ($file != '.' && $file != '..') {
self::copyr("$src/$file", "$dest/$file");
}
}
@@ -195,21 +195,21 @@ class OC_Helper {
* @param bool $path
* @internal param string $program name
* @internal param string $optional search path, defaults to $PATH
- * @return bool true if executable program found in path
+ * @return bool true if executable program found in path
*/
public static function canExecute($name, $path = false) {
// path defaults to PATH from environment if not set
if ($path === false) {
- $path = getenv("PATH");
+ $path = getenv('PATH');
}
// we look for an executable file of that name
- $exts = [""];
- $check_fn = "is_executable";
+ $exts = [''];
+ $check_fn = 'is_executable';
// Default check will be done with $path directories :
$dirs = explode(PATH_SEPARATOR, $path);
// WARNING : We have to check if open_basedir is enabled :
$obd = OC::$server->get(IniGetWrapper::class)->getString('open_basedir');
- if ($obd != "none") {
+ if ($obd != 'none') {
$obd_values = explode(PATH_SEPARATOR, $obd);
if (count($obd_values) > 0 and $obd_values[0]) {
// open_basedir is in effect !
@@ -516,13 +516,13 @@ class OC_Helper {
$free = 0.0;
}
} catch (\Exception $e) {
- if ($path === "") {
+ if ($path === '') {
throw $e;
}
/** @var LoggerInterface $logger */
$logger = \OC::$server->get(LoggerInterface::class);
- $logger->warning("Error while getting quota info, using root quota", ['exception' => $e]);
- $rootInfo = self::getStorageInfo("");
+ $logger->warning('Error while getting quota info, using root quota', ['exception' => $e]);
+ $rootInfo = self::getStorageInfo('');
$memcache->set($cacheKey, $rootInfo, 5 * 60);
return $rootInfo;
}
diff --git a/lib/private/legacy/OC_Hook.php b/lib/private/legacy/OC_Hook.php
index 2f6686f9126..5c36a253895 100644
--- a/lib/private/legacy/OC_Hook.php
+++ b/lib/private/legacy/OC_Hook.php
@@ -43,8 +43,8 @@ class OC_Hook {
}
// Connect the hook handler to the requested emitter
self::$registered[$signalClass][$signalName][] = [
- "class" => $slotClass,
- "name" => $slotName
+ 'class' => $slotClass,
+ 'name' => $slotName
];
// No chance for failure ;-)
@@ -79,7 +79,7 @@ class OC_Hook {
// Call all slots
foreach (self::$registered[$signalClass][$signalName] as $i) {
try {
- call_user_func([ $i["class"], $i["name"] ], $params);
+ call_user_func([ $i['class'], $i['name'] ], $params);
} catch (Exception $e) {
self::$thrownExceptions[] = $e;
\OC::$server->getLogger()->logException($e);
diff --git a/lib/private/legacy/OC_Image.php b/lib/private/legacy/OC_Image.php
index 1d2326dcce9..56fe96cda60 100644
--- a/lib/private/legacy/OC_Image.php
+++ b/lib/private/legacy/OC_Image.php
@@ -334,18 +334,18 @@ class OC_Image implements \OCP\IImage {
}
ob_start();
switch ($this->mimeType) {
- case "image/png":
+ case 'image/png':
$res = imagepng($this->resource);
break;
- case "image/jpeg":
+ case 'image/jpeg':
imageinterlace($this->resource, true);
$quality = $this->getJpegQuality();
$res = imagejpeg($this->resource, null, $quality);
break;
- case "image/gif":
+ case 'image/gif':
$res = imagegif($this->resource);
break;
- case "image/webp":
+ case 'image/webp':
$res = imagewebp($this->resource, null, $this->getWebpQuality());
break;
default:
@@ -370,24 +370,24 @@ class OC_Image implements \OCP\IImage {
* @return int
*/
protected function getJpegQuality(): int {
- $quality = $this->config->getAppValue('preview', 'jpeg_quality', (string) self::DEFAULT_JPEG_QUALITY);
+ $quality = $this->config->getAppValue('preview', 'jpeg_quality', (string)self::DEFAULT_JPEG_QUALITY);
// TODO: remove when getAppValue is type safe
if ($quality === null) {
$quality = self::DEFAULT_JPEG_QUALITY;
}
- return min(100, max(10, (int) $quality));
+ return min(100, max(10, (int)$quality));
}
/**
* @return int
*/
protected function getWebpQuality(): int {
- $quality = $this->config->getAppValue('preview', 'webp_quality', (string) self::DEFAULT_WEBP_QUALITY);
+ $quality = $this->config->getAppValue('preview', 'webp_quality', (string)self::DEFAULT_WEBP_QUALITY);
// TODO: remove when getAppValue is type safe
if ($quality === null) {
$quality = self::DEFAULT_WEBP_QUALITY;
}
- return min(100, max(10, (int) $quality));
+ return min(100, max(10, (int)$quality));
}
/**
@@ -954,10 +954,10 @@ class OC_Image implements \OCP\IImage {
$width = $height = min($widthOrig, $heightOrig);
if ($ratioOrig > 1) {
- $x = (int) (($widthOrig / 2) - ($width / 2));
+ $x = (int)(($widthOrig / 2) - ($width / 2));
$y = 0;
} else {
- $y = (int) (($heightOrig / 2) - ($height / 2));
+ $y = (int)(($heightOrig / 2) - ($height / 2));
$x = 0;
}
if ($size > 0) {
diff --git a/lib/private/legacy/OC_Template.php b/lib/private/legacy/OC_Template.php
index e3e9a7abc5f..422709cec7d 100644
--- a/lib/private/legacy/OC_Template.php
+++ b/lib/private/legacy/OC_Template.php
@@ -95,7 +95,7 @@ class OC_Template extends \OC\Template\Base {
* @param string $tag tag name of the element
* @param array $attributes array of attributes for the element
* @param string $text the text content for the element. If $text is null then the
- * element will be written as empty element. So use "" to get a closing tag.
+ * element will be written as empty element. So use "" to get a closing tag.
*/
public function addHeader($tag, $attributes, $text = null) {
$this->headers[] = [
@@ -172,7 +172,7 @@ class OC_Template extends \OC\Template\Base {
* @return boolean|null
*/
public static function printUserPage($application, $name, $parameters = []) {
- $content = new OC_Template($application, $name, "user");
+ $content = new OC_Template($application, $name, 'user');
foreach ($parameters as $key => $value) {
$content->assign($key, $value);
}
@@ -187,7 +187,7 @@ class OC_Template extends \OC\Template\Base {
* @return bool
*/
public static function printAdminPage($application, $name, $parameters = []) {
- $content = new OC_Template($application, $name, "admin");
+ $content = new OC_Template($application, $name, 'admin');
foreach ($parameters as $key => $value) {
$content->assign($key, $value);
}
diff --git a/lib/private/legacy/OC_User.php b/lib/private/legacy/OC_User.php
index d2978f6ad21..b8a00de84cc 100644
--- a/lib/private/legacy/OC_User.php
+++ b/lib/private/legacy/OC_User.php
@@ -142,7 +142,7 @@ class OC_User {
public static function loginWithApache(\OCP\Authentication\IApacheBackend $backend) {
$uid = $backend->getCurrentUserId();
$run = true;
- OC_Hook::emit("OC_User", "pre_login", ["run" => &$run, "uid" => $uid, 'backend' => $backend]);
+ OC_Hook::emit('OC_User', 'pre_login', ['run' => &$run, 'uid' => $uid, 'backend' => $backend]);
if ($uid) {
if (self::getUser() !== $uid) {
@@ -213,9 +213,9 @@ class OC_User {
* Verify with Apache whether user is authenticated.
*
* @return boolean|null
- * true: authenticated
- * false: not authenticated
- * null: not handled / no backend available
+ * true: authenticated
+ * false: not authenticated
+ * null: not handled / no backend available
*/
public static function handleApacheAuth() {
$backend = self::findFirstActiveUsedBackend();
diff --git a/lib/private/legacy/OC_Util.php b/lib/private/legacy/OC_Util.php
index 3b5222fee64..84bb0b645d5 100644
--- a/lib/private/legacy/OC_Util.php
+++ b/lib/private/legacy/OC_Util.php
@@ -296,7 +296,7 @@ class OC_Util {
private static function generatePath($application, $directory, $file) {
if (is_null($file)) {
$file = $application;
- $application = "";
+ $application = '';
}
if (!empty($application)) {
return "$application/$directory/$file";
@@ -322,7 +322,7 @@ class OC_Util {
if ($application !== 'core' && $file !== null) {
self::addTranslations($application);
}
- self::addExternalResource($application, $prepend, $path, "script");
+ self::addExternalResource($application, $prepend, $path, 'script');
}
/**
@@ -335,7 +335,7 @@ class OC_Util {
*/
public static function addVendorScript($application, $file = null, $prepend = false) {
$path = OC_Util::generatePath($application, 'vendor', $file);
- self::addExternalResource($application, $prepend, $path, "script");
+ self::addExternalResource($application, $prepend, $path, 'script');
}
/**
@@ -356,7 +356,7 @@ class OC_Util {
} else {
$path = "l10n/$languageCode";
}
- self::addExternalResource($application, $prepend, $path, "script");
+ self::addExternalResource($application, $prepend, $path, 'script');
}
/**
@@ -369,7 +369,7 @@ class OC_Util {
*/
public static function addStyle($application, $file = null, $prepend = false) {
$path = OC_Util::generatePath($application, 'css', $file);
- self::addExternalResource($application, $prepend, $path, "style");
+ self::addExternalResource($application, $prepend, $path, 'style');
}
/**
@@ -382,7 +382,7 @@ class OC_Util {
*/
public static function addVendorStyle($application, $file = null, $prepend = false) {
$path = OC_Util::generatePath($application, 'vendor', $file);
- self::addExternalResource($application, $prepend, $path, "style");
+ self::addExternalResource($application, $prepend, $path, 'style');
}
/**
@@ -394,8 +394,8 @@ class OC_Util {
* @param string $type (script or style)
* @return void
*/
- private static function addExternalResource($application, $prepend, $path, $type = "script") {
- if ($type === "style") {
+ private static function addExternalResource($application, $prepend, $path, $type = 'script') {
+ if ($type === 'style') {
if (!in_array($path, self::$styles)) {
if ($prepend === true) {
array_unshift(self::$styles, $path);
@@ -403,7 +403,7 @@ class OC_Util {
self::$styles[] = $path;
}
}
- } elseif ($type === "script") {
+ } elseif ($type === 'script') {
if (!in_array($path, self::$scripts)) {
if ($prepend === true) {
array_unshift(self::$scripts, $path);
@@ -991,7 +991,7 @@ class OC_Util {
* @return string the theme
*/
public static function getTheme() {
- $theme = \OC::$server->getSystemConfig()->getValue("theme", '');
+ $theme = \OC::$server->getSystemConfig()->getValue('theme', '');
if ($theme === '') {
if (is_dir(OC::$SERVERROOT . '/themes/default')) {
diff --git a/lib/private/legacy/template/functions.php b/lib/private/legacy/template/functions.php
index 84ada2aa6d8..87b91639fd3 100644
--- a/lib/private/legacy/template/functions.php
+++ b/lib/private/legacy/template/functions.php
@@ -102,7 +102,7 @@ function print_unescaped($string) {
*
* @param string $app the appname
* @param string|string[] $file the filename,
- * if an array is given it will add all scripts
+ * if an array is given it will add all scripts
*/
function script($app, $file = null) {
if (is_array($file)) {
@@ -118,7 +118,7 @@ function script($app, $file = null) {
* Shortcut for adding vendor scripts to a page
* @param string $app the appname
* @param string|string[] $file the filename,
- * if an array is given it will add all scripts
+ * if an array is given it will add all scripts
*/
function vendor_script($app, $file = null) {
if (is_array($file)) {
@@ -134,7 +134,7 @@ function vendor_script($app, $file = null) {
* Shortcut for adding styles to a page
* @param string $app the appname
* @param string|string[] $file the filename,
- * if an array is given it will add all styles
+ * if an array is given it will add all styles
*/
function style($app, $file = null) {
if (is_array($file)) {
@@ -150,7 +150,7 @@ function style($app, $file = null) {
* Shortcut for adding vendor styles to a page
* @param string $app the appname
* @param string|string[] $file the filename,
- * if an array is given it will add all styles
+ * if an array is given it will add all styles
*/
function vendor_style($app, $file = null) {
if (is_array($file)) {
@@ -165,7 +165,7 @@ function vendor_style($app, $file = null) {
/**
* Shortcut for adding translations to a page
* @param string $app the appname
- * if an array is given it will add all styles
+ * if an array is given it will add all styles
*/
function translation($app) {
OC_Util::addTranslations($app);
@@ -175,7 +175,7 @@ function translation($app) {
* Shortcut for HTML imports
* @param string $app the appname
* @param string|string[] $file the path relative to the app's component folder,
- * if an array is given it will add all components
+ * if an array is given it will add all components
*/
function component($app, $file) {
if (is_array($file)) {
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) {