aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorprovokateurin <kate@provokateurin.de>2024-09-19 11:10:31 +0200
committerprovokateurin <kate@provokateurin.de>2024-09-19 14:21:20 +0200
commit9836e9b16484582d309c8437ab46d82e34956941 (patch)
treed3da87bb7dfd1a8877ed25072ecf609def844089 /lib/private
parent8c60ffa0f21414e6e671c567d664a9b9e5253e26 (diff)
downloadnextcloud-server-9836e9b16484582d309c8437ab46d82e34956941.tar.gz
nextcloud-server-9836e9b16484582d309c8437ab46d82e34956941.zip
chore(deps): Update nextcloud/coding-standard to v1.3.1
Signed-off-by: provokateurin <kate@provokateurin.de>
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Activity/ActivitySettingsAdapter.php2
-rw-r--r--lib/private/AllConfig.php2
-rw-r--r--lib/private/App/AppStore/Fetcher/AppDiscoverFetcher.php2
-rw-r--r--lib/private/App/AppStore/Fetcher/AppFetcher.php3
-rw-r--r--lib/private/AppConfig.php24
-rw-r--r--lib/private/AppFramework/Http/Request.php4
-rw-r--r--lib/private/AppFramework/Middleware/PublicShare/PublicShareMiddleware.php2
-rw-r--r--lib/private/AppFramework/Middleware/Security/CORSMiddleware.php5
-rw-r--r--lib/private/AppFramework/Middleware/Security/PasswordConfirmationMiddleware.php3
-rw-r--r--lib/private/AppFramework/Services/AppConfig.php10
-rw-r--r--lib/private/Archive/Archive.php6
-rw-r--r--lib/private/Archive/ZIP.php8
-rw-r--r--lib/private/Authentication/Login/Chain.php2
-rw-r--r--lib/private/Authentication/Login/WebAuthnChain.php2
-rw-r--r--lib/private/Authentication/WebAuthn/Manager.php2
-rw-r--r--lib/private/Avatar/Avatar.php2
-rw-r--r--lib/private/Avatar/UserAvatar.php2
-rw-r--r--lib/private/BackgroundJob/JobList.php2
-rw-r--r--lib/private/Collaboration/Collaborators/LookupPlugin.php2
-rw-r--r--lib/private/Collaboration/Resources/Collection.php2
-rw-r--r--lib/private/Collaboration/Resources/Resource.php2
-rw-r--r--lib/private/Comments/Comment.php2
-rw-r--r--lib/private/Comments/Manager.php10
-rw-r--r--lib/private/Config.php6
-rw-r--r--lib/private/Console/Application.php2
-rw-r--r--lib/private/Contacts/ContactsMenu/ContactsStore.php2
-rw-r--r--lib/private/DB/Adapter.php2
-rw-r--r--lib/private/DB/AdapterMySQL.php2
-rw-r--r--lib/private/DB/AdapterSqlite.php2
-rw-r--r--lib/private/DB/Connection.php8
-rw-r--r--lib/private/DB/DbDataCollector.php2
-rw-r--r--lib/private/DB/MigrationService.php2
-rw-r--r--lib/private/DB/MigratorExecuteSqlEvent.php2
-rw-r--r--lib/private/DB/QueryBuilder/CompositeExpression.php2
-rw-r--r--lib/private/DB/QueryBuilder/FunctionBuilder/OCIFunctionBuilder.php2
-rw-r--r--lib/private/DB/QueryBuilder/Partitioned/PartitionedResult.php2
-rw-r--r--lib/private/DB/QueryBuilder/Sharded/CrossShardMoveHelper.php2
-rw-r--r--lib/private/DirectEditing/Manager.php2
-rw-r--r--lib/private/Encryption/DecryptAll.php2
-rw-r--r--lib/private/Encryption/EncryptionWrapper.php2
-rw-r--r--lib/private/Encryption/Exceptions/EncryptionHeaderKeyExistsException.php2
-rw-r--r--lib/private/Encryption/Keys/Storage.php4
-rw-r--r--lib/private/Encryption/Update.php2
-rw-r--r--lib/private/EventSource.php4
-rw-r--r--lib/private/Federation/CloudFederationProviderManager.php2
-rw-r--r--lib/private/Federation/CloudFederationShare.php2
-rw-r--r--lib/private/Federation/CloudIdManager.php2
-rw-r--r--lib/private/Files/Cache/QuerySearchHelper.php2
-rw-r--r--lib/private/Files/Cache/Scanner.php2
-rw-r--r--lib/private/Files/Cache/SearchBuilder.php8
-rw-r--r--lib/private/Files/Config/CachedMountFileInfo.php2
-rw-r--r--lib/private/Files/Config/CachedMountInfo.php2
-rw-r--r--lib/private/Files/Config/MountProviderCollection.php2
-rw-r--r--lib/private/Files/Config/UserMountCache.php2
-rw-r--r--lib/private/Files/Mount/HomeMountPoint.php2
-rw-r--r--lib/private/Files/Mount/Manager.php2
-rw-r--r--lib/private/Files/Mount/MountPoint.php2
-rw-r--r--lib/private/Files/Node/HookConnector.php2
-rw-r--r--lib/private/Files/ObjectStore/ObjectStoreStorage.php4
-rw-r--r--lib/private/Files/ObjectStore/S3Signature.php8
-rw-r--r--lib/private/Files/Search/SearchComparison.php2
-rw-r--r--lib/private/Files/Search/SearchOrder.php2
-rw-r--r--lib/private/Files/Search/SearchQuery.php2
-rw-r--r--lib/private/Files/SetupManager.php6
-rw-r--r--lib/private/Files/Storage/CommonTest.php2
-rw-r--r--lib/private/Files/Storage/DAV.php4
-rw-r--r--lib/private/Files/Storage/Wrapper/Encryption.php10
-rw-r--r--lib/private/Files/Template/TemplateManager.php2
-rw-r--r--lib/private/FilesMetadata/FilesMetadataManager.php6
-rw-r--r--lib/private/FilesMetadata/Job/UpdateSingleMetadata.php2
-rw-r--r--lib/private/FilesMetadata/Listener/MetadataDelete.php2
-rw-r--r--lib/private/FilesMetadata/Listener/MetadataUpdate.php2
-rw-r--r--lib/private/FilesMetadata/MetadataQuery.php2
-rw-r--r--lib/private/FilesMetadata/Model/FilesMetadata.php2
-rw-r--r--lib/private/FilesMetadata/Service/IndexRequestService.php2
-rw-r--r--lib/private/FilesMetadata/Service/MetadataRequestService.php2
-rw-r--r--lib/private/Group/Manager.php2
-rw-r--r--lib/private/Group/MetaData.php2
-rw-r--r--lib/private/Http/Client/Client.php4
-rw-r--r--lib/private/Http/Client/DnsPinMiddleware.php6
-rw-r--r--lib/private/InitialStateService.php4
-rw-r--r--lib/private/Installer.php20
-rw-r--r--lib/private/IntegrityCheck/Checker.php4
-rw-r--r--lib/private/L10N/Factory.php2
-rw-r--r--lib/private/Lock/AbstractLockingProvider.php4
-rw-r--r--lib/private/Lock/DBLockingProvider.php2
-rw-r--r--lib/private/Log.php2
-rw-r--r--lib/private/Log/Errorlog.php2
-rw-r--r--lib/private/Log/File.php6
-rw-r--r--lib/private/Log/LogFactory.php2
-rw-r--r--lib/private/Log/Rotate.php2
-rw-r--r--lib/private/Log/Systemdlog.php4
-rw-r--r--lib/private/Mail/Attachment.php2
-rw-r--r--lib/private/Mail/Provider/Manager.php6
-rw-r--r--lib/private/Memcache/Factory.php2
-rw-r--r--lib/private/MemoryInfo.php2
-rw-r--r--lib/private/Migration/MetadataManager.php2
-rw-r--r--lib/private/NaturalSort.php2
-rw-r--r--lib/private/NavigationManager.php2
-rw-r--r--lib/private/OCS/DiscoveryService.php2
-rw-r--r--lib/private/OCS/Provider.php6
-rw-r--r--lib/private/Preview/BackgroundCleanupJob.php2
-rw-r--r--lib/private/Preview/Generator.php2
-rw-r--r--lib/private/Preview/MimeIconProvider.php4
-rw-r--r--lib/private/PreviewManager.php2
-rw-r--r--lib/private/Profiler/FileProfilerStorage.php14
-rw-r--r--lib/private/Repair.php2
-rw-r--r--lib/private/Repair/Collation.php2
-rw-r--r--lib/private/Repair/Events/RepairAdvanceEvent.php2
-rw-r--r--lib/private/Repair/Events/RepairErrorEvent.php2
-rw-r--r--lib/private/Repair/Events/RepairInfoEvent.php2
-rw-r--r--lib/private/Repair/Events/RepairStartEvent.php2
-rw-r--r--lib/private/Repair/Events/RepairStepEvent.php2
-rw-r--r--lib/private/Repair/Events/RepairWarningEvent.php2
-rw-r--r--lib/private/Repair/RepairDavShares.php2
-rw-r--r--lib/private/Repair/RepairMimeTypes.php2
-rw-r--r--lib/private/RichObjectStrings/Validator.php2
-rw-r--r--lib/private/Route/Router.php2
-rw-r--r--lib/private/Search/Filter/BooleanFilter.php2
-rw-r--r--lib/private/Search/Filter/DateTimeFilter.php2
-rw-r--r--lib/private/Search/Filter/FloatFilter.php2
-rw-r--r--lib/private/Search/Filter/GroupFilter.php2
-rw-r--r--lib/private/Search/Filter/IntegerFilter.php2
-rw-r--r--lib/private/Search/Filter/UserFilter.php2
-rw-r--r--lib/private/Search/FilterFactory.php2
-rw-r--r--lib/private/Search/SearchComposer.php10
-rw-r--r--lib/private/Search/UnsupportedFilter.php2
-rw-r--r--lib/private/Security/Bruteforce/Backend/MemoryCacheBackend.php2
-rw-r--r--lib/private/Security/CSP/ContentSecurityPolicyManager.php6
-rw-r--r--lib/private/Security/Crypto.php4
-rw-r--r--lib/private/Security/Hasher.php2
-rw-r--r--lib/private/Security/Normalizer/IpAddress.php6
-rw-r--r--lib/private/Security/RateLimiting/Backend/DatabaseBackend.php4
-rw-r--r--lib/private/Security/VerificationToken/VerificationToken.php10
-rw-r--r--lib/private/Settings/Manager.php2
-rw-r--r--lib/private/Setup.php8
-rw-r--r--lib/private/Setup/AbstractDatabase.php2
-rw-r--r--lib/private/Setup/MySQL.php2
-rw-r--r--lib/private/SetupCheck/SetupCheckManager.php4
-rw-r--r--lib/private/Share/Share.php4
-rw-r--r--lib/private/Share20/Manager.php4
-rw-r--r--lib/private/SystemTag/SystemTagManager.php8
-rw-r--r--lib/private/SystemTag/SystemTagsInFilesDetector.php2
-rw-r--r--lib/private/Tags.php4
-rw-r--r--lib/private/TaskProcessing/Db/Task.php2
-rw-r--r--lib/private/TaskProcessing/Manager.php8
-rw-r--r--lib/private/Teams/TeamManager.php2
-rw-r--r--lib/private/Template/Base.php14
-rw-r--r--lib/private/Template/CSSResourceLocator.php14
-rw-r--r--lib/private/Template/JSConfigHelper.php2
-rw-r--r--lib/private/Template/JSResourceLocator.php30
-rwxr-xr-xlib/private/Template/ResourceLocator.php2
-rw-r--r--lib/private/Template/TemplateFileLocator.php4
-rw-r--r--lib/private/TemplateLayout.php8
-rw-r--r--lib/private/TextProcessing/Db/Task.php2
-rw-r--r--lib/private/TextProcessing/Manager.php4
-rw-r--r--lib/private/TextProcessing/RemoveOldTasksBackgroundJob.php1
-rw-r--r--lib/private/TextToImage/Db/Task.php2
-rw-r--r--lib/private/TextToImage/Db/TaskMapper.php2
-rw-r--r--lib/private/TextToImage/Manager.php6
-rw-r--r--lib/private/URLGenerator.php8
-rw-r--r--lib/private/Updater.php22
-rw-r--r--lib/private/User/Manager.php2
-rw-r--r--lib/private/User/OutOfOfficeData.php6
-rw-r--r--lib/private/User/User.php2
-rw-r--r--lib/private/legacy/OC_App.php2
-rw-r--r--lib/private/legacy/OC_Defaults.php4
-rw-r--r--lib/private/legacy/OC_Files.php12
-rw-r--r--lib/private/legacy/OC_Helper.php2
-rw-r--r--lib/private/legacy/OC_JSON.php2
-rw-r--r--lib/private/legacy/OC_Response.php4
-rw-r--r--lib/private/legacy/OC_Template.php10
-rw-r--r--lib/private/legacy/OC_Util.php4
-rw-r--r--lib/private/legacy/template/functions.php14
174 files changed, 350 insertions, 342 deletions
diff --git a/lib/private/Activity/ActivitySettingsAdapter.php b/lib/private/Activity/ActivitySettingsAdapter.php
index 5579685ccb8..27c85ee5554 100644
--- a/lib/private/Activity/ActivitySettingsAdapter.php
+++ b/lib/private/Activity/ActivitySettingsAdapter.php
@@ -19,7 +19,7 @@ use OCP\IL10N;
class ActivitySettingsAdapter extends ActivitySettings {
public function __construct(
private ISetting $oldSettings,
- private IL10N $l10n
+ private IL10N $l10n,
) {
}
diff --git a/lib/private/AllConfig.php b/lib/private/AllConfig.php
index f08e5125a47..46b53e3c1b2 100644
--- a/lib/private/AllConfig.php
+++ b/lib/private/AllConfig.php
@@ -41,7 +41,7 @@ class AllConfig implements IConfig {
private CappedMemoryCache $userCache;
public function __construct(
- private SystemConfig $systemConfig
+ private SystemConfig $systemConfig,
) {
$this->userCache = new CappedMemoryCache();
}
diff --git a/lib/private/App/AppStore/Fetcher/AppDiscoverFetcher.php b/lib/private/App/AppStore/Fetcher/AppDiscoverFetcher.php
index 1174c7d240b..2537d1dcec9 100644
--- a/lib/private/App/AppStore/Fetcher/AppDiscoverFetcher.php
+++ b/lib/private/App/AppStore/Fetcher/AppDiscoverFetcher.php
@@ -81,7 +81,7 @@ class AppDiscoverFetcher extends Fetcher {
});
}
- public function getETag(): string|null {
+ public function getETag(): ?string {
$rootFolder = $this->appData->getFolder('/');
try {
diff --git a/lib/private/App/AppStore/Fetcher/AppFetcher.php b/lib/private/App/AppStore/Fetcher/AppFetcher.php
index e7ab2f9c377..352646c3f5e 100644
--- a/lib/private/App/AppStore/Fetcher/AppFetcher.php
+++ b/lib/private/App/AppStore/Fetcher/AppFetcher.php
@@ -18,7 +18,8 @@ class AppFetcher extends Fetcher {
/** @var bool */
private $ignoreMaxVersion;
- public function __construct(Factory $appDataFactory,
+ public function __construct(
+ Factory $appDataFactory,
IClientService $clientService,
ITimeFactory $timeFactory,
IConfig $config,
diff --git a/lib/private/AppConfig.php b/lib/private/AppConfig.php
index f6361ff2ac6..828d83bc67a 100644
--- a/lib/private/AppConfig.php
+++ b/lib/private/AppConfig.php
@@ -281,7 +281,7 @@ class AppConfig implements IAppConfig {
string $app,
string $key,
string $default = '',
- ?bool $lazy = false
+ ?bool $lazy = false,
): string {
try {
$lazy = ($lazy === null) ? $this->isLazy($app, $key) : $lazy;
@@ -316,7 +316,7 @@ class AppConfig implements IAppConfig {
string $app,
string $key,
string $default = '',
- bool $lazy = false
+ bool $lazy = false,
): string {
return $this->getTypedValue($app, $key, $default, $lazy, self::VALUE_STRING);
}
@@ -339,7 +339,7 @@ class AppConfig implements IAppConfig {
string $app,
string $key,
int $default = 0,
- bool $lazy = false
+ bool $lazy = false,
): int {
return (int)$this->getTypedValue($app, $key, (string)$default, $lazy, self::VALUE_INT);
}
@@ -399,7 +399,7 @@ class AppConfig implements IAppConfig {
string $app,
string $key,
array $default = [],
- bool $lazy = false
+ bool $lazy = false,
): array {
try {
$defaultJson = json_encode($default, JSON_THROW_ON_ERROR);
@@ -427,7 +427,7 @@ class AppConfig implements IAppConfig {
string $key,
string $default,
bool $lazy,
- int $type
+ int $type,
): string {
$this->assertParams($app, $key, valueType: $type);
$this->loadConfig($lazy);
@@ -526,7 +526,7 @@ class AppConfig implements IAppConfig {
string $key,
string $value,
bool $lazy = false,
- bool $sensitive = false
+ bool $sensitive = false,
): bool {
return $this->setTypedValue(
$app,
@@ -557,7 +557,7 @@ class AppConfig implements IAppConfig {
string $key,
string $value,
bool $lazy = false,
- bool $sensitive = false
+ bool $sensitive = false,
): bool {
return $this->setTypedValue(
$app,
@@ -587,7 +587,7 @@ class AppConfig implements IAppConfig {
string $key,
int $value,
bool $lazy = false,
- bool $sensitive = false
+ bool $sensitive = false,
): bool {
if ($value > 2000000000) {
$this->logger->debug('You are trying to store an integer value around/above 2,147,483,647. This is a reminder that reaching this theoretical limit on 32 bits system will throw an exception.');
@@ -621,7 +621,7 @@ class AppConfig implements IAppConfig {
string $key,
float $value,
bool $lazy = false,
- bool $sensitive = false
+ bool $sensitive = false,
): bool {
return $this->setTypedValue(
$app,
@@ -649,7 +649,7 @@ class AppConfig implements IAppConfig {
string $app,
string $key,
bool $value,
- bool $lazy = false
+ bool $lazy = false,
): bool {
return $this->setTypedValue(
$app,
@@ -680,7 +680,7 @@ class AppConfig implements IAppConfig {
string $key,
array $value,
bool $lazy = false,
- bool $sensitive = false
+ bool $sensitive = false,
): bool {
try {
return $this->setTypedValue(
@@ -718,7 +718,7 @@ class AppConfig implements IAppConfig {
string $key,
string $value,
bool $lazy,
- int $type
+ int $type,
): bool {
$this->assertParams($app, $key);
$this->loadConfig($lazy);
diff --git a/lib/private/AppFramework/Http/Request.php b/lib/private/AppFramework/Http/Request.php
index 4bbeabb7aae..d177221556c 100644
--- a/lib/private/AppFramework/Http/Request.php
+++ b/lib/private/AppFramework/Http/Request.php
@@ -484,7 +484,7 @@ class Request implements \ArrayAccess, \Countable, IRequest {
$prefix = '__Host-';
}
- return $prefix.$name;
+ return $prefix . $name;
}
/**
@@ -606,7 +606,7 @@ class Request implements \ArrayAccess, \Countable, IRequest {
* @return bool
*/
private function isOverwriteCondition(): bool {
- $regex = '/' . $this->config->getSystemValueString('overwritecondaddr', '') . '/';
+ $regex = '/' . $this->config->getSystemValueString('overwritecondaddr', '') . '/';
$remoteAddr = isset($this->server['REMOTE_ADDR']) ? $this->server['REMOTE_ADDR'] : '';
return $regex === '//' || preg_match($regex, $remoteAddr) === 1;
}
diff --git a/lib/private/AppFramework/Middleware/PublicShare/PublicShareMiddleware.php b/lib/private/AppFramework/Middleware/PublicShare/PublicShareMiddleware.php
index 34291dfef10..2b3025fccff 100644
--- a/lib/private/AppFramework/Middleware/PublicShare/PublicShareMiddleware.php
+++ b/lib/private/AppFramework/Middleware/PublicShare/PublicShareMiddleware.php
@@ -24,7 +24,7 @@ class PublicShareMiddleware extends Middleware {
private IRequest $request,
private ISession $session,
private IConfig $config,
- private IThrottler $throttler
+ private IThrottler $throttler,
) {
}
diff --git a/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php b/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php
index 10c8f8c7aee..d8f00f31096 100644
--- a/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php
+++ b/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php
@@ -40,7 +40,8 @@ class CORSMiddleware extends Middleware {
/** @var IThrottler */
private $throttler;
- public function __construct(IRequest $request,
+ public function __construct(
+ IRequest $request,
ControllerMethodReflector $reflector,
Session $session,
IThrottler $throttler,
@@ -135,7 +136,7 @@ class CORSMiddleware extends Middleware {
foreach ($response->getHeaders() as $header => $value) {
if (strtolower($header) === 'access-control-allow-credentials' &&
strtolower(trim($value)) === 'true') {
- $msg = 'Access-Control-Allow-Credentials must not be '.
+ $msg = 'Access-Control-Allow-Credentials must not be ' .
'set to true in order to prevent CSRF';
throw new SecurityException($msg);
}
diff --git a/lib/private/AppFramework/Middleware/Security/PasswordConfirmationMiddleware.php b/lib/private/AppFramework/Middleware/Security/PasswordConfirmationMiddleware.php
index 34933e13ecd..f5416ff652a 100644
--- a/lib/private/AppFramework/Middleware/Security/PasswordConfirmationMiddleware.php
+++ b/lib/private/AppFramework/Middleware/Security/PasswordConfirmationMiddleware.php
@@ -44,7 +44,8 @@ class PasswordConfirmationMiddleware extends Middleware {
* @param IUserSession $userSession
* @param ITimeFactory $timeFactory
*/
- public function __construct(ControllerMethodReflector $reflector,
+ public function __construct(
+ ControllerMethodReflector $reflector,
ISession $session,
IUserSession $userSession,
ITimeFactory $timeFactory,
diff --git a/lib/private/AppFramework/Services/AppConfig.php b/lib/private/AppFramework/Services/AppConfig.php
index e47bbc429d0..423a9eb5814 100644
--- a/lib/private/AppFramework/Services/AppConfig.php
+++ b/lib/private/AppFramework/Services/AppConfig.php
@@ -116,7 +116,7 @@ class AppConfig implements IAppConfig {
string $key,
string $value,
bool $lazy = false,
- bool $sensitive = false
+ bool $sensitive = false,
): bool {
return $this->appConfig->setValueString($this->appName, $key, $value, $lazy, $sensitive);
}
@@ -138,7 +138,7 @@ class AppConfig implements IAppConfig {
string $key,
int $value,
bool $lazy = false,
- bool $sensitive = false
+ bool $sensitive = false,
): bool {
return $this->appConfig->setValueInt($this->appName, $key, $value, $lazy, $sensitive);
}
@@ -160,7 +160,7 @@ class AppConfig implements IAppConfig {
string $key,
float $value,
bool $lazy = false,
- bool $sensitive = false
+ bool $sensitive = false,
): bool {
return $this->appConfig->setValueFloat($this->appName, $key, $value, $lazy, $sensitive);
}
@@ -180,7 +180,7 @@ class AppConfig implements IAppConfig {
public function setAppValueBool(
string $key,
bool $value,
- bool $lazy = false
+ bool $lazy = false,
): bool {
return $this->appConfig->setValueBool($this->appName, $key, $value, $lazy);
}
@@ -203,7 +203,7 @@ class AppConfig implements IAppConfig {
string $key,
array $value,
bool $lazy = false,
- bool $sensitive = false
+ bool $sensitive = false,
): bool {
return $this->appConfig->setValueArray($this->appName, $key, $value, $lazy, $sensitive);
}
diff --git a/lib/private/Archive/Archive.php b/lib/private/Archive/Archive.php
index 26b940be410..874087fb167 100644
--- a/lib/private/Archive/Archive.php
+++ b/lib/private/Archive/Archive.php
@@ -92,10 +92,10 @@ abstract class Archive {
if ($file === '.' || $file === '..') {
continue;
}
- if (is_dir($source.'/'.$file)) {
- $this->addRecursive($path.'/'.$file, $source.'/'.$file);
+ if (is_dir($source . '/' . $file)) {
+ $this->addRecursive($path . '/' . $file, $source . '/' . $file);
} else {
- $this->addFile($path.'/'.$file, $source.'/'.$file);
+ $this->addFile($path . '/' . $file, $source . '/' . $file);
}
}
}
diff --git a/lib/private/Archive/ZIP.php b/lib/private/Archive/ZIP.php
index 52352f9505e..61fd25d071d 100644
--- a/lib/private/Archive/ZIP.php
+++ b/lib/private/Archive/ZIP.php
@@ -26,7 +26,7 @@ class ZIP extends Archive {
$this->zip = new \ZipArchive();
if ($this->zip->open($source, \ZipArchive::CREATE)) {
} else {
- \OC::$server->get(LoggerInterface::class)->warning('Error while opening archive '.$source, ['app' => 'files_archive']);
+ \OC::$server->get(LoggerInterface::class)->warning('Error while opening archive ' . $source, ['app' => 'files_archive']);
}
}
@@ -169,15 +169,15 @@ class ZIP extends Archive {
* check if a file or folder exists in the archive
*/
public function fileExists(string $path): bool {
- return ($this->zip->locateName($path) !== false) or ($this->zip->locateName($path.'/') !== false);
+ return ($this->zip->locateName($path) !== false) or ($this->zip->locateName($path . '/') !== false);
}
/**
* remove a file or folder from the archive
*/
public function remove(string $path): bool {
- if ($this->fileExists($path.'/')) {
- return $this->zip->deleteName($path.'/');
+ if ($this->fileExists($path . '/')) {
+ return $this->zip->deleteName($path . '/');
} else {
return $this->zip->deleteName($path);
}
diff --git a/lib/private/Authentication/Login/Chain.php b/lib/private/Authentication/Login/Chain.php
index abd24287a6c..3cba396afdd 100644
--- a/lib/private/Authentication/Login/Chain.php
+++ b/lib/private/Authentication/Login/Chain.php
@@ -56,7 +56,7 @@ class Chain {
UpdateLastPasswordConfirmCommand $updateLastPasswordConfirmCommand,
SetUserTimezoneCommand $setUserTimezoneCommand,
TwoFactorCommand $twoFactorCommand,
- FinishRememberedLoginCommand $finishRememberedLoginCommand
+ FinishRememberedLoginCommand $finishRememberedLoginCommand,
) {
$this->preLoginHookCommand = $preLoginHookCommand;
$this->userDisabledCheckCommand = $userDisabledCheckCommand;
diff --git a/lib/private/Authentication/Login/WebAuthnChain.php b/lib/private/Authentication/Login/WebAuthnChain.php
index c31e39de28c..ae523c43da6 100644
--- a/lib/private/Authentication/Login/WebAuthnChain.php
+++ b/lib/private/Authentication/Login/WebAuthnChain.php
@@ -48,7 +48,7 @@ class WebAuthnChain {
UpdateLastPasswordConfirmCommand $updateLastPasswordConfirmCommand,
SetUserTimezoneCommand $setUserTimezoneCommand,
TwoFactorCommand $twoFactorCommand,
- FinishRememberedLoginCommand $finishRememberedLoginCommand
+ FinishRememberedLoginCommand $finishRememberedLoginCommand,
) {
$this->userDisabledCheckCommand = $userDisabledCheckCommand;
$this->webAuthnLoginCommand = $webAuthnLoginCommand;
diff --git a/lib/private/Authentication/WebAuthn/Manager.php b/lib/private/Authentication/WebAuthn/Manager.php
index 7aa7a3c8f3a..e65002632d8 100644
--- a/lib/private/Authentication/WebAuthn/Manager.php
+++ b/lib/private/Authentication/WebAuthn/Manager.php
@@ -53,7 +53,7 @@ class Manager {
CredentialRepository $repository,
PublicKeyCredentialMapper $credentialMapper,
LoggerInterface $logger,
- IConfig $config
+ IConfig $config,
) {
$this->repository = $repository;
$this->credentialMapper = $credentialMapper;
diff --git a/lib/private/Avatar/Avatar.php b/lib/private/Avatar/Avatar.php
index bf29d57b88d..7aa2d220b88 100644
--- a/lib/private/Avatar/Avatar.php
+++ b/lib/private/Avatar/Avatar.php
@@ -183,7 +183,7 @@ abstract class Avatar implements IAvatar {
string $text,
string $font,
int $size,
- int $angle = 0
+ int $angle = 0,
): array {
// Image width & height
$xi = imagesx($image);
diff --git a/lib/private/Avatar/UserAvatar.php b/lib/private/Avatar/UserAvatar.php
index c5a146a48b6..51c44b23a55 100644
--- a/lib/private/Avatar/UserAvatar.php
+++ b/lib/private/Avatar/UserAvatar.php
@@ -217,7 +217,7 @@ class UserAvatar extends Avatar {
if ($size === -1) {
$path = 'avatar' . ($darkTheme ? '-dark' : '') . '.' . $ext;
} else {
- $path = 'avatar' . ($darkTheme ? '-dark' : '') . '.' . $size . '.' . $ext;
+ $path = 'avatar' . ($darkTheme ? '-dark' : '') . '.' . $size . '.' . $ext;
}
} else {
if ($size === -1) {
diff --git a/lib/private/BackgroundJob/JobList.php b/lib/private/BackgroundJob/JobList.php
index dc8e33c743c..f6410269d67 100644
--- a/lib/private/BackgroundJob/JobList.php
+++ b/lib/private/BackgroundJob/JobList.php
@@ -27,7 +27,7 @@ class JobList implements IJobList {
protected IDBConnection $connection,
protected IConfig $config,
protected ITimeFactory $timeFactory,
- protected LoggerInterface $logger
+ protected LoggerInterface $logger,
) {
}
diff --git a/lib/private/Collaboration/Collaborators/LookupPlugin.php b/lib/private/Collaboration/Collaborators/LookupPlugin.php
index 3cc4e93a486..8b46ad5e072 100644
--- a/lib/private/Collaboration/Collaborators/LookupPlugin.php
+++ b/lib/private/Collaboration/Collaborators/LookupPlugin.php
@@ -63,7 +63,7 @@ class LookupPlugin implements ISearchPlugin {
try {
$remote = $this->cloudIdManager->resolveCloudId($lookup['federationId'])->getRemote();
} catch (\Exception $e) {
- $this->logger->error('Can not parse federated cloud ID "' . $lookup['federationId'] . '"', [
+ $this->logger->error('Can not parse federated cloud ID "' . $lookup['federationId'] . '"', [
'exception' => $e,
]);
continue;
diff --git a/lib/private/Collaboration/Resources/Collection.php b/lib/private/Collaboration/Resources/Collection.php
index 2c5cc28ef28..d652305016f 100644
--- a/lib/private/Collaboration/Resources/Collection.php
+++ b/lib/private/Collaboration/Resources/Collection.php
@@ -28,7 +28,7 @@ class Collection implements ICollection {
protected int $id,
protected string $name,
protected ?IUser $userForAccess = null,
- protected ?bool $access = null
+ protected ?bool $access = null,
) {
}
diff --git a/lib/private/Collaboration/Resources/Resource.php b/lib/private/Collaboration/Resources/Resource.php
index 34f68aeee11..19da3da7e7d 100644
--- a/lib/private/Collaboration/Resources/Resource.php
+++ b/lib/private/Collaboration/Resources/Resource.php
@@ -23,7 +23,7 @@ class Resource implements IResource {
protected string $type,
protected string $id,
protected ?IUser $userForAccess = null,
- protected ?bool $access = null
+ protected ?bool $access = null,
) {
}
diff --git a/lib/private/Comments/Comment.php b/lib/private/Comments/Comment.php
index ac022cd4c3c..0308d01ab9a 100644
--- a/lib/private/Comments/Comment.php
+++ b/lib/private/Comments/Comment.php
@@ -175,7 +175,7 @@ class Comment implements IComment {
}
$message = trim($message);
if ($maxLength && mb_strlen($message, 'UTF-8') > $maxLength) {
- throw new MessageTooLongException('Comment message must not exceed ' . $maxLength. ' characters');
+ throw new MessageTooLongException('Comment message must not exceed ' . $maxLength . ' characters');
}
$this->data['message'] = $message;
return $this;
diff --git a/lib/private/Comments/Manager.php b/lib/private/Comments/Manager.php
index 8b7f43c03a2..41e0c662212 100644
--- a/lib/private/Comments/Manager.php
+++ b/lib/private/Comments/Manager.php
@@ -320,7 +320,7 @@ class Manager implements ICommentsManager {
$objectId,
$limit = 0,
$offset = 0,
- ?\DateTime $notOlderThan = null
+ ?\DateTime $notOlderThan = null,
) {
$comments = [];
@@ -372,7 +372,7 @@ class Manager implements ICommentsManager {
int $lastKnownCommentId,
string $sortDirection = 'asc',
int $limit = 30,
- bool $includeLastKnown = false
+ bool $includeLastKnown = false,
): array {
return $this->getCommentsWithVerbForObjectSinceComment(
$objectType,
@@ -403,7 +403,7 @@ class Manager implements ICommentsManager {
int $lastKnownCommentId,
string $sortDirection = 'asc',
int $limit = 30,
- bool $includeLastKnown = false
+ bool $includeLastKnown = false,
): array {
$comments = [];
@@ -575,7 +575,7 @@ class Manager implements ICommentsManager {
if ($search !== '') {
$query->where($query->expr()->iLike('message', $query->createNamedParameter(
- '%' . $this->dbConn->escapeLikeParameter($search). '%'
+ '%' . $this->dbConn->escapeLikeParameter($search) . '%'
)));
}
@@ -769,7 +769,7 @@ class Manager implements ICommentsManager {
string $objectId,
string $verb,
string $actorType,
- array $actors
+ array $actors,
): array {
$lastComments = [];
diff --git a/lib/private/Config.php b/lib/private/Config.php
index 08f9b028856..d9b16832698 100644
--- a/lib/private/Config.php
+++ b/lib/private/Config.php
@@ -35,7 +35,7 @@ class Config {
*/
public function __construct($configDir, $fileName = 'config.php') {
$this->configDir = $configDir;
- $this->configFilePath = $this->configDir.$fileName;
+ $this->configFilePath = $this->configDir . $fileName;
$this->configFileName = $fileName;
$this->readData();
$this->isReadOnly = $this->getValue('config_is_read_only', false);
@@ -171,7 +171,7 @@ class Config {
$configFiles = [$this->configFilePath];
// Add all files in the config dir ending with the same file name
- $extra = glob($this->configDir.'*.'.$this->configFileName);
+ $extra = glob($this->configDir . '*.' . $this->configFileName);
if (is_array($extra)) {
natsort($extra);
$configFiles = array_merge($configFiles, $extra);
@@ -248,7 +248,7 @@ class Config {
private function writeData() {
$this->checkReadOnly();
- if (!is_file(\OC::$configDir.'/CAN_INSTALL') && !isset($this->cache['version'])) {
+ if (!is_file(\OC::$configDir . '/CAN_INSTALL') && !isset($this->cache['version'])) {
throw new HintException(sprintf('Configuration was not read or initialized correctly, not overwriting %s', $this->configFilePath));
}
diff --git a/lib/private/Console/Application.php b/lib/private/Console/Application.php
index 22dc8d0c65e..1b620089736 100644
--- a/lib/private/Console/Application.php
+++ b/lib/private/Console/Application.php
@@ -47,7 +47,7 @@ class Application {
*/
public function loadCommands(
InputInterface $input,
- ConsoleOutputInterface $output
+ ConsoleOutputInterface $output,
): void {
// $application is required to be defined in the register_command scripts
$application = $this->application;
diff --git a/lib/private/Contacts/ContactsMenu/ContactsStore.php b/lib/private/Contacts/ContactsMenu/ContactsStore.php
index d15e6e35706..a502a58366d 100644
--- a/lib/private/Contacts/ContactsMenu/ContactsStore.php
+++ b/lib/private/Contacts/ContactsMenu/ContactsStore.php
@@ -163,7 +163,7 @@ class ContactsStore implements IContactsStore {
private function filterContacts(
IUser $self,
array $entries,
- ?string $filter
+ ?string $filter,
): array {
$disallowEnumeration = $this->config->getAppValue('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes') !== 'yes';
$restrictEnumerationGroup = $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_to_group', 'no') === 'yes';
diff --git a/lib/private/DB/Adapter.php b/lib/private/DB/Adapter.php
index 71824bda9e8..8f1b8e6d75f 100644
--- a/lib/private/DB/Adapter.php
+++ b/lib/private/DB/Adapter.php
@@ -51,7 +51,7 @@ class Adapter {
*/
public function lockTable(string $tableName) {
$this->conn->beginTransaction();
- $this->conn->executeUpdate('LOCK TABLE `' .$tableName . '` IN EXCLUSIVE MODE');
+ $this->conn->executeUpdate('LOCK TABLE `' . $tableName . '` IN EXCLUSIVE MODE');
}
/**
diff --git a/lib/private/DB/AdapterMySQL.php b/lib/private/DB/AdapterMySQL.php
index 598dbc4de20..63c75607379 100644
--- a/lib/private/DB/AdapterMySQL.php
+++ b/lib/private/DB/AdapterMySQL.php
@@ -15,7 +15,7 @@ class AdapterMySQL extends Adapter {
* @param string $tableName
*/
public function lockTable($tableName) {
- $this->conn->executeUpdate('LOCK TABLES `' .$tableName . '` WRITE');
+ $this->conn->executeUpdate('LOCK TABLES `' . $tableName . '` WRITE');
}
public function unlockTable() {
diff --git a/lib/private/DB/AdapterSqlite.php b/lib/private/DB/AdapterSqlite.php
index 0023ee15364..aeadf55ecf7 100644
--- a/lib/private/DB/AdapterSqlite.php
+++ b/lib/private/DB/AdapterSqlite.php
@@ -50,7 +50,7 @@ class AdapterSqlite extends Adapter {
}
$fieldList = '`' . implode('`,`', array_keys($input)) . '`';
$query = "INSERT INTO `$table` ($fieldList) SELECT "
- . str_repeat('?,', count($input) - 1).'? '
+ . str_repeat('?,', count($input) - 1) . '? '
. " WHERE NOT EXISTS (SELECT 1 FROM `$table` WHERE ";
$inserts = array_values($input);
diff --git a/lib/private/DB/Connection.php b/lib/private/DB/Connection.php
index ecc6d09bc95..55e61a7be14 100644
--- a/lib/private/DB/Connection.php
+++ b/lib/private/DB/Connection.php
@@ -117,7 +117,7 @@ class Connection extends PrimaryReadReplicaConnection {
private array $params,
Driver $driver,
?Configuration $config = null,
- ?EventManager $eventManager = null
+ ?EventManager $eventManager = null,
) {
if (!isset($params['adapter'])) {
throw new \Exception('adapter not set');
@@ -664,9 +664,9 @@ class Connection extends PrimaryReadReplicaConnection {
$msg = $this->errorCode() . ': ';
$errorInfo = $this->errorInfo();
if (!empty($errorInfo)) {
- $msg .= 'SQLSTATE = '.$errorInfo[0] . ', ';
- $msg .= 'Driver Code = '.$errorInfo[1] . ', ';
- $msg .= 'Driver Message = '.$errorInfo[2];
+ $msg .= 'SQLSTATE = ' . $errorInfo[0] . ', ';
+ $msg .= 'Driver Code = ' . $errorInfo[1] . ', ';
+ $msg .= 'Driver Message = ' . $errorInfo[2];
}
return $msg;
}
diff --git a/lib/private/DB/DbDataCollector.php b/lib/private/DB/DbDataCollector.php
index fcaa74daeab..e3c7cd35855 100644
--- a/lib/private/DB/DbDataCollector.php
+++ b/lib/private/DB/DbDataCollector.php
@@ -111,7 +111,7 @@ class DbDataCollector extends \OCP\DataCollector\AbstractDataCollector {
}
if ($error) {
- return ['⚠ '.$error->getMessage(), false, false];
+ return ['⚠ ' . $error->getMessage(), false, false];
}
if (\is_array($var)) {
diff --git a/lib/private/DB/MigrationService.php b/lib/private/DB/MigrationService.php
index 61a6d2baf16..0b59509eaab 100644
--- a/lib/private/DB/MigrationService.php
+++ b/lib/private/DB/MigrationService.php
@@ -396,7 +396,7 @@ class MigrationService {
} catch (\Exception $e) {
// The exception itself does not contain the name of the migration,
// so we wrap it here, to make debugging easier.
- throw new \Exception('Database error when running migration ' . $version . ' for app ' . $this->getApp() . PHP_EOL. $e->getMessage(), 0, $e);
+ throw new \Exception('Database error when running migration ' . $version . ' for app ' . $this->getApp() . PHP_EOL . $e->getMessage(), 0, $e);
}
}
}
diff --git a/lib/private/DB/MigratorExecuteSqlEvent.php b/lib/private/DB/MigratorExecuteSqlEvent.php
index cfcfe7fa512..340cd636300 100644
--- a/lib/private/DB/MigratorExecuteSqlEvent.php
+++ b/lib/private/DB/MigratorExecuteSqlEvent.php
@@ -18,7 +18,7 @@ class MigratorExecuteSqlEvent extends Event {
public function __construct(
string $sql,
int $current,
- int $max
+ int $max,
) {
$this->sql = $sql;
$this->current = $current;
diff --git a/lib/private/DB/QueryBuilder/CompositeExpression.php b/lib/private/DB/QueryBuilder/CompositeExpression.php
index 6edf385360c..bcdbce8c5cb 100644
--- a/lib/private/DB/QueryBuilder/CompositeExpression.php
+++ b/lib/private/DB/QueryBuilder/CompositeExpression.php
@@ -16,7 +16,7 @@ class CompositeExpression implements ICompositeExpression, \Countable {
public function __construct(
private string $type,
- private array $parts = []
+ private array $parts = [],
) {
}
diff --git a/lib/private/DB/QueryBuilder/FunctionBuilder/OCIFunctionBuilder.php b/lib/private/DB/QueryBuilder/FunctionBuilder/OCIFunctionBuilder.php
index a8dc4d8cf14..6791430b1b0 100644
--- a/lib/private/DB/QueryBuilder/FunctionBuilder/OCIFunctionBuilder.php
+++ b/lib/private/DB/QueryBuilder/FunctionBuilder/OCIFunctionBuilder.php
@@ -15,7 +15,7 @@ class OCIFunctionBuilder extends FunctionBuilder {
if (version_compare($this->connection->getServerVersion(), '20', '>=')) {
return new QueryFunction('LOWER(STANDARD_HASH(' . $this->helper->quoteColumnName($input) . ", 'MD5'))");
}
- return new QueryFunction('LOWER(DBMS_OBFUSCATION_TOOLKIT.md5 (input => UTL_RAW.cast_to_raw(' . $this->helper->quoteColumnName($input) .')))');
+ return new QueryFunction('LOWER(DBMS_OBFUSCATION_TOOLKIT.md5 (input => UTL_RAW.cast_to_raw(' . $this->helper->quoteColumnName($input) . ')))');
}
/**
diff --git a/lib/private/DB/QueryBuilder/Partitioned/PartitionedResult.php b/lib/private/DB/QueryBuilder/Partitioned/PartitionedResult.php
index aa9cc43b38b..b3b59e26298 100644
--- a/lib/private/DB/QueryBuilder/Partitioned/PartitionedResult.php
+++ b/lib/private/DB/QueryBuilder/Partitioned/PartitionedResult.php
@@ -24,7 +24,7 @@ class PartitionedResult extends ArrayResult {
*/
public function __construct(
private array $splitOfParts,
- private IResult $result
+ private IResult $result,
) {
parent::__construct([]);
}
diff --git a/lib/private/DB/QueryBuilder/Sharded/CrossShardMoveHelper.php b/lib/private/DB/QueryBuilder/Sharded/CrossShardMoveHelper.php
index 45f24e32685..81530b56725 100644
--- a/lib/private/DB/QueryBuilder/Sharded/CrossShardMoveHelper.php
+++ b/lib/private/DB/QueryBuilder/Sharded/CrossShardMoveHelper.php
@@ -16,7 +16,7 @@ use OCP\IDBConnection;
*/
class CrossShardMoveHelper {
public function __construct(
- private ShardConnectionManager $connectionManager
+ private ShardConnectionManager $connectionManager,
) {
}
diff --git a/lib/private/DirectEditing/Manager.php b/lib/private/DirectEditing/Manager.php
index 4b8c6af31e2..7503ad94258 100644
--- a/lib/private/DirectEditing/Manager.php
+++ b/lib/private/DirectEditing/Manager.php
@@ -59,7 +59,7 @@ class Manager implements IManager {
IUserSession $userSession,
IRootFolder $rootFolder,
IFactory $l10nFactory,
- EncryptionManager $encryptionManager
+ EncryptionManager $encryptionManager,
) {
$this->random = $random;
$this->connection = $connection;
diff --git a/lib/private/Encryption/DecryptAll.php b/lib/private/Encryption/DecryptAll.php
index 0007467298c..70dd0c0f0b0 100644
--- a/lib/private/Encryption/DecryptAll.php
+++ b/lib/private/Encryption/DecryptAll.php
@@ -29,7 +29,7 @@ class DecryptAll {
public function __construct(
protected IManager $encryptionManager,
protected IUserManager $userManager,
- protected View $rootView
+ protected View $rootView,
) {
$this->failed = [];
}
diff --git a/lib/private/Encryption/EncryptionWrapper.php b/lib/private/Encryption/EncryptionWrapper.php
index aec93a3ce4d..7f355b603d6 100644
--- a/lib/private/Encryption/EncryptionWrapper.php
+++ b/lib/private/Encryption/EncryptionWrapper.php
@@ -39,7 +39,7 @@ class EncryptionWrapper {
*/
public function __construct(ArrayCache $arrayCache,
Manager $manager,
- LoggerInterface $logger
+ LoggerInterface $logger,
) {
$this->arrayCache = $arrayCache;
$this->manager = $manager;
diff --git a/lib/private/Encryption/Exceptions/EncryptionHeaderKeyExistsException.php b/lib/private/Encryption/Exceptions/EncryptionHeaderKeyExistsException.php
index 07007dc0ec1..52f488e2956 100644
--- a/lib/private/Encryption/Exceptions/EncryptionHeaderKeyExistsException.php
+++ b/lib/private/Encryption/Exceptions/EncryptionHeaderKeyExistsException.php
@@ -14,6 +14,6 @@ class EncryptionHeaderKeyExistsException extends GenericEncryptionException {
* @param string $key
*/
public function __construct($key) {
- parent::__construct('header key "'. $key . '" already reserved by ownCloud');
+ parent::__construct('header key "' . $key . '" already reserved by ownCloud');
}
}
diff --git a/lib/private/Encryption/Keys/Storage.php b/lib/private/Encryption/Keys/Storage.php
index 532d1a51dd6..2c0ce9e5ef3 100644
--- a/lib/private/Encryption/Keys/Storage.php
+++ b/lib/private/Encryption/Keys/Storage.php
@@ -57,8 +57,8 @@ class Storage implements IStorage {
$this->util = $util;
$this->encryption_base_dir = '/files_encryption';
- $this->keys_base_dir = $this->encryption_base_dir .'/keys';
- $this->backup_base_dir = $this->encryption_base_dir .'/backup';
+ $this->keys_base_dir = $this->encryption_base_dir . '/keys';
+ $this->backup_base_dir = $this->encryption_base_dir . '/backup';
$this->root_dir = $this->util->getKeyStorageRoot();
$this->crypto = $crypto;
$this->config = $config;
diff --git a/lib/private/Encryption/Update.php b/lib/private/Encryption/Update.php
index 6fee1afbe5c..0b27d63c19a 100644
--- a/lib/private/Encryption/Update.php
+++ b/lib/private/Encryption/Update.php
@@ -49,7 +49,7 @@ class Update {
Manager $encryptionManager,
File $file,
LoggerInterface $logger,
- $uid
+ $uid,
) {
$this->view = $view;
$this->util = $util;
diff --git a/lib/private/EventSource.php b/lib/private/EventSource.php
index 18af6e35832..1a005025ef9 100644
--- a/lib/private/EventSource.php
+++ b/lib/private/EventSource.php
@@ -51,7 +51,7 @@ class EventSource implements IEventSource {
header('Content-Type: text/event-stream');
}
if (!$this->request->passesStrictCookieCheck()) {
- header('Location: '.\OC::$WEBROOT);
+ header('Location: ' . \OC::$WEBROOT);
exit();
}
if (!$this->request->passesCSRFCheck()) {
@@ -74,7 +74,7 @@ class EventSource implements IEventSource {
*/
public function send($type, $data = null) {
if ($data and !preg_match('/^[A-Za-z0-9_]+$/', $type)) {
- throw new \BadMethodCallException('Type needs to be alphanumeric ('. $type .')');
+ throw new \BadMethodCallException('Type needs to be alphanumeric (' . $type . ')');
}
$this->init();
if (is_null($data)) {
diff --git a/lib/private/Federation/CloudFederationProviderManager.php b/lib/private/Federation/CloudFederationProviderManager.php
index 79b37b44c82..be9e66fa9ec 100644
--- a/lib/private/Federation/CloudFederationProviderManager.php
+++ b/lib/private/Federation/CloudFederationProviderManager.php
@@ -40,7 +40,7 @@ class CloudFederationProviderManager implements ICloudFederationProviderManager
private IClientService $httpClientService,
private ICloudIdManager $cloudIdManager,
private IOCMDiscoveryService $discoveryService,
- private LoggerInterface $logger
+ private LoggerInterface $logger,
) {
}
diff --git a/lib/private/Federation/CloudFederationShare.php b/lib/private/Federation/CloudFederationShare.php
index aa86905f234..22e36d87312 100644
--- a/lib/private/Federation/CloudFederationShare.php
+++ b/lib/private/Federation/CloudFederationShare.php
@@ -48,7 +48,7 @@ class CloudFederationShare implements ICloudFederationShare {
$sharedByDisplayName = '',
$shareType = '',
$resourceType = '',
- $sharedSecret = ''
+ $sharedSecret = '',
) {
$this->setShareWith($shareWith);
$this->setResourceName($name);
diff --git a/lib/private/Federation/CloudIdManager.php b/lib/private/Federation/CloudIdManager.php
index 69d48a148b3..f5c0035534c 100644
--- a/lib/private/Federation/CloudIdManager.php
+++ b/lib/private/Federation/CloudIdManager.php
@@ -36,7 +36,7 @@ class CloudIdManager implements ICloudIdManager {
IURLGenerator $urlGenerator,
IUserManager $userManager,
ICacheFactory $cacheFactory,
- IEventDispatcher $eventDispatcher
+ IEventDispatcher $eventDispatcher,
) {
$this->contactsManager = $contactsManager;
$this->urlGenerator = $urlGenerator;
diff --git a/lib/private/Files/Cache/QuerySearchHelper.php b/lib/private/Files/Cache/QuerySearchHelper.php
index 82f9ec3be66..a4d118f8848 100644
--- a/lib/private/Files/Cache/QuerySearchHelper.php
+++ b/lib/private/Files/Cache/QuerySearchHelper.php
@@ -54,7 +54,7 @@ class QuerySearchHelper {
CacheQueryBuilder $query,
ISearchQuery $searchQuery,
array $caches,
- ?IMetadataQuery $metadataQuery = null
+ ?IMetadataQuery $metadataQuery = null,
): void {
$storageFilters = array_values(array_map(function (ICache $cache) {
return $cache->getQueryFilterForStorage();
diff --git a/lib/private/Files/Cache/Scanner.php b/lib/private/Files/Cache/Scanner.php
index 6e1c86eed47..3bd674f79e2 100644
--- a/lib/private/Files/Cache/Scanner.php
+++ b/lib/private/Files/Cache/Scanner.php
@@ -489,7 +489,7 @@ class Scanner extends BasicEmitter implements IScanner {
$file = trim(\OC\Files\Filesystem::normalizePath($originalFile), '/');
if (trim($originalFile, '/') !== $file) {
// encoding mismatch, might require compatibility wrapper
- \OC::$server->get(LoggerInterface::class)->debug('Scanner: Skipping non-normalized file name "'. $originalFile . '" in path "' . $path . '".', ['app' => 'core']);
+ \OC::$server->get(LoggerInterface::class)->debug('Scanner: Skipping non-normalized file name "' . $originalFile . '" in path "' . $path . '".', ['app' => 'core']);
$this->emit('\OC\Files\Cache\Scanner', 'normalizedNameMismatch', [$path ? $path . '/' . $originalFile : $originalFile]);
// skip this entry
continue;
diff --git a/lib/private/Files/Cache/SearchBuilder.php b/lib/private/Files/Cache/SearchBuilder.php
index 41f942cab03..e89b95b756f 100644
--- a/lib/private/Files/Cache/SearchBuilder.php
+++ b/lib/private/Files/Cache/SearchBuilder.php
@@ -84,7 +84,7 @@ class SearchBuilder {
private $mimetypeLoader;
public function __construct(
- IMimeTypeLoader $mimetypeLoader
+ IMimeTypeLoader $mimetypeLoader,
) {
$this->mimetypeLoader = $mimetypeLoader;
}
@@ -110,7 +110,7 @@ class SearchBuilder {
public function searchOperatorArrayToDBExprArray(
IQueryBuilder $builder,
array $operators,
- ?IMetadataQuery $metadataQuery = null
+ ?IMetadataQuery $metadataQuery = null,
) {
return array_filter(array_map(function ($operator) use ($builder, $metadataQuery) {
return $this->searchOperatorToDBExpr($builder, $operator, $metadataQuery);
@@ -120,7 +120,7 @@ class SearchBuilder {
public function searchOperatorToDBExpr(
IQueryBuilder $builder,
ISearchOperator $operator,
- ?IMetadataQuery $metadataQuery = null
+ ?IMetadataQuery $metadataQuery = null,
) {
$expr = $builder->expr();
@@ -156,7 +156,7 @@ class SearchBuilder {
IQueryBuilder $builder,
ISearchComparison $comparison,
array $operatorMap,
- ?IMetadataQuery $metadataQuery = null
+ ?IMetadataQuery $metadataQuery = null,
) {
if ($comparison->getExtra()) {
[$field, $value, $type, $paramType] = $this->getExtraOperatorField($comparison, $metadataQuery);
diff --git a/lib/private/Files/Config/CachedMountFileInfo.php b/lib/private/Files/Config/CachedMountFileInfo.php
index 41dbec87ef5..90a6b47f9d8 100644
--- a/lib/private/Files/Config/CachedMountFileInfo.php
+++ b/lib/private/Files/Config/CachedMountFileInfo.php
@@ -19,7 +19,7 @@ class CachedMountFileInfo extends CachedMountInfo implements ICachedMountFileInf
?int $mountId,
string $mountProvider,
string $rootInternalPath,
- string $internalPath
+ string $internalPath,
) {
parent::__construct($user, $storageId, $rootId, $mountPoint, $mountProvider, $mountId, $rootInternalPath);
$this->internalPath = $internalPath;
diff --git a/lib/private/Files/Config/CachedMountInfo.php b/lib/private/Files/Config/CachedMountInfo.php
index 80423dcae40..79dd6c6ea1d 100644
--- a/lib/private/Files/Config/CachedMountInfo.php
+++ b/lib/private/Files/Config/CachedMountInfo.php
@@ -39,7 +39,7 @@ class CachedMountInfo implements ICachedMountInfo {
string $mountPoint,
string $mountProvider,
?int $mountId = null,
- string $rootInternalPath = ''
+ string $rootInternalPath = '',
) {
$this->user = $user;
$this->storageId = $storageId;
diff --git a/lib/private/Files/Config/MountProviderCollection.php b/lib/private/Files/Config/MountProviderCollection.php
index 1dbc469c8c3..6a5407934c8 100644
--- a/lib/private/Files/Config/MountProviderCollection.php
+++ b/lib/private/Files/Config/MountProviderCollection.php
@@ -58,7 +58,7 @@ class MountProviderCollection implements IMountProviderCollection, Emitter {
public function __construct(
IStorageFactory $loader,
IUserMountCache $mountCache,
- IEventLogger $eventLogger
+ IEventLogger $eventLogger,
) {
$this->loader = $loader;
$this->mountCache = $mountCache;
diff --git a/lib/private/Files/Config/UserMountCache.php b/lib/private/Files/Config/UserMountCache.php
index 94da770b63f..ad8061b1a8c 100644
--- a/lib/private/Files/Config/UserMountCache.php
+++ b/lib/private/Files/Config/UserMountCache.php
@@ -49,7 +49,7 @@ class UserMountCache implements IUserMountCache {
IDBConnection $connection,
IUserManager $userManager,
LoggerInterface $logger,
- IEventLogger $eventLogger
+ IEventLogger $eventLogger,
) {
$this->connection = $connection;
$this->userManager = $userManager;
diff --git a/lib/private/Files/Mount/HomeMountPoint.php b/lib/private/Files/Mount/HomeMountPoint.php
index 0aa4b54ddf0..5a648f08c89 100644
--- a/lib/private/Files/Mount/HomeMountPoint.php
+++ b/lib/private/Files/Mount/HomeMountPoint.php
@@ -22,7 +22,7 @@ class HomeMountPoint extends MountPoint {
?IStorageFactory $loader = null,
?array $mountOptions = null,
?int $mountId = null,
- ?string $mountProvider = null
+ ?string $mountProvider = null,
) {
parent::__construct($storage, $mountpoint, $arguments, $loader, $mountOptions, $mountId, $mountProvider);
$this->user = $user;
diff --git a/lib/private/Files/Mount/Manager.php b/lib/private/Files/Mount/Manager.php
index d118021afa2..55de488c726 100644
--- a/lib/private/Files/Mount/Manager.php
+++ b/lib/private/Files/Mount/Manager.php
@@ -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/MountPoint.php b/lib/private/Files/Mount/MountPoint.php
index cb3a3e8a22d..7a5a87be35b 100644
--- a/lib/private/Files/Mount/MountPoint.php
+++ b/lib/private/Files/Mount/MountPoint.php
@@ -75,7 +75,7 @@ class MountPoint implements IMountPoint {
?IStorageFactory $loader = null,
?array $mountOptions = null,
?int $mountId = null,
- ?string $mountProvider = null
+ ?string $mountProvider = null,
) {
if (is_null($arguments)) {
$arguments = [];
diff --git a/lib/private/Files/Node/HookConnector.php b/lib/private/Files/Node/HookConnector.php
index 8fd2ffa3369..423eea258ed 100644
--- a/lib/private/Files/Node/HookConnector.php
+++ b/lib/private/Files/Node/HookConnector.php
@@ -39,7 +39,7 @@ class HookConnector {
private IRootFolder $root,
private View $view,
private IEventDispatcher $dispatcher,
- private LoggerInterface $logger
+ private LoggerInterface $logger,
) {
}
diff --git a/lib/private/Files/ObjectStore/ObjectStoreStorage.php b/lib/private/Files/ObjectStore/ObjectStoreStorage.php
index 60affa4b89e..26823f65c2f 100644
--- a/lib/private/Files/ObjectStore/ObjectStoreStorage.php
+++ b/lib/private/Files/ObjectStore/ObjectStoreStorage.php
@@ -570,7 +570,7 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common implements IChunkedFil
IStorage $sourceStorage,
$sourceInternalPath,
$targetInternalPath,
- $preserveMtime = false
+ $preserveMtime = false,
) {
if ($sourceStorage->instanceOfStorage(ObjectStoreStorage::class)) {
/** @var ObjectStoreStorage $sourceStorage */
@@ -703,7 +703,7 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common implements IChunkedFil
string $writeToken,
string $chunkId,
$data,
- $size = null
+ $size = null,
): ?array {
if (!$this->objectStore instanceof IObjectStoreMultiPartUpload) {
throw new GenericFileException('Object store does not support multipart upload');
diff --git a/lib/private/Files/ObjectStore/S3Signature.php b/lib/private/Files/ObjectStore/S3Signature.php
index 4e9784ee81a..994d65cc219 100644
--- a/lib/private/Files/ObjectStore/S3Signature.php
+++ b/lib/private/Files/ObjectStore/S3Signature.php
@@ -41,7 +41,7 @@ class S3Signature implements SignatureInterface {
public function signRequest(
RequestInterface $request,
- CredentialsInterface $credentials
+ CredentialsInterface $credentials,
) {
$request = $this->prepareRequest($request, $credentials);
$stringToSign = $this->createCanonicalizedString($request);
@@ -56,7 +56,7 @@ class S3Signature implements SignatureInterface {
RequestInterface $request,
CredentialsInterface $credentials,
$expires,
- array $options = []
+ array $options = [],
) {
$query = [];
// URL encoding already occurs in the URI template expansion. Undo that
@@ -106,7 +106,7 @@ class S3Signature implements SignatureInterface {
*/
private function prepareRequest(
RequestInterface $request,
- CredentialsInterface $creds
+ CredentialsInterface $creds,
) {
$modify = [
'remove_headers' => ['X-Amz-Date'],
@@ -129,7 +129,7 @@ class S3Signature implements SignatureInterface {
private function createCanonicalizedString(
RequestInterface $request,
- $expires = null
+ $expires = null,
) {
$buffer = $request->getMethod() . "\n";
diff --git a/lib/private/Files/Search/SearchComparison.php b/lib/private/Files/Search/SearchComparison.php
index e3a8f800506..c1f0176afd9 100644
--- a/lib/private/Files/Search/SearchComparison.php
+++ b/lib/private/Files/Search/SearchComparison.php
@@ -20,7 +20,7 @@ class SearchComparison implements ISearchComparison {
private string $field,
/** @var ParamValue $value */
private \DateTime|int|string|bool|array $value,
- private string $extra = ''
+ private string $extra = '',
) {
}
diff --git a/lib/private/Files/Search/SearchOrder.php b/lib/private/Files/Search/SearchOrder.php
index f3f62b933a1..3dcbc02bc1a 100644
--- a/lib/private/Files/Search/SearchOrder.php
+++ b/lib/private/Files/Search/SearchOrder.php
@@ -12,7 +12,7 @@ class SearchOrder implements ISearchOrder {
public function __construct(
private string $direction,
private string $field,
- private string $extra = ''
+ private string $extra = '',
) {
}
diff --git a/lib/private/Files/Search/SearchQuery.php b/lib/private/Files/Search/SearchQuery.php
index 3c8711facd8..1793e42d349 100644
--- a/lib/private/Files/Search/SearchQuery.php
+++ b/lib/private/Files/Search/SearchQuery.php
@@ -39,7 +39,7 @@ class SearchQuery implements ISearchQuery {
int $offset,
array $order,
?IUser $user = null,
- bool $limitToHome = false
+ bool $limitToHome = false,
) {
$this->searchOperation = $searchOperation;
$this->limit = $limit;
diff --git a/lib/private/Files/SetupManager.php b/lib/private/Files/SetupManager.php
index e74dd1042d6..44c70bb5f3d 100644
--- a/lib/private/Files/SetupManager.php
+++ b/lib/private/Files/SetupManager.php
@@ -201,7 +201,7 @@ class SetupManager {
$this->setupForUserWith($user, function () use ($user) {
$this->mountProviderCollection->addMountForUser($user, $this->mountManager, function (
- IMountProvider $provider
+ IMountProvider $provider,
) use ($user) {
return !in_array(get_class($provider), $this->setupUserMountProviders[$user->getUID()]);
});
@@ -542,7 +542,7 @@ class SetupManager {
if (!$this->listeningForProviders) {
$this->listeningForProviders = true;
$this->mountProviderCollection->listen('\OC\Files\Config', 'registerMountProvider', function (
- IMountProvider $provider
+ IMountProvider $provider,
) {
foreach ($this->setupUsers as $userId) {
$user = $this->userManager->get($userId);
@@ -568,7 +568,7 @@ class SetupManager {
$this->eventDispatcher->addListener(ShareCreatedEvent::class, function (ShareCreatedEvent $event) {
$this->cache->remove($event->getShare()->getSharedWith());
});
- $this->eventDispatcher->addListener(InvalidateMountCacheEvent::class, function (InvalidateMountCacheEvent $event
+ $this->eventDispatcher->addListener(InvalidateMountCacheEvent::class, function (InvalidateMountCacheEvent $event,
) {
if ($user = $event->getUser()) {
$this->cache->remove($user->getUID());
diff --git a/lib/private/Files/Storage/CommonTest.php b/lib/private/Files/Storage/CommonTest.php
index b92e493bc2c..efdd3634578 100644
--- a/lib/private/Files/Storage/CommonTest.php
+++ b/lib/private/Files/Storage/CommonTest.php
@@ -19,7 +19,7 @@ class CommonTest extends \OC\Files\Storage\Common {
}
public function getId() {
- return 'test::'.$this->storage->getId();
+ return 'test::' . $this->storage->getId();
}
public function mkdir($path) {
return $this->storage->mkdir($path);
diff --git a/lib/private/Files/Storage/DAV.php b/lib/private/Files/Storage/DAV.php
index 4c017082cea..87aa78887b5 100644
--- a/lib/private/Files/Storage/DAV.php
+++ b/lib/private/Files/Storage/DAV.php
@@ -163,13 +163,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->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');
});
}
diff --git a/lib/private/Files/Storage/Wrapper/Encryption.php b/lib/private/Files/Storage/Wrapper/Encryption.php
index 1ead1c342b0..3b45e996f5d 100644
--- a/lib/private/Files/Storage/Wrapper/Encryption.php
+++ b/lib/private/Files/Storage/Wrapper/Encryption.php
@@ -86,7 +86,7 @@ class Encryption extends Wrapper {
?IStorage $keyStorage = null,
?Update $update = null,
?Manager $mountManager = null,
- ?ArrayCache $arrayCache = null
+ ?ArrayCache $arrayCache = null,
) {
$this->mountPoint = $parameters['mountPoint'];
$this->mount = $parameters['mount'];
@@ -628,7 +628,7 @@ class Encryption extends Wrapper {
Storage\IStorage $sourceStorage,
$sourceInternalPath,
$targetInternalPath,
- $preserveMtime = true
+ $preserveMtime = true,
) {
if ($sourceStorage === $this) {
return $this->rename($sourceInternalPath, $targetInternalPath);
@@ -669,7 +669,7 @@ class Encryption extends Wrapper {
$sourceInternalPath,
$targetInternalPath,
$preserveMtime = false,
- $isRename = false
+ $isRename = false,
) {
// TODO clean this up once the underlying moveFromStorage in OC\Files\Storage\Wrapper\Common is fixed:
// - call $this->storage->copyFromStorage() instead of $this->copyBetweenStorage
@@ -694,7 +694,7 @@ class Encryption extends Wrapper {
$sourceInternalPath,
$targetInternalPath,
$isRename,
- $keepEncryptionVersion
+ $keepEncryptionVersion,
) {
$isEncrypted = $this->encryptionManager->isEnabled() && $this->shouldEncrypt($targetInternalPath);
$cacheInformation = [
@@ -749,7 +749,7 @@ class Encryption extends Wrapper {
$sourceInternalPath,
$targetInternalPath,
$preserveMtime,
- $isRename
+ $isRename,
) {
// for versions we have nothing to do, because versions should always use the
// key from the original file. Just create a 1:1 copy and done
diff --git a/lib/private/Files/Template/TemplateManager.php b/lib/private/Files/Template/TemplateManager.php
index e61b4720289..865af4eb90c 100644
--- a/lib/private/Files/Template/TemplateManager.php
+++ b/lib/private/Files/Template/TemplateManager.php
@@ -63,7 +63,7 @@ class TemplateManager implements ITemplateManager {
IPreview $previewManager,
IConfig $config,
IFactory $l10nFactory,
- LoggerInterface $logger
+ LoggerInterface $logger,
) {
$this->serverContainer = $serverContainer;
$this->eventDispatcher = $eventDispatcher;
diff --git a/lib/private/FilesMetadata/FilesMetadataManager.php b/lib/private/FilesMetadata/FilesMetadataManager.php
index 5c1acb77ea7..f2ea6cb11a7 100644
--- a/lib/private/FilesMetadata/FilesMetadataManager.php
+++ b/lib/private/FilesMetadata/FilesMetadataManager.php
@@ -75,7 +75,7 @@ class FilesMetadataManager implements IFilesMetadataManager {
public function refreshMetadata(
Node $node,
int $process = self::PROCESS_LIVE,
- string $namedEvent = ''
+ string $namedEvent = '',
): IFilesMetadata {
try {
$metadata = $this->metadataRequestService->getMetadataFromFileId($node->getId());
@@ -224,7 +224,7 @@ class FilesMetadataManager implements IFilesMetadataManager {
public function getMetadataQuery(
IQueryBuilder $qb,
string $fileTableAlias,
- string $fileIdField
+ string $fileIdField,
): IMetadataQuery {
return new MetadataQuery($qb, $this, $fileTableAlias, $fileIdField);
}
@@ -273,7 +273,7 @@ class FilesMetadataManager implements IFilesMetadataManager {
string $key,
string $type,
bool $indexed = false,
- int $editPermission = IMetadataValueWrapper::EDIT_FORBIDDEN
+ int $editPermission = IMetadataValueWrapper::EDIT_FORBIDDEN,
): void {
$current = $this->getKnownMetadata();
try {
diff --git a/lib/private/FilesMetadata/Job/UpdateSingleMetadata.php b/lib/private/FilesMetadata/Job/UpdateSingleMetadata.php
index c4b0117db13..5746493ddef 100644
--- a/lib/private/FilesMetadata/Job/UpdateSingleMetadata.php
+++ b/lib/private/FilesMetadata/Job/UpdateSingleMetadata.php
@@ -29,7 +29,7 @@ class UpdateSingleMetadata extends QueuedJob {
ITimeFactory $time,
private IRootFolder $rootFolder,
private FilesMetadataManager $filesMetadataManager,
- private LoggerInterface $logger
+ private LoggerInterface $logger,
) {
parent::__construct($time);
}
diff --git a/lib/private/FilesMetadata/Listener/MetadataDelete.php b/lib/private/FilesMetadata/Listener/MetadataDelete.php
index c0a6fc758c1..226bd3bdafa 100644
--- a/lib/private/FilesMetadata/Listener/MetadataDelete.php
+++ b/lib/private/FilesMetadata/Listener/MetadataDelete.php
@@ -23,7 +23,7 @@ use Psr\Log\LoggerInterface;
class MetadataDelete implements IEventListener {
public function __construct(
private IFilesMetadataManager $filesMetadataManager,
- private LoggerInterface $logger
+ private LoggerInterface $logger,
) {
}
diff --git a/lib/private/FilesMetadata/Listener/MetadataUpdate.php b/lib/private/FilesMetadata/Listener/MetadataUpdate.php
index 05422ba5aba..4c5c913c740 100644
--- a/lib/private/FilesMetadata/Listener/MetadataUpdate.php
+++ b/lib/private/FilesMetadata/Listener/MetadataUpdate.php
@@ -26,7 +26,7 @@ use Psr\Log\LoggerInterface;
class MetadataUpdate implements IEventListener {
public function __construct(
private IFilesMetadataManager $filesMetadataManager,
- private LoggerInterface $logger
+ private LoggerInterface $logger,
) {
}
diff --git a/lib/private/FilesMetadata/MetadataQuery.php b/lib/private/FilesMetadata/MetadataQuery.php
index aac93a23446..deae433e2fc 100644
--- a/lib/private/FilesMetadata/MetadataQuery.php
+++ b/lib/private/FilesMetadata/MetadataQuery.php
@@ -32,7 +32,7 @@ class MetadataQuery implements IMetadataQuery {
private string $fileTableAlias = 'fc',
private string $fileIdField = 'fileid',
private string $alias = 'meta',
- private string $aliasIndexPrefix = 'meta_index'
+ private string $aliasIndexPrefix = 'meta_index',
) {
if ($manager instanceof IFilesMetadata) {
/**
diff --git a/lib/private/FilesMetadata/Model/FilesMetadata.php b/lib/private/FilesMetadata/Model/FilesMetadata.php
index dfeb429507a..d338bdbba8f 100644
--- a/lib/private/FilesMetadata/Model/FilesMetadata.php
+++ b/lib/private/FilesMetadata/Model/FilesMetadata.php
@@ -29,7 +29,7 @@ class FilesMetadata implements IFilesMetadata {
private string $syncToken = '';
public function __construct(
- private int $fileId = 0
+ private int $fileId = 0,
) {
}
diff --git a/lib/private/FilesMetadata/Service/IndexRequestService.php b/lib/private/FilesMetadata/Service/IndexRequestService.php
index b50fb378325..91bd9f0b11e 100644
--- a/lib/private/FilesMetadata/Service/IndexRequestService.php
+++ b/lib/private/FilesMetadata/Service/IndexRequestService.php
@@ -25,7 +25,7 @@ class IndexRequestService {
public function __construct(
private IDBConnection $dbConnection,
- private LoggerInterface $logger
+ private LoggerInterface $logger,
) {
}
diff --git a/lib/private/FilesMetadata/Service/MetadataRequestService.php b/lib/private/FilesMetadata/Service/MetadataRequestService.php
index b58912b0216..5fc02c5d00b 100644
--- a/lib/private/FilesMetadata/Service/MetadataRequestService.php
+++ b/lib/private/FilesMetadata/Service/MetadataRequestService.php
@@ -24,7 +24,7 @@ class MetadataRequestService {
public function __construct(
private IDBConnection $dbConnection,
- private LoggerInterface $logger
+ private LoggerInterface $logger,
) {
}
diff --git a/lib/private/Group/Manager.php b/lib/private/Group/Manager.php
index d18c7796805..bd46780a602 100644
--- a/lib/private/Group/Manager.php
+++ b/lib/private/Group/Manager.php
@@ -238,7 +238,7 @@ class Manager extends PublicEmitter implements IGroupManager {
} elseif ($group = $this->get($gid)) {
return $group;
} elseif (mb_strlen($gid) > self::MAX_GROUP_LENGTH) {
- throw new \Exception('Group name is limited to '. self::MAX_GROUP_LENGTH.' characters');
+ throw new \Exception('Group name is limited to ' . self::MAX_GROUP_LENGTH . ' characters');
} else {
$this->dispatcher->dispatchTyped(new BeforeGroupCreatedEvent($gid));
$this->emit('\OC\Group', 'preCreate', [$gid]);
diff --git a/lib/private/Group/MetaData.php b/lib/private/Group/MetaData.php
index fe0d931cb09..77432eea5ff 100644
--- a/lib/private/Group/MetaData.php
+++ b/lib/private/Group/MetaData.php
@@ -31,7 +31,7 @@ class MetaData {
private bool $isAdmin,
private bool $isDelegatedAdmin,
private IGroupManager $groupManager,
- private IUserSession $userSession
+ private IUserSession $userSession,
) {
}
diff --git a/lib/private/Http/Client/Client.php b/lib/private/Http/Client/Client.php
index 0b72522c218..40ce012cd1a 100644
--- a/lib/private/Http/Client/Client.php
+++ b/lib/private/Http/Client/Client.php
@@ -61,7 +61,7 @@ class Client implements IClient {
$onRedirectFunction = function (
\Psr\Http\Message\RequestInterface $request,
\Psr\Http\Message\ResponseInterface $response,
- \Psr\Http\Message\UriInterface $uri
+ \Psr\Http\Message\UriInterface $uri,
) use ($options) {
$this->preventLocalAddress($uri->__toString(), $options);
};
@@ -167,7 +167,7 @@ class Client implements IClient {
throw new LocalServerException('Could not detect any host');
}
if (!$this->remoteHostValidator->isValid($host)) {
- throw new LocalServerException('Host "'.$host.'" violates local access rules');
+ throw new LocalServerException('Host "' . $host . '" violates local access rules');
}
}
diff --git a/lib/private/Http/Client/DnsPinMiddleware.php b/lib/private/Http/Client/DnsPinMiddleware.php
index fcf0818ebb9..6618f22d825 100644
--- a/lib/private/Http/Client/DnsPinMiddleware.php
+++ b/lib/private/Http/Client/DnsPinMiddleware.php
@@ -19,7 +19,7 @@ class DnsPinMiddleware {
public function __construct(
NegativeDnsCache $negativeDnsCache,
- IpAddressClassifier $ipAddressClassifier
+ IpAddressClassifier $ipAddressClassifier,
) {
$this->negativeDnsCache = $negativeDnsCache;
$this->ipAddressClassifier = $ipAddressClassifier;
@@ -100,7 +100,7 @@ class DnsPinMiddleware {
return function (callable $handler) {
return function (
RequestInterface $request,
- array $options
+ array $options,
) use ($handler) {
if ($options['nextcloud']['allow_local_address'] === true) {
return $handler($request, $options);
@@ -132,7 +132,7 @@ class DnsPinMiddleware {
foreach ($targetIps as $ip) {
if ($this->ipAddressClassifier->isLocalAddress($ip)) {
// TODO: continue with all non-local IPs?
- throw new LocalServerException('Host "'.$ip.'" ('.$hostName.':'.$port.') violates local access rules');
+ throw new LocalServerException('Host "' . $ip . '" (' . $hostName . ':' . $port . ') violates local access rules');
}
$curlResolves["$hostName:$port"][] = $ip;
}
diff --git a/lib/private/InitialStateService.php b/lib/private/InitialStateService.php
index 8d364a90f84..c930ffd9466 100644
--- a/lib/private/InitialStateService.php
+++ b/lib/private/InitialStateService.php
@@ -47,12 +47,12 @@ class InitialStateService implements IInitialStateService {
try {
$this->states[$appName][$key] = json_encode($data, JSON_THROW_ON_ERROR);
} catch (\JsonException $e) {
- $this->logger->error('Invalid '. $key . ' data provided to provideInitialState by ' . $appName, ['exception' => $e]);
+ $this->logger->error('Invalid ' . $key . ' data provided to provideInitialState by ' . $appName, ['exception' => $e]);
}
return;
}
- $this->logger->warning('Invalid '. $key . ' data provided to provideInitialState by ' . $appName);
+ $this->logger->warning('Invalid ' . $key . ' data provided to provideInitialState by ' . $appName);
}
public function provideLazyInitialState(string $appName, string $key, Closure $closure): void {
diff --git a/lib/private/Installer.php b/lib/private/Installer.php
index e0f7644304e..d5500c07a3c 100644
--- a/lib/private/Installer.php
+++ b/lib/private/Installer.php
@@ -58,7 +58,7 @@ class Installer {
throw new \Exception('App not found in any app directory');
}
- $basedir = $app['path'].'/'.$appId;
+ $basedir = $app['path'] . '/' . $appId;
if (is_file($basedir . '/appinfo/database.xml')) {
throw new \Exception('The appinfo/database.xml file is not longer supported. Used in ' . $appId);
@@ -122,10 +122,10 @@ class Installer {
//set remote/public handlers
foreach ($info['remote'] as $name => $path) {
- $config->setAppValue('core', 'remote_'.$name, $info['id'].'/'.$path);
+ $config->setAppValue('core', 'remote_' . $name, $info['id'] . '/' . $path);
}
foreach ($info['public'] as $name => $path) {
- $config->setAppValue('core', 'public_'.$name, $info['id'].'/'.$path);
+ $config->setAppValue('core', 'public_' . $name, $info['id'] . '/' . $path);
}
OC_App::setAppTypes($info['id']);
@@ -410,8 +410,8 @@ class Installer {
if ($app === false) {
return false;
}
- $basedir = $app['path'].'/'.$appId;
- return file_exists($basedir.'/.git/');
+ $basedir = $app['path'] . '/' . $appId;
+ return file_exists($basedir . '/.git/');
}
/**
@@ -453,7 +453,7 @@ class Installer {
OC_Helper::rmdirr($appDir);
return true;
} else {
- $this->logger->error('can\'t remove app '.$appId.'. It is not installed.');
+ $this->logger->error('can\'t remove app ' . $appId . '. It is not installed.');
return false;
}
@@ -497,8 +497,8 @@ class Installer {
foreach (\OC::$APPSROOTS as $app_dir) {
if ($dir = opendir($app_dir['path'])) {
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 ($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) {
$enabled = $appManager->isDefaultEnabled($filename);
if (($enabled || in_array($filename, $appManager->getAlwaysEnabledApps()))
@@ -571,10 +571,10 @@ class Installer {
//set remote/public handlers
foreach ($info['remote'] as $name => $path) {
- $config->setAppValue('core', 'remote_'.$name, $app.'/'.$path);
+ $config->setAppValue('core', 'remote_' . $name, $app . '/' . $path);
}
foreach ($info['public'] as $name => $path) {
- $config->setAppValue('core', 'public_'.$name, $app.'/'.$path);
+ $config->setAppValue('core', 'public_' . $name, $app . '/' . $path);
}
OC_App::setAppTypes($info['id']);
diff --git a/lib/private/IntegrityCheck/Checker.php b/lib/private/IntegrityCheck/Checker.php
index 6443c43d210..a6a61555957 100644
--- a/lib/private/IntegrityCheck/Checker.php
+++ b/lib/private/IntegrityCheck/Checker.php
@@ -290,7 +290,7 @@ class Checker {
// Check if certificate is signed by Nextcloud Root Authority
$x509 = new \phpseclib\File\X509();
- $rootCertificatePublicKey = $this->fileAccessHelper->file_get_contents($this->environmentHelper->getServerRoot().'/resources/codesigning/root.crt');
+ $rootCertificatePublicKey = $this->fileAccessHelper->file_get_contents($this->environmentHelper->getServerRoot() . '/resources/codesigning/root.crt');
$rootCerts = $this->splitCerts($rootCertificatePublicKey);
foreach ($rootCerts as $rootCert) {
@@ -383,7 +383,7 @@ class Checker {
/**
* @return array|null Either the results or null if no results available
*/
- public function getResults(): array|null {
+ public function getResults(): ?array {
$cachedResults = $this->cache->get(self::CACHE_KEY);
if (!\is_null($cachedResults) and $cachedResults !== false) {
return json_decode($cachedResults, true);
diff --git a/lib/private/L10N/Factory.php b/lib/private/L10N/Factory.php
index fc76a15b07b..7dd0704682d 100644
--- a/lib/private/L10N/Factory.php
+++ b/lib/private/L10N/Factory.php
@@ -444,7 +444,7 @@ class Factory implements IFactory {
if ($preferred_language === strtolower($available_language)) {
return $this->respectDefaultLanguage($app, $available_language);
}
- if (strtolower($available_language) === $preferred_language_parts[0].'_'.end($preferred_language_parts)) {
+ if (strtolower($available_language) === $preferred_language_parts[0] . '_' . end($preferred_language_parts)) {
return $available_language;
}
}
diff --git a/lib/private/Lock/AbstractLockingProvider.php b/lib/private/Lock/AbstractLockingProvider.php
index aa203f6a90b..d7e5976079c 100644
--- a/lib/private/Lock/AbstractLockingProvider.php
+++ b/lib/private/Lock/AbstractLockingProvider.php
@@ -24,7 +24,9 @@ abstract class AbstractLockingProvider implements ILockingProvider {
*
* @param int $ttl how long until we clear stray locks in seconds
*/
- public function __construct(protected int $ttl) {
+ public function __construct(
+ protected int $ttl,
+ ) {
}
/** @inheritDoc */
diff --git a/lib/private/Lock/DBLockingProvider.php b/lib/private/Lock/DBLockingProvider.php
index d19f2cf3791..cb7f5cff350 100644
--- a/lib/private/Lock/DBLockingProvider.php
+++ b/lib/private/Lock/DBLockingProvider.php
@@ -24,7 +24,7 @@ class DBLockingProvider extends AbstractLockingProvider {
private IDBConnection $connection,
private ITimeFactory $timeFactory,
int $ttl = 3600,
- private bool $cacheSharedLocks = true
+ private bool $cacheSharedLocks = true,
) {
parent::__construct($ttl);
}
diff --git a/lib/private/Log.php b/lib/private/Log.php
index 4f6003cf53d..98de9bfa858 100644
--- a/lib/private/Log.php
+++ b/lib/private/Log.php
@@ -42,7 +42,7 @@ class Log implements ILogger, IDataLogger {
private IWriter $logger,
private SystemConfig $config,
private Normalizer $normalizer = new Normalizer(),
- private ?IRegistry $crashReporters = null
+ private ?IRegistry $crashReporters = null,
) {
}
diff --git a/lib/private/Log/Errorlog.php b/lib/private/Log/Errorlog.php
index d53b8b151a1..6188bb70fd5 100644
--- a/lib/private/Log/Errorlog.php
+++ b/lib/private/Log/Errorlog.php
@@ -26,6 +26,6 @@ class Errorlog extends LogDetails implements IWriter {
* @param string|array $message
*/
public function write(string $app, $message, int $level): void {
- error_log('[' . $this->tag . ']['.$app.']['.$level.'] '.$this->logDetailsAsJSON($app, $message, $level));
+ error_log('[' . $this->tag . '][' . $app . '][' . $level . '] ' . $this->logDetailsAsJSON($app, $message, $level));
}
}
diff --git a/lib/private/Log/File.php b/lib/private/Log/File.php
index bc14de4ffdf..ba428ba185b 100644
--- a/lib/private/Log/File.php
+++ b/lib/private/Log/File.php
@@ -55,7 +55,7 @@ class File extends LogDetails implements IWriter, IFileBased {
@chmod($this->logFile, $this->logFileMode);
}
if ($handle) {
- fwrite($handle, $entry."\n");
+ fwrite($handle, $entry . "\n");
fclose($handle);
} else {
// Fall back to error_log
@@ -91,7 +91,7 @@ class File extends LogDetails implements IWriter, IFileBased {
// Add the first character if at the start of the file,
// because it doesn't hit the else in the loop
if ($pos == 0) {
- $line = $ch.$line;
+ $line = $ch . $line;
}
$entry = json_decode($line);
// Add the line as an entry if it is passed the offset and is equal or above the log level
@@ -105,7 +105,7 @@ class File extends LogDetails implements IWriter, IFileBased {
$line = '';
}
} else {
- $line = $ch.$line;
+ $line = $ch . $line;
}
$pos--;
}
diff --git a/lib/private/Log/LogFactory.php b/lib/private/Log/LogFactory.php
index 612d98c9746..bbe77de198c 100644
--- a/lib/private/Log/LogFactory.php
+++ b/lib/private/Log/LogFactory.php
@@ -49,7 +49,7 @@ class LogFactory implements ILogFactory {
}
protected function buildLogFile(string $logFile = ''): File {
- $defaultLogFile = $this->systemConfig->getValue('datadirectory', \OC::$SERVERROOT.'/data').'/nextcloud.log';
+ $defaultLogFile = $this->systemConfig->getValue('datadirectory', \OC::$SERVERROOT . '/data') . '/nextcloud.log';
if ($logFile === '') {
$logFile = $this->systemConfig->getValue('logfile', $defaultLogFile);
}
diff --git a/lib/private/Log/Rotate.php b/lib/private/Log/Rotate.php
index f2fdb83623d..839c40726b7 100644
--- a/lib/private/Log/Rotate.php
+++ b/lib/private/Log/Rotate.php
@@ -27,7 +27,7 @@ class Rotate extends \OCP\BackgroundJob\Job {
$this->maxSize = $config->getSystemValueInt('log_rotate_size', 100 * 1024 * 1024);
if ($this->shouldRotateBySize()) {
$rotatedFile = $this->rotate();
- $msg = 'Log file "'.$this->filePath.'" was over '.$this->maxSize.' bytes, moved to "'.$rotatedFile.'"';
+ $msg = 'Log file "' . $this->filePath . '" was over ' . $this->maxSize . ' bytes, moved to "' . $rotatedFile . '"';
\OCP\Server::get(LoggerInterface::class)->info($msg, ['app' => Rotate::class]);
}
}
diff --git a/lib/private/Log/Systemdlog.php b/lib/private/Log/Systemdlog.php
index 4e33a4e5419..46de0f7db97 100644
--- a/lib/private/Log/Systemdlog.php
+++ b/lib/private/Log/Systemdlog.php
@@ -58,8 +58,8 @@ class Systemdlog extends LogDetails implements IWriter {
*/
public function write(string $app, $message, int $level): void {
$journal_level = $this->levels[$level];
- sd_journal_send('PRIORITY='.$journal_level,
- 'SYSLOG_IDENTIFIER='.$this->syslogId,
+ sd_journal_send('PRIORITY=' . $journal_level,
+ 'SYSLOG_IDENTIFIER=' . $this->syslogId,
'MESSAGE=' . $this->logDetailsAsJSON($app, $message, $level));
}
}
diff --git a/lib/private/Mail/Attachment.php b/lib/private/Mail/Attachment.php
index 8dede9714f8..2a5246c0019 100644
--- a/lib/private/Mail/Attachment.php
+++ b/lib/private/Mail/Attachment.php
@@ -22,7 +22,7 @@ class Attachment implements IAttachment {
private ?string $body,
private ?string $name,
private ?string $contentType,
- private ?string $path = null
+ private ?string $path = null,
) {
}
diff --git a/lib/private/Mail/Provider/Manager.php b/lib/private/Mail/Provider/Manager.php
index 14ffeac287b..61791620198 100644
--- a/lib/private/Mail/Provider/Manager.php
+++ b/lib/private/Mail/Provider/Manager.php
@@ -125,7 +125,7 @@ class Manager implements IManager {
*
* @return IProvider|null
*/
- public function findProviderById(string $providerId): IProvider|null {
+ public function findProviderById(string $providerId): ?IProvider {
// evaluate if we already have a cached collection of providers
if (!is_array($this->providersCollection)) {
@@ -178,7 +178,7 @@ class Manager implements IManager {
*
* @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 {
// evaluate if provider id was specified
if ($providerId !== null) {
@@ -222,7 +222,7 @@ class Manager implements IManager {
*
* @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 {
// evaluate if provider id was specified
if ($providerId !== null) {
diff --git a/lib/private/Memcache/Factory.php b/lib/private/Memcache/Factory.php
index 370130912d6..1d5bcdac16a 100644
--- a/lib/private/Memcache/Factory.php
+++ b/lib/private/Memcache/Factory.php
@@ -55,7 +55,7 @@ class Factory implements ICacheFactory {
?string $localCacheClass = null,
?string $distributedCacheClass = null,
?string $lockingCacheClass = null,
- string $logFile = ''
+ string $logFile = '',
) {
$this->logFile = $logFile;
diff --git a/lib/private/MemoryInfo.php b/lib/private/MemoryInfo.php
index a90739a6643..9b5c709b4a9 100644
--- a/lib/private/MemoryInfo.php
+++ b/lib/private/MemoryInfo.php
@@ -54,7 +54,7 @@ class MemoryInfo {
if (is_numeric($number)) {
$memoryLimit = Util::numericToNumber($number);
} else {
- throw new \InvalidArgumentException($number.' is not a valid numeric string (in memory_limit ini directive)');
+ throw new \InvalidArgumentException($number . ' is not a valid numeric string (in memory_limit ini directive)');
}
// intended fall through
diff --git a/lib/private/Migration/MetadataManager.php b/lib/private/Migration/MetadataManager.php
index cdaa604ce5a..fac9127a123 100644
--- a/lib/private/Migration/MetadataManager.php
+++ b/lib/private/Migration/MetadataManager.php
@@ -69,7 +69,7 @@ class MetadataManager {
*/
public function getMigrationsAttributesFromReleaseMetadata(
array $metadata,
- bool $filterKnownMigrations = false
+ bool $filterKnownMigrations = false,
): array {
$appsAttributes = [];
foreach (array_keys($metadata['apps']) as $appId) {
diff --git a/lib/private/NaturalSort.php b/lib/private/NaturalSort.php
index 9b097340b63..09c043764a7 100644
--- a/lib/private/NaturalSort.php
+++ b/lib/private/NaturalSort.php
@@ -23,7 +23,7 @@ class NaturalSort {
// or inject an instance of \OC\NaturalSort_DefaultCollator to force using Owncloud's default collator
if (isset($injectedCollator)) {
$this->collator = $injectedCollator;
- \OC::$server->get(LoggerInterface::class)->debug('forced use of '.get_class($injectedCollator));
+ \OC::$server->get(LoggerInterface::class)->debug('forced use of ' . get_class($injectedCollator));
}
}
diff --git a/lib/private/NavigationManager.php b/lib/private/NavigationManager.php
index 169c7aaf350..12bef7daaf9 100644
--- a/lib/private/NavigationManager.php
+++ b/lib/private/NavigationManager.php
@@ -413,7 +413,7 @@ class NavigationManager implements INavigationManager {
$this->unreadCounters[$id] = $unreadCounter;
}
- public function get(string $id): array|null {
+ public function get(string $id): ?array {
$this->init();
foreach ($this->closureEntries as $c) {
$this->add($c());
diff --git a/lib/private/OCS/DiscoveryService.php b/lib/private/OCS/DiscoveryService.php
index fc9c1bd4796..85686e59b02 100644
--- a/lib/private/OCS/DiscoveryService.php
+++ b/lib/private/OCS/DiscoveryService.php
@@ -27,7 +27,7 @@ class DiscoveryService implements IDiscoveryService {
* @param IClientService $clientService
*/
public function __construct(ICacheFactory $cacheFactory,
- IClientService $clientService
+ IClientService $clientService,
) {
$this->cache = $cacheFactory->createDistributed('ocs-discovery');
$this->client = $clientService->newClient();
diff --git a/lib/private/OCS/Provider.php b/lib/private/OCS/Provider.php
index 23547da9433..402b6b7059d 100644
--- a/lib/private/OCS/Provider.php
+++ b/lib/private/OCS/Provider.php
@@ -18,9 +18,11 @@ class Provider extends Controller {
* @param IRequest $request
* @param IAppManager $appManager
*/
- public function __construct($appName,
+ public function __construct(
+ $appName,
\OCP\IRequest $request,
- private \OCP\App\IAppManager $appManager) {
+ private \OCP\App\IAppManager $appManager,
+ ) {
parent::__construct($appName, $request);
}
diff --git a/lib/private/Preview/BackgroundCleanupJob.php b/lib/private/Preview/BackgroundCleanupJob.php
index 44832a78eb9..8449e73983c 100644
--- a/lib/private/Preview/BackgroundCleanupJob.php
+++ b/lib/private/Preview/BackgroundCleanupJob.php
@@ -172,7 +172,7 @@ class BackgroundCleanupJob extends TimedJob {
private function getAllPreviewIds(string $previewRoot, int $chunkSize): \Iterator {
// See `getNewPreviewLocations` for some more info about the logic here
- $like = $this->connection->escapeLikeParameter($previewRoot). '/_/_/_/_/_/_/_/%';
+ $like = $this->connection->escapeLikeParameter($previewRoot) . '/_/_/_/_/_/_/_/%';
$qb = $this->connection->getQueryBuilder();
$qb->select('name', 'fileid')
diff --git a/lib/private/Preview/Generator.php b/lib/private/Preview/Generator.php
index c7eb3121825..ef68c17b896 100644
--- a/lib/private/Preview/Generator.php
+++ b/lib/private/Preview/Generator.php
@@ -41,7 +41,7 @@ class Generator {
IPreview $previewManager,
IAppData $appData,
GeneratorHelper $helper,
- IEventDispatcher $eventDispatcher
+ IEventDispatcher $eventDispatcher,
) {
$this->config = $config;
$this->previewManager = $previewManager;
diff --git a/lib/private/Preview/MimeIconProvider.php b/lib/private/Preview/MimeIconProvider.php
index 167dd21b262..80545bd4063 100644
--- a/lib/private/Preview/MimeIconProvider.php
+++ b/lib/private/Preview/MimeIconProvider.php
@@ -22,7 +22,7 @@ class MimeIconProvider implements IMimeIconProvider {
) {
}
- public function getMimeIconUrl(string $mime): null|string {
+ public function getMimeIconUrl(string $mime): ?string {
if (!$mime) {
return null;
}
@@ -55,7 +55,7 @@ class MimeIconProvider implements IMimeIconProvider {
return null;
}
- private function searchfileName(string $fileName): null|string {
+ private function searchfileName(string $fileName): ?string {
// If the file exists in the current enabled legacy
// custom theme, let's return it
$theme = $this->config->getSystemValue('theme', '');
diff --git a/lib/private/PreviewManager.php b/lib/private/PreviewManager.php
index 6f43687ceea..ae0aa42a522 100644
--- a/lib/private/PreviewManager.php
+++ b/lib/private/PreviewManager.php
@@ -62,7 +62,7 @@ class PreviewManager implements IPreview {
Coordinator $bootstrapCoordinator,
IServerContainer $container,
IBinaryFinder $binaryFinder,
- IMagickSupport $imagickSupport
+ IMagickSupport $imagickSupport,
) {
$this->config = $config;
$this->rootFolder = $rootFolder;
diff --git a/lib/private/Profiler/FileProfilerStorage.php b/lib/private/Profiler/FileProfilerStorage.php
index b4494ef7a37..a4021d064a9 100644
--- a/lib/private/Profiler/FileProfilerStorage.php
+++ b/lib/private/Profiler/FileProfilerStorage.php
@@ -96,7 +96,7 @@ class FileProfilerStorage {
}
if (\function_exists('gzcompress')) {
- $file = 'compress.zlib://'.$file;
+ $file = 'compress.zlib://' . $file;
}
return $this->createProfileFromData($token, unserialize(file_get_contents($file)));
@@ -140,7 +140,7 @@ class FileProfilerStorage {
$context = stream_context_create();
if (\function_exists('gzcompress')) {
- $file = 'compress.zlib://'.$file;
+ $file = 'compress.zlib://' . $file;
stream_context_set_option($context, 'zlib', 'level', 3);
}
@@ -178,7 +178,7 @@ class FileProfilerStorage {
$folderA = substr($token, -2, 2);
$folderB = substr($token, -4, 2);
- return $this->folder.'/'.$folderA.'/'.$folderB.'/'.$token;
+ return $this->folder . '/' . $folderA . '/' . $folderB . '/' . $token;
}
/**
@@ -187,7 +187,7 @@ class FileProfilerStorage {
* @return string The index filename
*/
protected function getIndexFilename(): string {
- return $this->folder.'/index.csv';
+ return $this->folder . '/index.csv';
}
/**
@@ -220,12 +220,12 @@ class FileProfilerStorage {
$buffer = fread($file, $chunkSize);
if (false === ($upTo = strrpos($buffer, "\n"))) {
- $line = $buffer.$line;
+ $line = $buffer . $line;
continue;
}
$position += $upTo;
- $line = substr($buffer, $upTo + 1).$line;
+ $line = substr($buffer, $upTo + 1) . $line;
fseek($file, max(0, $position), \SEEK_SET);
if ($line !== '') {
@@ -258,7 +258,7 @@ class FileProfilerStorage {
}
if (\function_exists('gzcompress')) {
- $file = 'compress.zlib://'.$file;
+ $file = 'compress.zlib://' . $file;
}
$profile->addChild($this->createProfileFromData($token, unserialize(file_get_contents($file)), $profile));
diff --git a/lib/private/Repair.php b/lib/private/Repair.php
index 9d079aabd29..42d3cfb4910 100644
--- a/lib/private/Repair.php
+++ b/lib/private/Repair.php
@@ -77,7 +77,7 @@ class Repair implements IOutput {
public function __construct(
private IEventDispatcher $dispatcher,
- private LoggerInterface $logger
+ private LoggerInterface $logger,
) {
}
diff --git a/lib/private/Repair/Collation.php b/lib/private/Repair/Collation.php
index 9557aabd718..5a309892bf0 100644
--- a/lib/private/Repair/Collation.php
+++ b/lib/private/Repair/Collation.php
@@ -33,7 +33,7 @@ class Collation implements IRepairStep {
IConfig $config,
LoggerInterface $logger,
IDBConnection $connection,
- $ignoreFailures
+ $ignoreFailures,
) {
$this->connection = $connection;
$this->config = $config;
diff --git a/lib/private/Repair/Events/RepairAdvanceEvent.php b/lib/private/Repair/Events/RepairAdvanceEvent.php
index c4be72ce530..476db9e4702 100644
--- a/lib/private/Repair/Events/RepairAdvanceEvent.php
+++ b/lib/private/Repair/Events/RepairAdvanceEvent.php
@@ -16,7 +16,7 @@ class RepairAdvanceEvent extends Event {
public function __construct(
int $increment,
- string $description
+ string $description,
) {
$this->increment = $increment;
$this->description = $description;
diff --git a/lib/private/Repair/Events/RepairErrorEvent.php b/lib/private/Repair/Events/RepairErrorEvent.php
index 8cd5d41b1b4..e5be8a5a031 100644
--- a/lib/private/Repair/Events/RepairErrorEvent.php
+++ b/lib/private/Repair/Events/RepairErrorEvent.php
@@ -14,7 +14,7 @@ class RepairErrorEvent extends Event {
private string $message;
public function __construct(
- string $message
+ string $message,
) {
$this->message = $message;
}
diff --git a/lib/private/Repair/Events/RepairInfoEvent.php b/lib/private/Repair/Events/RepairInfoEvent.php
index c48b295a9a9..ce8eb2f99e6 100644
--- a/lib/private/Repair/Events/RepairInfoEvent.php
+++ b/lib/private/Repair/Events/RepairInfoEvent.php
@@ -14,7 +14,7 @@ class RepairInfoEvent extends Event {
private string $message;
public function __construct(
- string $message
+ string $message,
) {
$this->message = $message;
}
diff --git a/lib/private/Repair/Events/RepairStartEvent.php b/lib/private/Repair/Events/RepairStartEvent.php
index e154df5e6e1..47e713d57d9 100644
--- a/lib/private/Repair/Events/RepairStartEvent.php
+++ b/lib/private/Repair/Events/RepairStartEvent.php
@@ -16,7 +16,7 @@ class RepairStartEvent extends Event {
public function __construct(
int $max,
- string $current
+ string $current,
) {
$this->max = $max;
$this->current = $current;
diff --git a/lib/private/Repair/Events/RepairStepEvent.php b/lib/private/Repair/Events/RepairStepEvent.php
index 7140d13687d..27e1efbdb08 100644
--- a/lib/private/Repair/Events/RepairStepEvent.php
+++ b/lib/private/Repair/Events/RepairStepEvent.php
@@ -14,7 +14,7 @@ class RepairStepEvent extends Event {
private string $stepName;
public function __construct(
- string $stepName
+ string $stepName,
) {
$this->stepName = $stepName;
}
diff --git a/lib/private/Repair/Events/RepairWarningEvent.php b/lib/private/Repair/Events/RepairWarningEvent.php
index 403eec87158..6893a7212ec 100644
--- a/lib/private/Repair/Events/RepairWarningEvent.php
+++ b/lib/private/Repair/Events/RepairWarningEvent.php
@@ -14,7 +14,7 @@ class RepairWarningEvent extends Event {
private string $message;
public function __construct(
- string $message
+ string $message,
) {
$this->message = $message;
}
diff --git a/lib/private/Repair/RepairDavShares.php b/lib/private/Repair/RepairDavShares.php
index 792fdd4033e..36e3c397a39 100644
--- a/lib/private/Repair/RepairDavShares.php
+++ b/lib/private/Repair/RepairDavShares.php
@@ -38,7 +38,7 @@ class RepairDavShares implements IRepairStep {
IConfig $config,
IDBConnection $dbc,
IGroupManager $groupManager,
- LoggerInterface $logger
+ LoggerInterface $logger,
) {
$this->config = $config;
$this->dbc = $dbc;
diff --git a/lib/private/Repair/RepairMimeTypes.php b/lib/private/Repair/RepairMimeTypes.php
index 6ff6d1ddd94..715f7623440 100644
--- a/lib/private/Repair/RepairMimeTypes.php
+++ b/lib/private/Repair/RepairMimeTypes.php
@@ -26,7 +26,7 @@ class RepairMimeTypes implements IRepairStep {
public function __construct(
protected IConfig $config,
protected IAppConfig $appConfig,
- protected IDBConnection $connection
+ protected IDBConnection $connection,
) {
}
diff --git a/lib/private/RichObjectStrings/Validator.php b/lib/private/RichObjectStrings/Validator.php
index 197f48ed48c..c7e4dcf50b9 100644
--- a/lib/private/RichObjectStrings/Validator.php
+++ b/lib/private/RichObjectStrings/Validator.php
@@ -76,7 +76,7 @@ class Validator implements IValidator {
$missingKeys = array_diff($requiredParameters, array_keys($parameter));
if (!empty($missingKeys)) {
- throw new InvalidObjectExeption('Object is invalid, missing keys:'.json_encode($missingKeys));
+ throw new InvalidObjectExeption('Object is invalid, missing keys:' . json_encode($missingKeys));
}
foreach ($parameter as $key => $value) {
diff --git a/lib/private/Route/Router.php b/lib/private/Route/Router.php
index ba369eecac0..7ec2aac021c 100644
--- a/lib/private/Route/Router.php
+++ b/lib/private/Route/Router.php
@@ -155,7 +155,7 @@ class Router implements IRouter {
$this->root->addCollection($collection);
// Also add the OCS collection
- $collection = $this->getCollection($app.'.ocs');
+ $collection = $this->getCollection($app . '.ocs');
$collection->addPrefix('/ocsapp');
$this->root->addCollection($collection);
}
diff --git a/lib/private/Search/Filter/BooleanFilter.php b/lib/private/Search/Filter/BooleanFilter.php
index 92572a60073..894dc13b657 100644
--- a/lib/private/Search/Filter/BooleanFilter.php
+++ b/lib/private/Search/Filter/BooleanFilter.php
@@ -19,7 +19,7 @@ class BooleanFilter implements IFilter {
$this->value = match ($value) {
'true', 'yes', 'y', '1' => true,
'false', 'no', 'n', '0', '' => false,
- default => throw new InvalidArgumentException('Invalid boolean value '. $value),
+ default => throw new InvalidArgumentException('Invalid boolean value ' . $value),
};
}
diff --git a/lib/private/Search/Filter/DateTimeFilter.php b/lib/private/Search/Filter/DateTimeFilter.php
index 367af80b505..48c1725a5e1 100644
--- a/lib/private/Search/Filter/DateTimeFilter.php
+++ b/lib/private/Search/Filter/DateTimeFilter.php
@@ -17,7 +17,7 @@ class DateTimeFilter implements IFilter {
public function __construct(string $value) {
if (filter_var($value, FILTER_VALIDATE_INT)) {
- $value = '@'.$value;
+ $value = '@' . $value;
}
$this->value = new DateTimeImmutable($value);
diff --git a/lib/private/Search/Filter/FloatFilter.php b/lib/private/Search/Filter/FloatFilter.php
index 97d767e62cb..f2384552943 100644
--- a/lib/private/Search/Filter/FloatFilter.php
+++ b/lib/private/Search/Filter/FloatFilter.php
@@ -18,7 +18,7 @@ class FloatFilter implements IFilter {
public function __construct(string $value) {
$this->value = filter_var($value, FILTER_VALIDATE_FLOAT);
if ($this->value === false) {
- throw new InvalidArgumentException('Invalid float value '. $value);
+ throw new InvalidArgumentException('Invalid float value ' . $value);
}
}
diff --git a/lib/private/Search/Filter/GroupFilter.php b/lib/private/Search/Filter/GroupFilter.php
index e7694a6daa2..fe0b2ce42d8 100644
--- a/lib/private/Search/Filter/GroupFilter.php
+++ b/lib/private/Search/Filter/GroupFilter.php
@@ -23,7 +23,7 @@ class GroupFilter implements IFilter {
) {
$group = $groupManager->get($value);
if ($group === null) {
- throw new InvalidArgumentException('Group '.$value.' not found');
+ throw new InvalidArgumentException('Group ' . $value . ' not found');
}
$this->group = $group;
}
diff --git a/lib/private/Search/Filter/IntegerFilter.php b/lib/private/Search/Filter/IntegerFilter.php
index 825c7ddd3eb..028b7d0678f 100644
--- a/lib/private/Search/Filter/IntegerFilter.php
+++ b/lib/private/Search/Filter/IntegerFilter.php
@@ -18,7 +18,7 @@ class IntegerFilter implements IFilter {
public function __construct(string $value) {
$this->value = filter_var($value, FILTER_VALIDATE_INT);
if ($this->value === false) {
- throw new InvalidArgumentException('Invalid integer value '. $value);
+ throw new InvalidArgumentException('Invalid integer value ' . $value);
}
}
diff --git a/lib/private/Search/Filter/UserFilter.php b/lib/private/Search/Filter/UserFilter.php
index fbbc793e633..4f2061a4ba6 100644
--- a/lib/private/Search/Filter/UserFilter.php
+++ b/lib/private/Search/Filter/UserFilter.php
@@ -23,7 +23,7 @@ class UserFilter implements IFilter {
) {
$user = $userManager->get($value);
if ($user === null) {
- throw new InvalidArgumentException('User '.$value.' not found');
+ throw new InvalidArgumentException('User ' . $value . ' not found');
}
$this->user = $user;
}
diff --git a/lib/private/Search/FilterFactory.php b/lib/private/Search/FilterFactory.php
index 1466042291d..07063c604f4 100644
--- a/lib/private/Search/FilterFactory.php
+++ b/lib/private/Search/FilterFactory.php
@@ -28,7 +28,7 @@ final class FilterFactory {
FilterDefinition::TYPE_PERSON => self::getPerson($filter),
FilterDefinition::TYPE_STRING => new Filter\StringFilter($filter),
FilterDefinition::TYPE_STRINGS => new Filter\StringsFilter(... (array)$filter),
- default => throw new RuntimeException('Invalid filter type '. $type),
+ default => throw new RuntimeException('Invalid filter type ' . $type),
};
}
diff --git a/lib/private/Search/SearchComposer.php b/lib/private/Search/SearchComposer.php
index 8108c6bcde4..d23662f7055 100644
--- a/lib/private/Search/SearchComposer.php
+++ b/lib/private/Search/SearchComposer.php
@@ -59,7 +59,7 @@ class SearchComposer {
private Coordinator $bootstrapCoordinator,
private ContainerInterface $container,
private IURLGenerator $urlGenerator,
- private LoggerInterface $logger
+ private LoggerInterface $logger,
) {
$this->commonFilters = [
IFilter::BUILTIN_TERM => new FilterDefinition(IFilter::BUILTIN_TERM, FilterDefinition::TYPE_STRING),
@@ -130,7 +130,7 @@ class SearchComposer {
}
foreach ($provider->getSupportedFilters() as $filterName) {
if ($this->getFilterDefinition($filterName, $providerId) === null) {
- throw new InvalidArgumentException('Invalid filter '. $filterName);
+ throw new InvalidArgumentException('Invalid filter ' . $filterName);
}
}
}
@@ -202,10 +202,10 @@ class SearchComposer {
private function fetchIcon(string $appId, string $providerId): string {
$icons = [
- [$providerId, $providerId.'.svg'],
+ [$providerId, $providerId . '.svg'],
[$providerId, 'app.svg'],
- [$appId, $providerId.'.svg'],
- [$appId, $appId.'.svg'],
+ [$appId, $providerId . '.svg'],
+ [$appId, $appId . '.svg'],
[$appId, 'app.svg'],
['core', 'places/default-app-icon.svg'],
];
diff --git a/lib/private/Search/UnsupportedFilter.php b/lib/private/Search/UnsupportedFilter.php
index bf251a91d31..ea520e6b872 100644
--- a/lib/private/Search/UnsupportedFilter.php
+++ b/lib/private/Search/UnsupportedFilter.php
@@ -12,6 +12,6 @@ use Exception;
final class UnsupportedFilter extends Exception {
public function __construct(string $filerName, $providerId) {
- parent::__construct('Provider '.$providerId.' doesn’t support filter '.$filerName.'.');
+ parent::__construct('Provider ' . $providerId . ' doesn’t support filter ' . $filerName . '.');
}
}
diff --git a/lib/private/Security/Bruteforce/Backend/MemoryCacheBackend.php b/lib/private/Security/Bruteforce/Backend/MemoryCacheBackend.php
index bf076240bf8..9a0723db47e 100644
--- a/lib/private/Security/Bruteforce/Backend/MemoryCacheBackend.php
+++ b/lib/private/Security/Bruteforce/Backend/MemoryCacheBackend.php
@@ -137,7 +137,7 @@ class MemoryCacheBackend implements IBackend {
$existingAttempts = array_values($existingAttempts);
// Store the new attempt
- $existingAttempts[] = $timestamp . '#' . $this->hash($action) . '#' . $this->hash($metadata);
+ $existingAttempts[] = $timestamp . '#' . $this->hash($action) . '#' . $this->hash($metadata);
$this->cache->set($identifier, json_encode($existingAttempts), 12 * 3600);
}
diff --git a/lib/private/Security/CSP/ContentSecurityPolicyManager.php b/lib/private/Security/CSP/ContentSecurityPolicyManager.php
index 77ecceb03c3..e9d6b2945a8 100644
--- a/lib/private/Security/CSP/ContentSecurityPolicyManager.php
+++ b/lib/private/Security/CSP/ContentSecurityPolicyManager.php
@@ -52,13 +52,13 @@ class ContentSecurityPolicyManager implements IContentSecurityPolicyManager {
EmptyContentSecurityPolicy $originalPolicy,
): ContentSecurityPolicy {
foreach ((object)(array)$originalPolicy as $name => $value) {
- $setter = 'set'.ucfirst($name);
+ $setter = 'set' . ucfirst($name);
if (\is_array($value)) {
- $getter = 'get'.ucfirst($name);
+ $getter = 'get' . ucfirst($name);
$currentValues = \is_array($defaultPolicy->$getter()) ? $defaultPolicy->$getter() : [];
$defaultPolicy->$setter(array_values(array_unique(array_merge($currentValues, $value))));
} elseif (\is_bool($value)) {
- $getter = 'is'.ucfirst($name);
+ $getter = 'is' . ucfirst($name);
$currentValue = $defaultPolicy->$getter();
// true wins over false
if ($value > $currentValue) {
diff --git a/lib/private/Security/Crypto.php b/lib/private/Security/Crypto.php
index b03f8a4ddce..f7f62aadb7b 100644
--- a/lib/private/Security/Crypto.php
+++ b/lib/private/Security/Crypto.php
@@ -78,9 +78,9 @@ class Crypto implements ICrypto {
$ciphertext = bin2hex($encrypted);
$iv = bin2hex($iv);
- $hmac = bin2hex($this->calculateHMAC($ciphertext.$iv, substr($keyMaterial, 32)));
+ $hmac = bin2hex($this->calculateHMAC($ciphertext . $iv, substr($keyMaterial, 32)));
- return $ciphertext.'|'.$iv.'|'.$hmac.'|3';
+ return $ciphertext . '|' . $iv . '|' . $hmac . '|3';
}
/**
diff --git a/lib/private/Security/Hasher.php b/lib/private/Security/Hasher.php
index 3ab0e1bbcac..ba661f5a356 100644
--- a/lib/private/Security/Hasher.php
+++ b/lib/private/Security/Hasher.php
@@ -106,7 +106,7 @@ class Hasher implements IHasher {
// Verify whether it matches a legacy PHPass or SHA1 string
$hashLength = \strlen($hash);
- if (($hashLength === 60 && password_verify($message.$this->legacySalt, $hash)) ||
+ if (($hashLength === 60 && password_verify($message . $this->legacySalt, $hash)) ||
($hashLength === 40 && hash_equals($hash, sha1($message)))) {
$newHash = $this->hash($message);
return true;
diff --git a/lib/private/Security/Normalizer/IpAddress.php b/lib/private/Security/Normalizer/IpAddress.php
index dc7c784fa4c..e9232c5fe9f 100644
--- a/lib/private/Security/Normalizer/IpAddress.php
+++ b/lib/private/Security/Normalizer/IpAddress.php
@@ -38,7 +38,7 @@ class IpAddress {
$binary = \inet_pton($ip);
$mask = inet_pton('FFFF:FFFF:FFFF:FFFF::');
- return inet_ntop($binary & $mask).'/64';
+ return inet_ntop($binary & $mask) . '/64';
}
/**
@@ -67,12 +67,12 @@ class IpAddress {
*/
public function getSubnet(): string {
if (filter_var($this->ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {
- return $this->ip.'/32';
+ return $this->ip . '/32';
}
$ipv4 = $this->getEmbeddedIpv4($this->ip);
if ($ipv4 !== null) {
- return $ipv4.'/32';
+ return $ipv4 . '/32';
}
return $this->getIPv6Subnet($this->ip);
diff --git a/lib/private/Security/RateLimiting/Backend/DatabaseBackend.php b/lib/private/Security/RateLimiting/Backend/DatabaseBackend.php
index 34fddff539b..8adcd8e168c 100644
--- a/lib/private/Security/RateLimiting/Backend/DatabaseBackend.php
+++ b/lib/private/Security/RateLimiting/Backend/DatabaseBackend.php
@@ -20,7 +20,7 @@ class DatabaseBackend implements IBackend {
public function __construct(
private IConfig $config,
private IDBConnection $dbConnection,
- private ITimeFactory $timeFactory
+ private ITimeFactory $timeFactory,
) {
}
@@ -35,7 +35,7 @@ class DatabaseBackend implements IBackend {
* @throws Exception
*/
private function getExistingAttemptCount(
- string $identifier
+ string $identifier,
): int {
$currentTime = $this->timeFactory->getDateTime();
diff --git a/lib/private/Security/VerificationToken/VerificationToken.php b/lib/private/Security/VerificationToken/VerificationToken.php
index f99e6745952..1995b482597 100644
--- a/lib/private/Security/VerificationToken/VerificationToken.php
+++ b/lib/private/Security/VerificationToken/VerificationToken.php
@@ -25,7 +25,7 @@ class VerificationToken implements IVerificationToken {
private ICrypto $crypto,
private ITimeFactory $timeFactory,
private ISecureRandom $secureRandom,
- private IJobList $jobList
+ private IJobList $jobList,
) {
}
@@ -53,7 +53,7 @@ class VerificationToken implements IVerificationToken {
}
try {
- $decryptedToken = $this->crypto->decrypt($encryptedToken, $passwordPrefix.$this->config->getSystemValueString('secret'));
+ $decryptedToken = $this->crypto->decrypt($encryptedToken, $passwordPrefix . $this->config->getSystemValueString('secret'));
} catch (\Exception $e) {
// Retry with empty secret as a fallback for instances where the secret might not have been set by accident
try {
@@ -85,11 +85,11 @@ class VerificationToken implements IVerificationToken {
): string {
$token = $this->secureRandom->generate(
21,
- ISecureRandom::CHAR_DIGITS.
- ISecureRandom::CHAR_LOWER.
+ ISecureRandom::CHAR_DIGITS .
+ ISecureRandom::CHAR_LOWER .
ISecureRandom::CHAR_UPPER
);
- $tokenValue = $this->timeFactory->getTime() .':'. $token;
+ $tokenValue = $this->timeFactory->getTime() . ':' . $token;
$encryptedValue = $this->crypto->encrypt($tokenValue, $passwordPrefix . $this->config->getSystemValueString('secret'));
$this->config->setUserValue($user->getUID(), 'core', $subject, $encryptedValue);
$jobArgs = json_encode([
diff --git a/lib/private/Settings/Manager.php b/lib/private/Settings/Manager.php
index 3d4ea8ea39f..c96c04f34ff 100644
--- a/lib/private/Settings/Manager.php
+++ b/lib/private/Settings/Manager.php
@@ -53,7 +53,7 @@ class Manager implements IManager {
IServerContainer $container,
AuthorizedGroupMapper $mapper,
IGroupManager $groupManager,
- ISubAdmin $subAdmin
+ ISubAdmin $subAdmin,
) {
$this->log = $log;
$this->l10nFactory = $l10nFactory;
diff --git a/lib/private/Setup.php b/lib/private/Setup.php
index fb054bca4e0..fa10f238bde 100644
--- a/lib/private/Setup.php
+++ b/lib/private/Setup.php
@@ -44,7 +44,7 @@ class Setup {
protected Defaults $defaults,
protected LoggerInterface $logger,
protected ISecureRandom $random,
- protected Installer $installer
+ protected Installer $installer,
) {
$this->l10n = $l10nFactory->get('lib');
}
@@ -377,7 +377,7 @@ class Setup {
//and we are done
$config->setSystemValue('installed', true);
if (self::shouldRemoveCanInstallFile()) {
- unlink(\OC::$configDir.'/CAN_INSTALL');
+ unlink(\OC::$configDir . '/CAN_INSTALL');
}
$bootstrapCoordinator = \OCP\Server::get(\OC\AppFramework\Bootstrap\Coordinator::class);
@@ -561,11 +561,11 @@ class Setup {
}
public function shouldRemoveCanInstallFile(): bool {
- return \OC_Util::getChannel() !== 'git' && is_file(\OC::$configDir.'/CAN_INSTALL');
+ return \OC_Util::getChannel() !== 'git' && is_file(\OC::$configDir . '/CAN_INSTALL');
}
public function canInstallFileExists(): bool {
- return is_file(\OC::$configDir.'/CAN_INSTALL');
+ return is_file(\OC::$configDir . '/CAN_INSTALL');
}
protected function outputDebug(?IOutput $output, string $message): void {
diff --git a/lib/private/Setup/AbstractDatabase.php b/lib/private/Setup/AbstractDatabase.php
index b1d93f55cc0..dbbb587206b 100644
--- a/lib/private/Setup/AbstractDatabase.php
+++ b/lib/private/Setup/AbstractDatabase.php
@@ -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/MySQL.php b/lib/private/Setup/MySQL.php
index 93aee667d18..2708ada31c1 100644
--- a/lib/private/Setup/MySQL.php
+++ b/lib/private/Setup/MySQL.php
@@ -41,7 +41,7 @@ class MySQL extends AbstractDatabase {
//fill the database if needed
$query = 'select count(*) from information_schema.tables where table_schema=? AND table_name = ?';
- $connection->executeQuery($query, [$this->dbName, $this->tablePrefix.'users']);
+ $connection->executeQuery($query, [$this->dbName, $this->tablePrefix . 'users']);
$connection->close();
$connection = $this->connect();
diff --git a/lib/private/SetupCheck/SetupCheckManager.php b/lib/private/SetupCheck/SetupCheckManager.php
index 41f393fef7a..721885848e2 100644
--- a/lib/private/SetupCheck/SetupCheckManager.php
+++ b/lib/private/SetupCheck/SetupCheckManager.php
@@ -29,12 +29,12 @@ class SetupCheckManager implements ISetupCheckManager {
foreach ($setupChecks as $setupCheck) {
/** @var ISetupCheck $setupCheckObject */
$setupCheckObject = Server::get($setupCheck->getService());
- $this->logger->debug('Running check '.get_class($setupCheckObject));
+ $this->logger->debug('Running check ' . get_class($setupCheckObject));
try {
$setupResult = $setupCheckObject->run();
} catch (\Throwable $t) {
$setupResult = SetupResult::error("An exception occured while running the setup check:\n$t");
- $this->logger->error('Exception running check '.get_class($setupCheckObject).': '.$t->getMessage(), ['exception' => $t]);
+ $this->logger->error('Exception running check ' . get_class($setupCheckObject) . ': ' . $t->getMessage(), ['exception' => $t]);
}
$setupResult->setName($setupCheckObject->getName());
$category = $setupCheckObject->getCategory();
diff --git a/lib/private/Share/Share.php b/lib/private/Share/Share.php
index 0af264fb968..56a4c6410c5 100644
--- a/lib/private/Share/Share.php
+++ b/lib/private/Share/Share.php
@@ -54,8 +54,8 @@ class Share extends Constants {
return true;
}
\OC::$server->get(LoggerInterface::class)->warning(
- 'Sharing backend '.$class.' not registered, '.self::$backendTypes[$itemType]['class']
- .' is already registered for '.$itemType,
+ 'Sharing backend ' . $class . ' not registered, ' . self::$backendTypes[$itemType]['class']
+ . ' is already registered for ' . $itemType,
['app' => 'files_sharing']);
}
return false;
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php
index 5457e8024a4..d82e57415d3 100644
--- a/lib/private/Share20/Manager.php
+++ b/lib/private/Share20/Manager.php
@@ -54,7 +54,7 @@ use Psr\Log\LoggerInterface;
*/
class Manager implements IManager {
- private IL10N|null $l;
+ private ?IL10N $l;
private LegacyHooks $legacyHooks;
public function __construct(
@@ -75,7 +75,7 @@ class Manager implements IManager {
private IUserSession $userSession,
private KnownUserService $knownUserService,
private ShareDisableChecker $shareDisableChecker,
- private IDateTimeZone $dateTimeZone
+ private IDateTimeZone $dateTimeZone,
) {
$this->l = $this->l10nFactory->get('lib');
// The constructor of LegacyHooks registers the listeners of share events
diff --git a/lib/private/SystemTag/SystemTagManager.php b/lib/private/SystemTag/SystemTagManager.php
index e99213b618b..1a0d8fb618a 100644
--- a/lib/private/SystemTag/SystemTagManager.php
+++ b/lib/private/SystemTag/SystemTagManager.php
@@ -110,7 +110,7 @@ class SystemTagManager implements ISystemTagManager {
$query->andWhere(
$query->expr()->like(
'name',
- $query->createNamedParameter('%' . $this->connection->escapeLikeParameter($nameSearchPattern). '%')
+ $query->createNamedParameter('%' . $this->connection->escapeLikeParameter($nameSearchPattern) . '%')
)
);
}
@@ -146,7 +146,7 @@ class SystemTagManager implements ISystemTagManager {
$result->closeCursor();
if (!$row) {
throw new TagNotFoundException(
- 'Tag ("' . $truncatedTagName . '", '. $userVisible . ', ' . $userAssignable . ') does not exist'
+ 'Tag ("' . $truncatedTagName . '", ' . $userVisible . ', ' . $userAssignable . ') does not exist'
);
}
@@ -171,7 +171,7 @@ class SystemTagManager implements ISystemTagManager {
$query->execute();
} catch (UniqueConstraintViolationException $e) {
throw new TagAlreadyExistsException(
- 'Tag ("' . $truncatedTagName . '", '. $userVisible . ', ' . $userAssignable . ') already exists',
+ 'Tag ("' . $truncatedTagName . '", ' . $userVisible . ', ' . $userAssignable . ') already exists',
0,
$e
);
@@ -239,7 +239,7 @@ class SystemTagManager implements ISystemTagManager {
}
} catch (UniqueConstraintViolationException $e) {
throw new TagAlreadyExistsException(
- 'Tag ("' . $newName . '", '. $userVisible . ', ' . $userAssignable . ') already exists',
+ 'Tag ("' . $newName . '", ' . $userVisible . ', ' . $userAssignable . ') already exists',
0,
$e
);
diff --git a/lib/private/SystemTag/SystemTagsInFilesDetector.php b/lib/private/SystemTag/SystemTagsInFilesDetector.php
index a8dfec264a0..9268b7ab098 100644
--- a/lib/private/SystemTag/SystemTagsInFilesDetector.php
+++ b/lib/private/SystemTag/SystemTagsInFilesDetector.php
@@ -26,7 +26,7 @@ class SystemTagsInFilesDetector {
Folder $folder,
string $filteredMediaType = '',
int $limit = 0,
- int $offset = 0
+ int $offset = 0,
): array {
$operator = new SearchComparison(ISearchComparison::COMPARE_LIKE, 'systemtag', '%');
// Currently query has to have exactly one search condition. If no media type is provided,
diff --git a/lib/private/Tags.php b/lib/private/Tags.php
index 6a31ac94ef6..350c49bca2c 100644
--- a/lib/private/Tags.php
+++ b/lib/private/Tags.php
@@ -506,7 +506,7 @@ class Tags implements ITags {
if (is_string($tag) && !is_numeric($tag)) {
$tag = trim($tag);
if ($tag === '') {
- $this->logger->debug(__METHOD__.', Cannot add an empty tag');
+ $this->logger->debug(__METHOD__ . ', Cannot add an empty tag');
return false;
}
if (!$this->hasTag($tag)) {
@@ -546,7 +546,7 @@ class Tags implements ITags {
if (is_string($tag) && !is_numeric($tag)) {
$tag = trim($tag);
if ($tag === '') {
- $this->logger->debug(__METHOD__.', Tag name is empty');
+ $this->logger->debug(__METHOD__ . ', Tag name is empty');
return false;
}
$tagId = $this->getTagId($tag);
diff --git a/lib/private/TaskProcessing/Db/Task.php b/lib/private/TaskProcessing/Db/Task.php
index 6787c11344a..4d919deaf94 100644
--- a/lib/private/TaskProcessing/Db/Task.php
+++ b/lib/private/TaskProcessing/Db/Task.php
@@ -98,7 +98,7 @@ class Task extends Entity {
public function toRow(): array {
return array_combine(self::$columns, array_map(function ($field) {
- return $this->{'get'.ucfirst($field)}();
+ return $this->{'get' . ucfirst($field)}();
}, self::$fields));
}
diff --git a/lib/private/TaskProcessing/Manager.php b/lib/private/TaskProcessing/Manager.php
index 29153ca56f9..36089f50f7f 100644
--- a/lib/private/TaskProcessing/Manager.php
+++ b/lib/private/TaskProcessing/Manager.php
@@ -312,7 +312,7 @@ class Manager implements IManager {
$resources = [];
$files = [];
for ($i = 0; $i < $input['numberOfImages']; $i++) {
- $file = $folder->newFile(time() . '-' . rand(1, 100000) . '-' . $i);
+ $file = $folder->newFile(time() . '-' . rand(1, 100000) . '-' . $i);
$files[] = $file;
$resource = $file->write();
if ($resource !== false && $resource !== true && is_resource($resource)) {
@@ -593,7 +593,7 @@ class Manager implements IManager {
$type->validateInput($io[$key]);
if ($type === EShapeType::Enum) {
if (!isset($enumValues[$key])) {
- throw new ValidationException('Provider did not provide enum values for an enum slot: "' . $key .'"');
+ throw new ValidationException('Provider did not provide enum values for an enum slot: "' . $key . '"');
}
$type->validateEnum($io[$key], $enumValues[$key]);
}
@@ -1048,7 +1048,7 @@ class Manager implements IManager {
public function getTasks(
?string $userId, ?string $taskTypeId = null, ?string $appId = null, ?string $customId = null,
- ?int $status = null, ?int $scheduleAfter = null, ?int $endedBefore = null
+ ?int $status = null, ?int $scheduleAfter = null, ?int $endedBefore = null,
): array {
try {
$taskEntities = $this->taskMapper->findTasks($userId, $taskTypeId, $appId, $customId, $status, $scheduleAfter, $endedBefore);
@@ -1203,7 +1203,7 @@ class Manager implements IManager {
$provider = $this->getPreferredProvider($task->getTaskTypeId());
// calculate expected completion time
$completionExpectedAt = new \DateTime('now');
- $completionExpectedAt->add(new \DateInterval('PT'.$provider->getExpectedRuntime().'S'));
+ $completionExpectedAt->add(new \DateInterval('PT' . $provider->getExpectedRuntime() . 'S'));
$task->setCompletionExpectedAt($completionExpectedAt);
}
diff --git a/lib/private/Teams/TeamManager.php b/lib/private/Teams/TeamManager.php
index 3d5f9f6d2a2..223579a1182 100644
--- a/lib/private/Teams/TeamManager.php
+++ b/lib/private/Teams/TeamManager.php
@@ -62,7 +62,7 @@ class TeamManager implements ITeamManager {
return $providers[$providerId];
}
- throw new \RuntimeException('No provider found for id ' .$providerId);
+ throw new \RuntimeException('No provider found for id ' . $providerId);
}
public function getSharedWith(string $teamId, string $userId): array {
diff --git a/lib/private/Template/Base.php b/lib/private/Template/Base.php
index b48c10143cf..602c8e6257e 100644
--- a/lib/private/Template/Base.php
+++ b/lib/private/Template/Base.php
@@ -46,15 +46,15 @@ class Base {
*/
protected function getAppTemplateDirs($theme, $app, $serverRoot, $app_dir) {
// Check if the app is in the app folder or in the root
- if ($app_dir !== false && file_exists($app_dir.'/templates/')) {
+ if ($app_dir !== false && file_exists($app_dir . '/templates/')) {
return [
- $serverRoot.'/themes/'.$theme.'/apps/'.$app.'/templates/',
- $app_dir.'/templates/',
+ $serverRoot . '/themes/' . $theme . '/apps/' . $app . '/templates/',
+ $app_dir . '/templates/',
];
}
return [
- $serverRoot.'/themes/'.$theme.'/'.$app.'/templates/',
- $serverRoot.'/'.$app.'/templates/',
+ $serverRoot . '/themes/' . $theme . '/' . $app . '/templates/',
+ $serverRoot . '/' . $app . '/templates/',
];
}
@@ -65,8 +65,8 @@ class Base {
*/
protected function getCoreTemplateDirs($theme, $serverRoot) {
return [
- $serverRoot.'/themes/'.$theme.'/core/templates/',
- $serverRoot.'/core/templates/',
+ $serverRoot . '/themes/' . $theme . '/core/templates/',
+ $serverRoot . '/core/templates/',
];
}
diff --git a/lib/private/Template/CSSResourceLocator.php b/lib/private/Template/CSSResourceLocator.php
index e9aa38ef2cc..b501fd69874 100644
--- a/lib/private/Template/CSSResourceLocator.php
+++ b/lib/private/Template/CSSResourceLocator.php
@@ -19,8 +19,8 @@ class CSSResourceLocator extends ResourceLocator {
*/
public function doFind($style) {
$app = substr($style, 0, strpos($style, '/'));
- if ($this->appendIfExist($this->serverroot, $style.'.css')
- || $this->appendIfExist($this->serverroot, 'core/'.$style.'.css')
+ if ($this->appendIfExist($this->serverroot, $style . '.css')
+ || $this->appendIfExist($this->serverroot, 'core/' . $style . '.css')
) {
return;
}
@@ -41,17 +41,17 @@ class CSSResourceLocator extends ResourceLocator {
// turned into cwd.
$app_path = realpath($app_path);
- $this->append($app_path, $style.'.css', $app_url);
+ $this->append($app_path, $style . '.css', $app_url);
}
/**
* @param string $style
*/
public function doFindTheme($style) {
- $theme_dir = 'themes/'.$this->theme.'/';
- $this->appendIfExist($this->serverroot, $theme_dir.'apps/'.$style.'.css')
- || $this->appendIfExist($this->serverroot, $theme_dir.$style.'.css')
- || $this->appendIfExist($this->serverroot, $theme_dir.'core/'.$style.'.css');
+ $theme_dir = 'themes/' . $this->theme . '/';
+ $this->appendIfExist($this->serverroot, $theme_dir . 'apps/' . $style . '.css')
+ || $this->appendIfExist($this->serverroot, $theme_dir . $style . '.css')
+ || $this->appendIfExist($this->serverroot, $theme_dir . 'core/' . $style . '.css');
}
public function append($root, $file, $webRoot = null, $throw = true, $scss = false) {
diff --git a/lib/private/Template/JSConfigHelper.php b/lib/private/Template/JSConfigHelper.php
index a4984eaf930..1dec8634aca 100644
--- a/lib/private/Template/JSConfigHelper.php
+++ b/lib/private/Template/JSConfigHelper.php
@@ -282,7 +282,7 @@ class JSConfigHelper {
// Echo it
foreach ($array as $setting => $value) {
- $result .= 'var '. $setting . '='. $value . ';' . PHP_EOL;
+ $result .= 'var ' . $setting . '=' . $value . ';' . PHP_EOL;
}
return $result;
diff --git a/lib/private/Template/JSResourceLocator.php b/lib/private/Template/JSResourceLocator.php
index b9a2fce6cd5..aad999f939a 100644
--- a/lib/private/Template/JSResourceLocator.php
+++ b/lib/private/Template/JSResourceLocator.php
@@ -26,7 +26,7 @@ class JSResourceLocator extends ResourceLocator {
* @param string $script
*/
public function doFind($script) {
- $theme_dir = 'themes/'.$this->theme.'/';
+ $theme_dir = 'themes/' . $this->theme . '/';
// Extracting the appId and the script file name
$app = substr($script, 0, strpos($script, '/'));
@@ -52,29 +52,29 @@ class JSResourceLocator extends ResourceLocator {
// For language files we try to load them all, so themes can overwrite
// single l10n strings without having to translate all of them.
$found = 0;
- $found += $this->appendScriptIfExist($this->serverroot, 'core/'.$script);
- $found += $this->appendScriptIfExist($this->serverroot, $theme_dir.'core/'.$script);
+ $found += $this->appendScriptIfExist($this->serverroot, 'core/' . $script);
+ $found += $this->appendScriptIfExist($this->serverroot, $theme_dir . 'core/' . $script);
$found += $this->appendScriptIfExist($this->serverroot, $script);
- $found += $this->appendScriptIfExist($this->serverroot, $theme_dir.$script);
+ $found += $this->appendScriptIfExist($this->serverroot, $theme_dir . $script);
$found += $this->appendScriptIfExist($appRoot, $script, $appWebRoot);
- $found += $this->appendScriptIfExist($this->serverroot, $theme_dir.'apps/'.$script);
+ $found += $this->appendScriptIfExist($this->serverroot, $theme_dir . 'apps/' . $script);
if ($found) {
return;
}
- } elseif ($this->appendScriptIfExist($this->serverroot, $theme_dir.'apps/'.$script)
- || $this->appendScriptIfExist($this->serverroot, $theme_dir.$script)
+ } elseif ($this->appendScriptIfExist($this->serverroot, $theme_dir . 'apps/' . $script)
+ || $this->appendScriptIfExist($this->serverroot, $theme_dir . $script)
|| $this->appendScriptIfExist($this->serverroot, $script)
- || $this->appendScriptIfExist($this->serverroot, $theme_dir."dist/$app-$scriptName")
+ || $this->appendScriptIfExist($this->serverroot, $theme_dir . "dist/$app-$scriptName")
|| $this->appendScriptIfExist($this->serverroot, "dist/$app-$scriptName")
|| $this->appendScriptIfExist($appRoot, $script, $appWebRoot)
- || $this->cacheAndAppendCombineJsonIfExist($this->serverroot, $script.'.json')
- || $this->cacheAndAppendCombineJsonIfExist($appRoot, $script.'.json', $appWebRoot)
- || $this->appendScriptIfExist($this->serverroot, $theme_dir.'core/'.$script)
- || $this->appendScriptIfExist($this->serverroot, 'core/'.$script)
- || (strpos($scriptName, '/') === -1 && ($this->appendScriptIfExist($this->serverroot, $theme_dir."dist/core-$scriptName")
+ || $this->cacheAndAppendCombineJsonIfExist($this->serverroot, $script . '.json')
+ || $this->cacheAndAppendCombineJsonIfExist($appRoot, $script . '.json', $appWebRoot)
+ || $this->appendScriptIfExist($this->serverroot, $theme_dir . 'core/' . $script)
+ || $this->appendScriptIfExist($this->serverroot, 'core/' . $script)
+ || (strpos($scriptName, '/') === -1 && ($this->appendScriptIfExist($this->serverroot, $theme_dir . "dist/core-$scriptName")
|| $this->appendScriptIfExist($this->serverroot, "dist/core-$scriptName")))
- || $this->cacheAndAppendCombineJsonIfExist($this->serverroot, 'core/'.$script.'.json')
+ || $this->cacheAndAppendCombineJsonIfExist($this->serverroot, 'core/' . $script . '.json')
) {
return;
}
@@ -108,7 +108,7 @@ class JSResourceLocator extends ResourceLocator {
}
protected function cacheAndAppendCombineJsonIfExist($root, $file, $app = 'core') {
- if (is_file($root.'/'.$file)) {
+ if (is_file($root . '/' . $file)) {
if ($this->jsCombiner->process($root, $file, $app)) {
$this->append($this->serverroot, $this->jsCombiner->getCachedJS($app, $file), false, false);
} else {
diff --git a/lib/private/Template/ResourceLocator.php b/lib/private/Template/ResourceLocator.php
index 377f0e0b6a8..fa52f8e5c0d 100755
--- a/lib/private/Template/ResourceLocator.php
+++ b/lib/private/Template/ResourceLocator.php
@@ -75,7 +75,7 @@ abstract class ResourceLocator {
* @return bool True if the resource was found, false otherwise
*/
protected function appendIfExist($root, $file, $webRoot = null) {
- if ($root !== false && is_file($root.'/'.$file)) {
+ if ($root !== false && is_file($root . '/' . $file)) {
$this->append($root, $file, $webRoot, false);
return true;
}
diff --git a/lib/private/Template/TemplateFileLocator.php b/lib/private/Template/TemplateFileLocator.php
index 164fcd503c1..38583d158a3 100644
--- a/lib/private/Template/TemplateFileLocator.php
+++ b/lib/private/Template/TemplateFileLocator.php
@@ -29,13 +29,13 @@ class TemplateFileLocator {
}
foreach ($this->dirs as $dir) {
- $file = $dir.$template.'.php';
+ $file = $dir . $template . '.php';
if (is_file($file)) {
$this->path = $dir;
return $file;
}
}
- throw new \Exception('template file not found: template:'.$template);
+ throw new \Exception('template file not found: template:' . $template);
}
public function getPath() {
diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php
index 0ef4ec197cf..6c7cec90740 100644
--- a/lib/private/TemplateLayout.php
+++ b/lib/private/TemplateLayout.php
@@ -242,7 +242,7 @@ class TemplateLayout extends \OC_Template {
foreach ($jsFiles as $info) {
$web = $info[1];
$file = $info[2];
- $this->append('jsfiles', $web.'/'.$file . $this->getVersionHashSuffix());
+ $this->append('jsfiles', $web . '/' . $file . $this->getVersionHashSuffix());
}
try {
@@ -275,14 +275,14 @@ class TemplateLayout extends \OC_Template {
$file = $info[2];
if (str_ends_with($file, 'print.css')) {
- $this->append('printcssfiles', $web.'/'.$file . $this->getVersionHashSuffix());
+ $this->append('printcssfiles', $web . '/' . $file . $this->getVersionHashSuffix());
} else {
$suffix = $this->getVersionHashSuffix($web, $file);
if (!str_contains($file, '?v=')) {
- $this->append('cssfiles', $web.'/'.$file . $suffix);
+ $this->append('cssfiles', $web . '/' . $file . $suffix);
} else {
- $this->append('cssfiles', $web.'/'.$file . '-' . substr($suffix, 3));
+ $this->append('cssfiles', $web . '/' . $file . '-' . substr($suffix, 3));
}
}
}
diff --git a/lib/private/TextProcessing/Db/Task.php b/lib/private/TextProcessing/Db/Task.php
index 31c9aab345b..d4ebc19e74a 100644
--- a/lib/private/TextProcessing/Db/Task.php
+++ b/lib/private/TextProcessing/Db/Task.php
@@ -70,7 +70,7 @@ class Task extends Entity {
public function toRow(): array {
return array_combine(self::$columns, array_map(function ($field) {
- return $this->{'get'.ucfirst($field)}();
+ return $this->{'get' . ucfirst($field)}();
}, self::$fields));
}
diff --git a/lib/private/TextProcessing/Manager.php b/lib/private/TextProcessing/Manager.php
index 9801a99ddec..8d34b5fba01 100644
--- a/lib/private/TextProcessing/Manager.php
+++ b/lib/private/TextProcessing/Manager.php
@@ -167,7 +167,7 @@ class Manager implements IManager {
$task->setStatus(OCPTask::STATUS_RUNNING);
if ($provider instanceof IProviderWithExpectedRuntime) {
$completionExpectedAt = new \DateTime('now');
- $completionExpectedAt->add(new \DateInterval('PT'.$provider->getExpectedRuntime().'S'));
+ $completionExpectedAt->add(new \DateInterval('PT' . $provider->getExpectedRuntime() . 'S'));
$task->setCompletionExpectedAt($completionExpectedAt);
}
if ($task->getId() === null) {
@@ -209,7 +209,7 @@ class Manager implements IManager {
[$provider,] = $providers;
if ($provider instanceof IProviderWithExpectedRuntime) {
$completionExpectedAt = new \DateTime('now');
- $completionExpectedAt->add(new \DateInterval('PT'.$provider->getExpectedRuntime().'S'));
+ $completionExpectedAt->add(new \DateInterval('PT' . $provider->getExpectedRuntime() . 'S'));
$task->setCompletionExpectedAt($completionExpectedAt);
}
$taskEntity = DbTask::fromPublicTask($task);
diff --git a/lib/private/TextProcessing/RemoveOldTasksBackgroundJob.php b/lib/private/TextProcessing/RemoveOldTasksBackgroundJob.php
index 2a71256c492..4a336d56077 100644
--- a/lib/private/TextProcessing/RemoveOldTasksBackgroundJob.php
+++ b/lib/private/TextProcessing/RemoveOldTasksBackgroundJob.php
@@ -23,7 +23,6 @@ class RemoveOldTasksBackgroundJob extends TimedJob {
ITimeFactory $timeFactory,
private TaskMapper $taskMapper,
private LoggerInterface $logger,
-
) {
parent::__construct($timeFactory);
$this->setInterval(60 * 60 * 24);
diff --git a/lib/private/TextToImage/Db/Task.php b/lib/private/TextToImage/Db/Task.php
index d7eb0a22014..cc92c865220 100644
--- a/lib/private/TextToImage/Db/Task.php
+++ b/lib/private/TextToImage/Db/Task.php
@@ -71,7 +71,7 @@ class Task extends Entity {
public function toRow(): array {
return array_combine(self::$columns, array_map(function ($field) {
- return $this->{'get'.ucfirst($field)}();
+ return $this->{'get' . ucfirst($field)}();
}, self::$fields));
}
diff --git a/lib/private/TextToImage/Db/TaskMapper.php b/lib/private/TextToImage/Db/TaskMapper.php
index 4c0357884e3..b34c749eb66 100644
--- a/lib/private/TextToImage/Db/TaskMapper.php
+++ b/lib/private/TextToImage/Db/TaskMapper.php
@@ -91,7 +91,7 @@ class TaskMapper extends QBMapper {
*/
public function deleteOlderThan(int $timeout): array {
$datetime = $this->timeFactory->getDateTime();
- $datetime->sub(new \DateInterval('PT'.$timeout.'S'));
+ $datetime->sub(new \DateInterval('PT' . $timeout . 'S'));
$qb = $this->db->getQueryBuilder();
$qb->select('*')
->from($this->tableName)
diff --git a/lib/private/TextToImage/Manager.php b/lib/private/TextToImage/Manager.php
index 88dc108f380..eec6cc3d241 100644
--- a/lib/private/TextToImage/Manager.php
+++ b/lib/private/TextToImage/Manager.php
@@ -103,11 +103,11 @@ class Manager implements IManager {
$providers = $this->getPreferredProviders();
foreach ($providers as $provider) {
- $this->logger->debug('Trying to run Text2Image provider '.$provider::class);
+ $this->logger->debug('Trying to run Text2Image provider ' . $provider::class);
try {
$task->setStatus(Task::STATUS_RUNNING);
$completionExpectedAt = new \DateTime('now');
- $completionExpectedAt->add(new \DateInterval('PT'.$provider->getExpectedRuntime().'S'));
+ $completionExpectedAt->add(new \DateInterval('PT' . $provider->getExpectedRuntime() . 'S'));
$task->setCompletionExpectedAt($completionExpectedAt);
if ($task->getId() === null) {
$this->logger->debug('Inserting Text2Image task into DB');
@@ -198,7 +198,7 @@ class Manager implements IManager {
$this->logger->debug('Scheduling Text2Image Task');
$task->setStatus(Task::STATUS_SCHEDULED);
$completionExpectedAt = new \DateTime('now');
- $completionExpectedAt->add(new \DateInterval('PT'.$this->getPreferredProviders()[0]->getExpectedRuntime().'S'));
+ $completionExpectedAt->add(new \DateInterval('PT' . $this->getPreferredProviders()[0]->getExpectedRuntime() . 'S'));
$task->setCompletionExpectedAt($completionExpectedAt);
$taskEntity = DbTask::fromPublicTask($task);
$this->taskMapper->insert($taskEntity);
diff --git a/lib/private/URLGenerator.php b/lib/private/URLGenerator.php
index 24454806e02..ad12fae5144 100644
--- a/lib/private/URLGenerator.php
+++ b/lib/private/URLGenerator.php
@@ -43,7 +43,7 @@ class URLGenerator implements IURLGenerator {
IUserSession $userSession,
ICacheFactory $cacheFactory,
IRequest $request,
- Router $router
+ Router $router,
) {
$this->config = $config;
$this->userSession = $userSession;
@@ -96,7 +96,7 @@ class URLGenerator implements IURLGenerator {
public function linkToOCSRouteAbsolute(string $routeName, array $arguments = []): string {
// Returns `/subfolder/index.php/ocsapp/…` with `'htaccess.IgnoreFrontController' => false` in config.php
// And `/subfolder/ocsapp/…` with `'htaccess.IgnoreFrontController' => true` in config.php
- $route = $this->router->generate('ocs.'.$routeName, $arguments, false);
+ $route = $this->router->generate('ocs.' . $routeName, $arguments, false);
// Cut off `/subfolder`
if (\OC::$WEBROOT !== '' && str_starts_with($route, \OC::$WEBROOT)) {
@@ -176,8 +176,8 @@ class URLGenerator implements IURLGenerator {
* Returns the path to the image.
*/
public function imagePath(string $appName, string $file): string {
- $cache = $this->cacheFactory->createDistributed('imagePath-'.md5($this->getBaseUrl()).'-');
- $cacheKey = $appName.'-'.$file;
+ $cache = $this->cacheFactory->createDistributed('imagePath-' . md5($this->getBaseUrl()) . '-');
+ $cacheKey = $appName . '-' . $file;
if ($key = $cache->get($cacheKey)) {
return $key;
}
diff --git a/lib/private/Updater.php b/lib/private/Updater.php
index 2722c172f1a..2ea680efcf5 100644
--- a/lib/private/Updater.php
+++ b/lib/private/Updater.php
@@ -57,7 +57,7 @@ class Updater extends BasicEmitter {
private IAppConfig $appConfig,
private Checker $checker,
private ?LoggerInterface $log,
- private Installer $installer
+ private Installer $installer,
) {
}
@@ -82,7 +82,7 @@ class Updater extends BasicEmitter {
}
// Clear CAN_INSTALL file if not on git
- if (\OC_Util::getChannel() !== 'git' && is_file(\OC::$configDir.'/CAN_INSTALL')) {
+ if (\OC_Util::getChannel() !== 'git' && is_file(\OC::$configDir . '/CAN_INSTALL')) {
if (!unlink(\OC::$configDir . '/CAN_INSTALL')) {
$this->log->error('Could not cleanup CAN_INSTALL from your config folder. Please remove this file manually.');
}
@@ -100,13 +100,13 @@ class Updater extends BasicEmitter {
$this->log->error($exception->getMessage(), [
'exception' => $exception,
]);
- $this->emit('\OC\Updater', 'failure', [$exception->getMessage() . ': ' .$exception->getHint()]);
+ $this->emit('\OC\Updater', 'failure', [$exception->getMessage() . ': ' . $exception->getHint()]);
$success = false;
} catch (\Exception $exception) {
$this->log->error($exception->getMessage(), [
'exception' => $exception,
]);
- $this->emit('\OC\Updater', 'failure', [get_class($exception) . ': ' .$exception->getMessage()]);
+ $this->emit('\OC\Updater', 'failure', [get_class($exception) . ': ' . $exception->getMessage()]);
$success = false;
}
@@ -410,29 +410,29 @@ class Updater extends BasicEmitter {
$dispatcher->addListener(
MigratorExecuteSqlEvent::class,
function (MigratorExecuteSqlEvent $event) use ($log): void {
- $log->info(get_class($event).': ' . $event->getSql() . ' (' . $event->getCurrentStep() . ' of ' . $event->getMaxStep() . ')', ['app' => 'updater']);
+ $log->info(get_class($event) . ': ' . $event->getSql() . ' (' . $event->getCurrentStep() . ' of ' . $event->getMaxStep() . ')', ['app' => 'updater']);
}
);
$repairListener = function (Event $event) use ($log): void {
if ($event instanceof RepairStartEvent) {
- $log->info(get_class($event).': Starting ... ' . $event->getMaxStep() . ' (' . $event->getCurrentStepName() . ')', ['app' => 'updater']);
+ $log->info(get_class($event) . ': Starting ... ' . $event->getMaxStep() . ' (' . $event->getCurrentStepName() . ')', ['app' => 'updater']);
} elseif ($event instanceof RepairAdvanceEvent) {
$desc = $event->getDescription();
if (empty($desc)) {
$desc = '';
}
- $log->info(get_class($event).': ' . $desc . ' (' . $event->getIncrement() . ')', ['app' => 'updater']);
+ $log->info(get_class($event) . ': ' . $desc . ' (' . $event->getIncrement() . ')', ['app' => 'updater']);
} elseif ($event instanceof RepairFinishEvent) {
$log->info(get_class($event), ['app' => 'updater']);
} elseif ($event instanceof RepairStepEvent) {
- $log->info(get_class($event).': Repair step: ' . $event->getStepName(), ['app' => 'updater']);
+ $log->info(get_class($event) . ': Repair step: ' . $event->getStepName(), ['app' => 'updater']);
} elseif ($event instanceof RepairInfoEvent) {
- $log->info(get_class($event).': Repair info: ' . $event->getMessage(), ['app' => 'updater']);
+ $log->info(get_class($event) . ': Repair info: ' . $event->getMessage(), ['app' => 'updater']);
} elseif ($event instanceof RepairWarningEvent) {
- $log->warning(get_class($event).': Repair warning: ' . $event->getMessage(), ['app' => 'updater']);
+ $log->warning(get_class($event) . ': Repair warning: ' . $event->getMessage(), ['app' => 'updater']);
} elseif ($event instanceof RepairErrorEvent) {
- $log->error(get_class($event).': Repair error: ' . $event->getMessage(), ['app' => 'updater']);
+ $log->error(get_class($event) . ': Repair error: ' . $event->getMessage(), ['app' => 'updater']);
}
};
diff --git a/lib/private/User/Manager.php b/lib/private/User/Manager.php
index 9a84b102a99..925d0e53921 100644
--- a/lib/private/User/Manager.php
+++ b/lib/private/User/Manager.php
@@ -201,7 +201,7 @@ class Manager extends PublicEmitter implements IUserManager {
$result = $this->checkPasswordNoLogging($loginName, $password);
if ($result === false) {
- \OCP\Server::get(LoggerInterface::class)->warning('Login failed: \''. $loginName .'\' (Remote IP: \''. \OC::$server->getRequest()->getRemoteAddress(). '\')', ['app' => 'core']);
+ \OCP\Server::get(LoggerInterface::class)->warning('Login failed: \'' . $loginName . '\' (Remote IP: \'' . \OC::$server->getRequest()->getRemoteAddress() . '\')', ['app' => 'core']);
}
return $result;
diff --git a/lib/private/User/OutOfOfficeData.php b/lib/private/User/OutOfOfficeData.php
index b1739126443..0d4e142567e 100644
--- a/lib/private/User/OutOfOfficeData.php
+++ b/lib/private/User/OutOfOfficeData.php
@@ -13,14 +13,16 @@ use OCP\IUser;
use OCP\User\IOutOfOfficeData;
class OutOfOfficeData implements IOutOfOfficeData {
- public function __construct(private string $id,
+ public function __construct(
+ private string $id,
private IUser $user,
private int $startDate,
private int $endDate,
private string $shortMessage,
private string $message,
private ?string $replacementUserId,
- private ?string $replacementUserDisplayName) {
+ private ?string $replacementUserDisplayName,
+ ) {
}
public function getId(): string {
diff --git a/lib/private/User/User.php b/lib/private/User/User.php
index 6f7ceb08532..f2c38825338 100644
--- a/lib/private/User/User.php
+++ b/lib/private/User/User.php
@@ -524,7 +524,7 @@ class User implements IUser {
if ($quota !== 'none' and $quota !== 'default') {
$bytesQuota = OC_Helper::computerFileSize($quota);
if ($bytesQuota === false) {
- throw new InvalidArgumentException('Failed to set quota to invalid value '.$quota);
+ throw new InvalidArgumentException('Failed to set quota to invalid value ' . $quota);
}
$quota = OC_Helper::humanFileSize($bytesQuota);
}
diff --git a/lib/private/legacy/OC_App.php b/lib/private/legacy/OC_App.php
index e5c2c34294d..a9f8b24d831 100644
--- a/lib/private/legacy/OC_App.php
+++ b/lib/private/legacy/OC_App.php
@@ -239,7 +239,7 @@ class OC_App {
/**
* Get the path where to install apps
*/
- public static function getInstallPath(): string|null {
+ public static function getInstallPath(): ?string {
foreach (OC::$APPSROOTS as $dir) {
if (isset($dir['writable']) && $dir['writable'] === true) {
return $dir['path'];
diff --git a/lib/private/legacy/OC_Defaults.php b/lib/private/legacy/OC_Defaults.php
index 54640a892c9..cc0ac687ccc 100644
--- a/lib/private/legacy/OC_Defaults.php
+++ b/lib/private/legacy/OC_Defaults.php
@@ -223,8 +223,8 @@ class OC_Defaults {
if ($this->themeExist('getShortFooter')) {
$footer = $this->theme->getShortFooter();
} else {
- $footer = '<a href="'. $this->getBaseUrl() . '" target="_blank"' .
- ' rel="noreferrer noopener">' .$this->getEntity() . '</a>'.
+ $footer = '<a href="' . $this->getBaseUrl() . '" target="_blank"' .
+ ' rel="noreferrer noopener">' . $this->getEntity() . '</a>' .
' – ' . $this->getSlogan();
}
diff --git a/lib/private/legacy/OC_Files.php b/lib/private/legacy/OC_Files.php
index 126472e3061..f75b89fea67 100644
--- a/lib/private/legacy/OC_Files.php
+++ b/lib/private/legacy/OC_Files.php
@@ -53,7 +53,7 @@ class OC_Files {
http_response_code(206);
header('Accept-Ranges: bytes', true);
if (count($rangeArray) > 1) {
- $type = 'multipart/byteranges; boundary='.self::getBoundary();
+ $type = 'multipart/byteranges; boundary=' . self::getBoundary();
// no Content-Length header here
} else {
header(sprintf('Content-Range: bytes %d-%d/%d', $rangeArray[0]['from'], $rangeArray[0]['to'], $fileSize), true);
@@ -63,7 +63,7 @@ class OC_Files {
OC_Response::setContentLengthHeader($fileSize);
}
}
- header('Content-Type: '.$type, true);
+ header('Content-Type: ' . $type, true);
header('X-Accel-Buffering: no');
}
@@ -336,12 +336,12 @@ class OC_Files {
$type = \OC::$server->getMimeTypeDetector()->getSecureMimeType(\OC\Files\Filesystem::getMimeType($filename));
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";
+ 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";
$view->readfilePart($filename, $range['from'], $range['to']);
}
- echo "\r\n--".self::getBoundary()."--\r\n";
+ echo "\r\n--" . self::getBoundary() . "--\r\n";
}
} catch (\OCP\Files\UnseekableException $ex) {
// file is unseekable
diff --git a/lib/private/legacy/OC_Helper.php b/lib/private/legacy/OC_Helper.php
index 6da063ef2ce..0e55eff8f8c 100644
--- a/lib/private/legacy/OC_Helper.php
+++ b/lib/private/legacy/OC_Helper.php
@@ -463,7 +463,7 @@ class OC_Helper {
}
$fullPath = Filesystem::normalizePath($view->getAbsolutePath($path));
- $cacheKey = $fullPath. '::' . ($includeMountPoints ? 'include' : 'exclude');
+ $cacheKey = $fullPath . '::' . ($includeMountPoints ? 'include' : 'exclude');
if ($useCache) {
$cached = $memcache->get($cacheKey);
if ($cached) {
diff --git a/lib/private/legacy/OC_JSON.php b/lib/private/legacy/OC_JSON.php
index a9682e2cce7..e510595a3cb 100644
--- a/lib/private/legacy/OC_JSON.php
+++ b/lib/private/legacy/OC_JSON.php
@@ -46,7 +46,7 @@ class OC_JSON {
*/
public static function callCheck() {
if (!\OC::$server->getRequest()->passesStrictCookieCheck()) {
- header('Location: '.\OC::$WEBROOT);
+ header('Location: ' . \OC::$WEBROOT);
exit();
}
diff --git a/lib/private/legacy/OC_Response.php b/lib/private/legacy/OC_Response.php
index 8c8890c74c4..86274f5fcb7 100644
--- a/lib/private/legacy/OC_Response.php
+++ b/lib/private/legacy/OC_Response.php
@@ -43,7 +43,7 @@ class OC_Response {
$lfh = new \OC\LargeFileHelper;
$length = $lfh->formatUnsignedInteger($length);
}
- header('Content-Length: '.$length);
+ header('Content-Length: ' . $length);
}
/**
@@ -59,7 +59,7 @@ class OC_Response {
* @see \OCP\AppFramework\Http\Response::getHeaders
*/
$policy = 'default-src \'self\'; '
- . 'script-src \'self\' \'nonce-'.\OC::$server->getContentSecurityPolicyNonceManager()->getNonce().'\'; '
+ . 'script-src \'self\' \'nonce-' . \OC::$server->getContentSecurityPolicyNonceManager()->getNonce() . '\'; '
. 'style-src \'self\' \'unsafe-inline\'; '
. 'frame-src *; '
. 'img-src * data: blob:; '
diff --git a/lib/private/legacy/OC_Template.php b/lib/private/legacy/OC_Template.php
index 47803041cb5..1026e536b97 100644
--- a/lib/private/legacy/OC_Template.php
+++ b/lib/private/legacy/OC_Template.php
@@ -11,7 +11,7 @@ use OCP\AppFramework\Http\TemplateResponse;
use OCP\EventDispatcher\IEventDispatcher;
use Psr\Log\LoggerInterface;
-require_once __DIR__.'/template/functions.php';
+require_once __DIR__ . '/template/functions.php';
/**
* This class provides the templates for ownCloud.
@@ -128,15 +128,15 @@ class OC_Template extends \OC\Template\Base {
// Add custom headers
$headers = '';
foreach (OC_Util::$headers as $header) {
- $headers .= '<'.\OCP\Util::sanitizeHTML($header['tag']);
+ $headers .= '<' . \OCP\Util::sanitizeHTML($header['tag']);
if (strcasecmp($header['tag'], 'script') === 0 && in_array('src', array_map('strtolower', array_keys($header['attributes'])))) {
$headers .= ' defer';
}
foreach ($header['attributes'] as $name => $value) {
- $headers .= ' '.\OCP\Util::sanitizeHTML($name).'="'.\OCP\Util::sanitizeHTML($value).'"';
+ $headers .= ' ' . \OCP\Util::sanitizeHTML($name) . '="' . \OCP\Util::sanitizeHTML($value) . '"';
}
if ($header['text'] !== null) {
- $headers .= '>'.\OCP\Util::sanitizeHTML($header['text']).'</'.\OCP\Util::sanitizeHTML($header['tag']).'>';
+ $headers .= '>' . \OCP\Util::sanitizeHTML($header['text']) . '</' . \OCP\Util::sanitizeHTML($header['tag']) . '>';
} else {
$headers .= '/>';
}
@@ -162,7 +162,7 @@ class OC_Template extends \OC\Template\Base {
* do this.
*/
public function inc($file, $additionalParams = null) {
- return $this->load($this->path.$file.'.php', $additionalParams);
+ return $this->load($this->path . $file . '.php', $additionalParams);
}
/**
diff --git a/lib/private/legacy/OC_Util.php b/lib/private/legacy/OC_Util.php
index e152feb639e..0c8fcc56f32 100644
--- a/lib/private/legacy/OC_Util.php
+++ b/lib/private/legacy/OC_Util.php
@@ -156,7 +156,7 @@ class OC_Util {
}
if (!empty($skeletonDirectory)) {
- $logger->debug('copying skeleton for '.$userId.' from '.$skeletonDirectory.' to '.$userDirectory->getFullPath('/'), ['app' => 'files_skeleton']);
+ $logger->debug('copying skeleton for ' . $userId . ' from ' . $skeletonDirectory . ' to ' . $userDirectory->getFullPath('/'), ['app' => 'files_skeleton']);
self::copyr($skeletonDirectory, $userDirectory);
// update the file cache
$userDirectory->getStorage()->getScanner()->scan('', \OC\Files\Cache\Scanner::SCAN_RECURSIVE);
@@ -783,7 +783,7 @@ class OC_Util {
$id = \OC::$server->getSystemConfig()->getValue('instanceid', null);
if (is_null($id)) {
// We need to guarantee at least one letter in instanceid so it can be used as the session_name
- $id = 'oc' . \OC::$server->get(ISecureRandom::class)->generate(10, \OCP\Security\ISecureRandom::CHAR_LOWER.\OCP\Security\ISecureRandom::CHAR_DIGITS);
+ $id = 'oc' . \OC::$server->get(ISecureRandom::class)->generate(10, \OCP\Security\ISecureRandom::CHAR_LOWER . \OCP\Security\ISecureRandom::CHAR_DIGITS);
\OC::$server->getSystemConfig()->setValue('instanceid', $id);
}
return $id;
diff --git a/lib/private/legacy/template/functions.php b/lib/private/legacy/template/functions.php
index a9a1f10a116..37df801c3c4 100644
--- a/lib/private/legacy/template/functions.php
+++ b/lib/private/legacy/template/functions.php
@@ -22,12 +22,12 @@ function p($string) {
function emit_css_tag($href, $opts = '') {
$s = '<link rel="stylesheet"';
if (!empty($href)) {
- $s .= ' href="' . $href .'"';
+ $s .= ' href="' . $href . '"';
}
if (!empty($opts)) {
- $s .= ' '.$opts;
+ $s .= ' ' . $opts;
}
- print_unescaped($s.">\n");
+ print_unescaped($s . ">\n");
}
/**
@@ -58,16 +58,16 @@ function emit_script_tag(string $src, string $script_content = '', string $conte
$s = '<script nonce="' . $nonceManager->getNonce() . '"';
if (!empty($src)) {
// emit script tag for deferred loading from $src
- $s .= $defer_str.' src="' . $src .'"' . $type . '>';
+ $s .= $defer_str . ' src="' . $src . '"' . $type . '>';
} elseif ($script_content !== '') {
// emit script tag for inline script from $script_content without defer (see MDN)
- $s .= ">\n".$script_content."\n";
+ $s .= ">\n" . $script_content . "\n";
} else {
// no $src nor $src_content, really useless empty tag
$s .= '>';
}
$s .= '</script>';
- print_unescaped($s."\n");
+ print_unescaped($s . "\n");
}
/**
@@ -314,7 +314,7 @@ function html_select_options($options, $selected, $params = []) {
$label = $label[$label_name];
}
$select = in_array($value, $selected) ? ' selected="selected"' : '';
- $html .= '<option value="' . \OCP\Util::sanitizeHTML($value) . '"' . $select . '>' . \OCP\Util::sanitizeHTML($label) . '</option>'."\n";
+ $html .= '<option value="' . \OCP\Util::sanitizeHTML($value) . '"' . $select . '>' . \OCP\Util::sanitizeHTML($label) . '</option>' . "\n";
}
return $html;
}