aboutsummaryrefslogtreecommitdiffstats
path: root/core
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 /core
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 'core')
-rw-r--r--core/Command/Background/JobBase.php2
-rw-r--r--core/Command/Background/ListCommand.php2
-rw-r--r--core/Command/Config/Import.php2
-rw-r--r--core/Command/Db/ConvertType.php6
-rw-r--r--core/Command/Info/File.php8
-rw-r--r--core/Command/Integrity/SignApp.php4
-rw-r--r--core/Command/L10n/CreateJs.php2
-rw-r--r--core/Command/Log/File.php10
-rw-r--r--core/Command/Log/Manage.php8
-rw-r--r--core/Command/Maintenance/Install.php6
-rw-r--r--core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php4
-rw-r--r--core/Command/Maintenance/Mimetype/UpdateDB.php8
-rw-r--r--core/Command/Maintenance/Mimetype/UpdateJS.php2
-rw-r--r--core/Command/SetupChecks.php10
-rw-r--r--core/Command/SystemTag/Add.php2
-rw-r--r--core/Command/SystemTag/Edit.php4
-rw-r--r--core/Command/Upgrade.php2
-rw-r--r--core/Command/User/AuthTokens/Add.php2
-rw-r--r--core/Command/User/SyncAccountDataCommand.php2
-rw-r--r--core/Command/User/Welcome.php2
-rw-r--r--core/Controller/AppPasswordController.php4
-rw-r--r--core/Controller/ClientFlowLoginController.php6
-rw-r--r--core/Controller/ClientFlowLoginV2Controller.php2
-rw-r--r--core/Controller/CssController.php4
-rw-r--r--core/Controller/JsController.php4
-rw-r--r--core/Controller/OCMController.php2
-rw-r--r--core/Controller/SetupController.php2
-rw-r--r--core/Controller/TaskProcessingApiController.php2
-rw-r--r--core/Listener/BeforeMessageLoggedEventListener.php14
-rw-r--r--core/Service/LoginFlowV2Service.php6
-rw-r--r--core/templates/installation.php2
-rw-r--r--core/templates/layout.public.php2
-rw-r--r--core/templates/layout.user.php6
33 files changed, 72 insertions, 72 deletions
diff --git a/core/Command/Background/JobBase.php b/core/Command/Background/JobBase.php
index 7229d7589ee..d92bb77d4b6 100644
--- a/core/Command/Background/JobBase.php
+++ b/core/Command/Background/JobBase.php
@@ -19,7 +19,7 @@ abstract class JobBase extends \OC\Core\Command\Base {
public function __construct(
protected IJobList $jobList,
- protected LoggerInterface $logger
+ protected LoggerInterface $logger,
) {
parent::__construct();
}
diff --git a/core/Command/Background/ListCommand.php b/core/Command/Background/ListCommand.php
index 005f0418579..c8efbfef5c7 100644
--- a/core/Command/Background/ListCommand.php
+++ b/core/Command/Background/ListCommand.php
@@ -53,7 +53,7 @@ class ListCommand extends Base {
$jobsInfo = $this->formatJobs($this->jobList->getJobsIterator($input->getOption('class'), $limit, (int)$input->getOption('offset')));
$this->writeTableInOutputFormat($input, $output, $jobsInfo);
if ($input->getOption('output') === self::OUTPUT_FORMAT_PLAIN && count($jobsInfo) >= $limit) {
- $output->writeln("\n<comment>Output is currently limited to " . $limit . ' jobs. Specify `-l, --limit[=LIMIT]` to override.</comment>');
+ $output->writeln("\n<comment>Output is currently limited to " . $limit . ' jobs. Specify `-l, --limit[=LIMIT]` to override.</comment>');
}
return 0;
}
diff --git a/core/Command/Config/Import.php b/core/Command/Config/Import.php
index 9974b11e19c..b58abec3390 100644
--- a/core/Command/Config/Import.php
+++ b/core/Command/Config/Import.php
@@ -49,7 +49,7 @@ class Import extends Command implements CompletionAwareInterface {
try {
$configs = $this->validateFileContent($content);
} catch (\UnexpectedValueException $e) {
- $output->writeln('<error>' . $e->getMessage(). '</error>');
+ $output->writeln('<error>' . $e->getMessage() . '</error>');
return 1;
}
diff --git a/core/Command/Db/ConvertType.php b/core/Command/Db/ConvertType.php
index 031d5a83d12..43b2d62a900 100644
--- a/core/Command/Db/ConvertType.php
+++ b/core/Command/Db/ConvertType.php
@@ -215,7 +215,7 @@ class ConvertType extends Command implements CompletionAwareInterface {
$apps = $input->getOption('all-apps') ? \OC_App::getAllApps() : \OC_App::getEnabledApps();
foreach ($apps as $app) {
- $output->writeln('<info> - '.$app.'</info>');
+ $output->writeln('<info> - ' . $app . '</info>');
// Make sure autoloading works...
\OC_App::loadApp($app);
$fromMS = new MigrationService($app, $fromDB);
@@ -404,7 +404,7 @@ class ConvertType extends Command implements CompletionAwareInterface {
try {
// copy table rows
foreach ($tables as $table) {
- $output->writeln('<info> - '.$table.'</info>');
+ $output->writeln('<info> - ' . $table . '</info>');
$this->copyTable($fromDB, $toDB, $schema->getTable($table), $input, $output);
}
if ($input->getArgument('type') === 'pgsql') {
@@ -427,7 +427,7 @@ class ConvertType extends Command implements CompletionAwareInterface {
$dbName = $input->getArgument('database');
$password = $input->getOption('password');
if ($input->getOption('port')) {
- $dbHost .= ':'.$input->getOption('port');
+ $dbHost .= ':' . $input->getOption('port');
}
$this->config->setSystemValues([
diff --git a/core/Command/Info/File.php b/core/Command/Info/File.php
index 76fbd38712c..2a557b6768e 100644
--- a/core/Command/Info/File.php
+++ b/core/Command/Info/File.php
@@ -33,7 +33,7 @@ class File extends Command {
public function __construct(
IFactory $l10nFactory,
private FileUtils $fileUtils,
- private \OC\Encryption\Util $encryptionUtil
+ private \OC\Encryption\Util $encryptionUtil,
) {
$this->l10n = $l10nFactory->get('core');
parent::__construct();
@@ -85,7 +85,7 @@ class File extends Command {
return $node->getSize();
}, $children));
if ($childSize != $node->getSize()) {
- $output->writeln(' <error>warning: folder has a size of ' . Util::humanFileSize($node->getSize()) ." but it's children sum up to " . Util::humanFileSize($childSize) . '</error>.');
+ $output->writeln(' <error>warning: folder has a size of ' . Util::humanFileSize($node->getSize()) . " but it's children sum up to " . Util::humanFileSize($childSize) . '</error>.');
$output->writeln(' Run <info>occ files:scan --path ' . $node->getPath() . '</info> to attempt to resolve this.');
}
if ($showChildren) {
@@ -164,10 +164,10 @@ class File extends Command {
}
if ($input->getOption('storage-tree')) {
$storageTmp = $storage;
- $storageClass = get_class($storageTmp).' (cache:'.get_class($storageTmp->getCache()).')';
+ $storageClass = get_class($storageTmp) . ' (cache:' . get_class($storageTmp->getCache()) . ')';
while ($storageTmp instanceof \OC\Files\Storage\Wrapper\Wrapper) {
$storageTmp = $storageTmp->getWrapperStorage();
- $storageClass .= "\n\t".'> '.get_class($storageTmp).' (cache:'.get_class($storageTmp->getCache()).')';
+ $storageClass .= "\n\t" . '> ' . get_class($storageTmp) . ' (cache:' . get_class($storageTmp->getCache()) . ')';
}
$output->writeln(' storage wrapping: ' . $storageClass);
}
diff --git a/core/Command/Integrity/SignApp.php b/core/Command/Integrity/SignApp.php
index 6df84662388..d307bc58985 100644
--- a/core/Command/Integrity/SignApp.php
+++ b/core/Command/Integrity/SignApp.php
@@ -51,7 +51,7 @@ class SignApp extends Command {
$documentationUrl = $this->urlGenerator->linkToDocs('developer-code-integrity');
$output->writeln('This command requires the --path, --privateKey and --certificate.');
$output->writeln('Example: ./occ integrity:sign-app --path="/Users/lukasreschke/Programming/myapp/" --privateKey="/Users/lukasreschke/private/myapp.key" --certificate="/Users/lukasreschke/public/mycert.crt"');
- $output->writeln('For more information please consult the documentation: '. $documentationUrl);
+ $output->writeln('For more information please consult the documentation: ' . $documentationUrl);
return 1;
}
@@ -75,7 +75,7 @@ class SignApp extends Command {
$x509->setPrivateKey($rsa);
try {
$this->checker->writeAppSignature($path, $x509, $rsa);
- $output->writeln('Successfully signed "'.$path.'"');
+ $output->writeln('Successfully signed "' . $path . '"');
} catch (\Exception $e) {
$output->writeln('Error: ' . $e->getMessage());
return 1;
diff --git a/core/Command/L10n/CreateJs.php b/core/Command/L10n/CreateJs.php
index 7d45fbe91f8..64a21e6d48c 100644
--- a/core/Command/L10n/CreateJs.php
+++ b/core/Command/L10n/CreateJs.php
@@ -153,7 +153,7 @@ class CreateJs extends Command implements CompletionAwareInterface {
$appName = $context->getWordAtIndex($context->getWordIndex() - 1);
try {
return $this->getAllLanguages($this->appManager->getAppPath($appName));
- } catch(AppPathNotFoundException) {
+ } catch (AppPathNotFoundException) {
return [];
}
}
diff --git a/core/Command/Log/File.php b/core/Command/Log/File.php
index e04d19f51cf..8b4a38db611 100644
--- a/core/Command/Log/File.php
+++ b/core/Command/Log/File.php
@@ -79,11 +79,11 @@ class File extends Command implements Completion\CompletionAwareInterface {
} else {
$enabledText = 'disabled';
}
- $output->writeln('Log backend file: '.$enabledText);
+ $output->writeln('Log backend file: ' . $enabledText);
- $dataDir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data');
- $defaultLogFile = rtrim($dataDir, '/').'/nextcloud.log';
- $output->writeln('Log file: '.$this->config->getSystemValue('logfile', $defaultLogFile));
+ $dataDir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data');
+ $defaultLogFile = rtrim($dataDir, '/') . '/nextcloud.log';
+ $output->writeln('Log file: ' . $this->config->getSystemValue('logfile', $defaultLogFile));
$rotateSize = $this->config->getSystemValue('log_rotate_size', 100 * 1024 * 1024);
if ($rotateSize) {
@@ -91,7 +91,7 @@ class File extends Command implements Completion\CompletionAwareInterface {
} else {
$rotateString = 'disabled';
}
- $output->writeln('Rotate at: '.$rotateString);
+ $output->writeln('Rotate at: ' . $rotateString);
return 0;
}
diff --git a/core/Command/Log/Manage.php b/core/Command/Log/Manage.php
index e68720a1280..f67f0d969f6 100644
--- a/core/Command/Log/Manage.php
+++ b/core/Command/Log/Manage.php
@@ -84,14 +84,14 @@ class Manage extends Command implements CompletionAwareInterface {
// display configuration
$backend = $this->config->getSystemValue('log_type', self::DEFAULT_BACKEND);
- $output->writeln('Enabled logging backend: '.$backend);
+ $output->writeln('Enabled logging backend: ' . $backend);
$levelNum = $this->config->getSystemValue('loglevel', self::DEFAULT_LOG_LEVEL);
$level = $this->convertLevelNumber($levelNum);
- $output->writeln('Log level: '.$level.' ('.$levelNum.')');
+ $output->writeln('Log level: ' . $level . ' (' . $levelNum . ')');
$timezone = $this->config->getSystemValue('logtimezone', self::DEFAULT_TIMEZONE);
- $output->writeln('Log timezone: '.$timezone);
+ $output->writeln('Log timezone: ' . $timezone);
return 0;
}
@@ -100,7 +100,7 @@ class Manage extends Command implements CompletionAwareInterface {
* @throws \InvalidArgumentException
*/
protected function validateBackend($backend) {
- if (!class_exists('OC\\Log\\'.ucfirst($backend))) {
+ if (!class_exists('OC\\Log\\' . ucfirst($backend))) {
throw new \InvalidArgumentException('Invalid backend');
}
}
diff --git a/core/Command/Maintenance/Install.php b/core/Command/Maintenance/Install.php
index a954beb406d..31f6d1cd79d 100644
--- a/core/Command/Maintenance/Install.php
+++ b/core/Command/Maintenance/Install.php
@@ -46,7 +46,7 @@ class Install extends Command {
->addOption('admin-user', null, InputOption::VALUE_REQUIRED, 'Login of the admin account', 'admin')
->addOption('admin-pass', null, InputOption::VALUE_REQUIRED, 'Password of the admin account')
->addOption('admin-email', null, InputOption::VALUE_OPTIONAL, 'E-Mail of the admin account')
- ->addOption('data-dir', null, InputOption::VALUE_REQUIRED, 'Path to data directory', \OC::$SERVERROOT.'/data');
+ ->addOption('data-dir', null, InputOption::VALUE_REQUIRED, 'Path to data directory', \OC::$SERVERROOT . '/data');
}
protected function execute(InputInterface $input, OutputInterface $output): int {
@@ -134,7 +134,7 @@ class Install extends Command {
if (is_null($dbPass)) {
/** @var QuestionHelper $helper */
$helper = $this->getHelper('question');
- $question = new Question('What is the password to access the database with user <'.$dbUser.'>?');
+ $question = new Question('What is the password to access the database with user <' . $dbUser . '>?');
$question->setHidden(true);
$question->setHiddenFallback(false);
$dbPass = $helper->ask($input, $output, $question);
@@ -144,7 +144,7 @@ class Install extends Command {
if (is_null($adminPassword)) {
/** @var QuestionHelper $helper */
$helper = $this->getHelper('question');
- $question = new Question('What is the password you like to use for the admin account <'.$adminLogin.'>?');
+ $question = new Question('What is the password you like to use for the admin account <' . $adminLogin . '>?');
$question->setHidden(true);
$question->setHiddenFallback(false);
$adminPassword = $helper->ask($input, $output, $question);
diff --git a/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php b/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php
index 1a6c3933461..283809a9031 100644
--- a/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php
+++ b/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php
@@ -22,7 +22,7 @@ class GenerateMimetypeFileBuilder {
}, ARRAY_FILTER_USE_KEY);
// Fetch all files
- $dir = new \DirectoryIterator(\OC::$SERVERROOT.'/core/img/filetypes');
+ $dir = new \DirectoryIterator(\OC::$SERVERROOT . '/core/img/filetypes');
$files = [];
foreach ($dir as $fileInfo) {
@@ -38,7 +38,7 @@ class GenerateMimetypeFileBuilder {
// Fetch all themes!
$themes = [];
- $dirs = new \DirectoryIterator(\OC::$SERVERROOT.'/themes/');
+ $dirs = new \DirectoryIterator(\OC::$SERVERROOT . '/themes/');
foreach ($dirs as $dir) {
//Valid theme dir
if ($dir->isFile() || $dir->isDot()) {
diff --git a/core/Command/Maintenance/Mimetype/UpdateDB.php b/core/Command/Maintenance/Mimetype/UpdateDB.php
index fd448cf862a..9ba535ef658 100644
--- a/core/Command/Maintenance/Mimetype/UpdateDB.php
+++ b/core/Command/Maintenance/Mimetype/UpdateDB.php
@@ -55,21 +55,21 @@ class UpdateDB extends Command {
$mimetypeId = $this->mimetypeLoader->getId($mimetype);
if (!$existing) {
- $output->writeln('Added mimetype "'.$mimetype.'" to database');
+ $output->writeln('Added mimetype "' . $mimetype . '" to database');
$totalNewMimetypes++;
}
if (!$existing || $input->getOption('repair-filecache')) {
$touchedFilecacheRows = $this->mimetypeLoader->updateFilecache($ext, $mimetypeId);
if ($touchedFilecacheRows > 0) {
- $output->writeln('Updated '.$touchedFilecacheRows.' filecache rows for mimetype "'.$mimetype.'"');
+ $output->writeln('Updated ' . $touchedFilecacheRows . ' filecache rows for mimetype "' . $mimetype . '"');
}
$totalFilecacheUpdates += $touchedFilecacheRows;
}
}
- $output->writeln('Added '.$totalNewMimetypes.' new mimetypes');
- $output->writeln('Updated '.$totalFilecacheUpdates.' filecache rows');
+ $output->writeln('Added ' . $totalNewMimetypes . ' new mimetypes');
+ $output->writeln('Updated ' . $totalFilecacheUpdates . ' filecache rows');
return 0;
}
}
diff --git a/core/Command/Maintenance/Mimetype/UpdateJS.php b/core/Command/Maintenance/Mimetype/UpdateJS.php
index a1559024f2e..35633f16355 100644
--- a/core/Command/Maintenance/Mimetype/UpdateJS.php
+++ b/core/Command/Maintenance/Mimetype/UpdateJS.php
@@ -32,7 +32,7 @@ class UpdateJS extends Command {
// Output the JS
$generatedMimetypeFile = new GenerateMimetypeFileBuilder();
- file_put_contents(\OC::$SERVERROOT.'/core/js/mimetypelist.js', $generatedMimetypeFile->generateFile($aliases));
+ file_put_contents(\OC::$SERVERROOT . '/core/js/mimetypelist.js', $generatedMimetypeFile->generateFile($aliases));
$output->writeln('<info>mimetypelist.js is updated');
return 0;
diff --git a/core/Command/SetupChecks.php b/core/Command/SetupChecks.php
index fda463b8f6d..60517e224b3 100644
--- a/core/Command/SetupChecks.php
+++ b/core/Command/SetupChecks.php
@@ -61,11 +61,11 @@ class SetupChecks extends Base {
$description = $this->richTextFormatter->richToParsed($description, $descriptionParameters);
}
$output->writeln(
- "\t\t".
- ($styleTag !== null ? "<{$styleTag}>" : '').
- "{$emoji} ".
- ($check->getName() ?? $check::class).
- ($description !== null ? ': '.$description : '').
+ "\t\t" .
+ ($styleTag !== null ? "<{$styleTag}>" : '') .
+ "{$emoji} " .
+ ($check->getName() ?? $check::class) .
+ ($description !== null ? ': ' . $description : '') .
($styleTag !== null ? "</{$styleTag}>" : ''),
$verbosity
);
diff --git a/core/Command/SystemTag/Add.php b/core/Command/SystemTag/Add.php
index 9d8f7ae05e4..92ed42c37bc 100644
--- a/core/Command/SystemTag/Add.php
+++ b/core/Command/SystemTag/Add.php
@@ -73,7 +73,7 @@ class Add extends Base {
]);
return 0;
} catch (TagAlreadyExistsException $e) {
- $output->writeln('<error>'.$e->getMessage().'</error>');
+ $output->writeln('<error>' . $e->getMessage() . '</error>');
return 2;
}
}
diff --git a/core/Command/SystemTag/Edit.php b/core/Command/SystemTag/Edit.php
index 7ac74cbc53a..eb6412b7639 100644
--- a/core/Command/SystemTag/Edit.php
+++ b/core/Command/SystemTag/Edit.php
@@ -82,13 +82,13 @@ class Edit extends Base {
try {
$this->systemTagManager->updateTag($input->getArgument('id'), $name, $userVisible, $userAssignable);
- $output->writeln('<info>Tag updated ("' . $name . '", '. $userVisible . ', ' . $userAssignable . ')</info>');
+ $output->writeln('<info>Tag updated ("' . $name . '", ' . $userVisible . ', ' . $userAssignable . ')</info>');
return 0;
} catch (TagNotFoundException $e) {
$output->writeln('<error>Tag not found</error>');
return 1;
} catch (TagAlreadyExistsException $e) {
- $output->writeln('<error>'.$e->getMessage().'</error>');
+ $output->writeln('<error>' . $e->getMessage() . '</error>');
return 2;
}
}
diff --git a/core/Command/Upgrade.php b/core/Command/Upgrade.php
index 7b1526766f3..a9ed4cf2fd1 100644
--- a/core/Command/Upgrade.php
+++ b/core/Command/Upgrade.php
@@ -35,7 +35,7 @@ class Upgrade extends Command {
public const ERROR_FAILURE = 5;
public function __construct(
- private IConfig $config
+ private IConfig $config,
) {
parent::__construct();
}
diff --git a/core/Command/User/AuthTokens/Add.php b/core/Command/User/AuthTokens/Add.php
index 43386b7709a..ad4bf732bd0 100644
--- a/core/Command/User/AuthTokens/Add.php
+++ b/core/Command/User/AuthTokens/Add.php
@@ -81,7 +81,7 @@ class Add extends Command {
$output->writeln('<info>No password provided. The generated app password will therefore have limited capabilities. Any operation that requires the login password will fail.</info>');
}
- $token = $this->random->generate(72, ISecureRandom::CHAR_UPPER.ISecureRandom::CHAR_LOWER.ISecureRandom::CHAR_DIGITS);
+ $token = $this->random->generate(72, ISecureRandom::CHAR_UPPER . ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_DIGITS);
$generatedToken = $this->tokenProvider->generateToken(
$token,
$user->getUID(),
diff --git a/core/Command/User/SyncAccountDataCommand.php b/core/Command/User/SyncAccountDataCommand.php
index e8fcccdaa28..640b66581e1 100644
--- a/core/Command/User/SyncAccountDataCommand.php
+++ b/core/Command/User/SyncAccountDataCommand.php
@@ -21,7 +21,7 @@ class SyncAccountDataCommand extends Base {
public function __construct(
IUserManager $userManager,
- IAccountManager $accountManager
+ IAccountManager $accountManager,
) {
$this->userManager = $userManager;
$this->accountManager = $accountManager;
diff --git a/core/Command/User/Welcome.php b/core/Command/User/Welcome.php
index ba1c88a26c5..c383811f982 100644
--- a/core/Command/User/Welcome.php
+++ b/core/Command/User/Welcome.php
@@ -27,7 +27,7 @@ class Welcome extends Base {
*/
public function __construct(
IUserManager $userManager,
- NewUserMailHelper $newUserMailHelper
+ NewUserMailHelper $newUserMailHelper,
) {
parent::__construct();
diff --git a/core/Controller/AppPasswordController.php b/core/Controller/AppPasswordController.php
index 7cab4c5380b..b43f0077507 100644
--- a/core/Controller/AppPasswordController.php
+++ b/core/Controller/AppPasswordController.php
@@ -78,7 +78,7 @@ class AppPasswordController extends \OCP\AppFramework\OCSController {
$userAgent = $this->request->getHeader('USER_AGENT');
- $token = $this->random->generate(72, ISecureRandom::CHAR_UPPER.ISecureRandom::CHAR_LOWER.ISecureRandom::CHAR_DIGITS);
+ $token = $this->random->generate(72, ISecureRandom::CHAR_UPPER . ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_DIGITS);
$generatedToken = $this->tokenProvider->generateToken(
$token,
@@ -149,7 +149,7 @@ class AppPasswordController extends \OCP\AppFramework\OCSController {
throw new OCSForbiddenException('could not rotate apptoken');
}
- $newToken = $this->random->generate(72, ISecureRandom::CHAR_UPPER.ISecureRandom::CHAR_LOWER.ISecureRandom::CHAR_DIGITS);
+ $newToken = $this->random->generate(72, ISecureRandom::CHAR_UPPER . ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_DIGITS);
$this->tokenProvider->rotate($token, $appPassword, $newToken);
return new DataResponse([
diff --git a/core/Controller/ClientFlowLoginController.php b/core/Controller/ClientFlowLoginController.php
index a7205abc0fc..93eec8921fe 100644
--- a/core/Controller/ClientFlowLoginController.php
+++ b/core/Controller/ClientFlowLoginController.php
@@ -118,7 +118,7 @@ class ClientFlowLoginController extends Controller {
$stateToken = $this->random->generate(
64,
- ISecureRandom::CHAR_LOWER.ISecureRandom::CHAR_UPPER.ISecureRandom::CHAR_DIGITS
+ ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_UPPER . ISecureRandom::CHAR_DIGITS
);
$this->session->set(self::STATE_NAME, $stateToken);
@@ -247,7 +247,7 @@ class ClientFlowLoginController extends Controller {
$clientName = $client->getName();
}
- $token = $this->random->generate(72, ISecureRandom::CHAR_UPPER.ISecureRandom::CHAR_LOWER.ISecureRandom::CHAR_DIGITS);
+ $token = $this->random->generate(72, ISecureRandom::CHAR_UPPER . ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_DIGITS);
$uid = $this->userSession->getUser()->getUID();
$generatedToken = $this->tokenProvider->generateToken(
$token,
@@ -260,7 +260,7 @@ class ClientFlowLoginController extends Controller {
);
if ($client) {
- $code = $this->random->generate(128, ISecureRandom::CHAR_UPPER.ISecureRandom::CHAR_LOWER.ISecureRandom::CHAR_DIGITS);
+ $code = $this->random->generate(128, ISecureRandom::CHAR_UPPER . ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_DIGITS);
$accessToken = new AccessToken();
$accessToken->setClientId($client->getId());
$accessToken->setEncryptedToken($this->crypto->encrypt($token, $code));
diff --git a/core/Controller/ClientFlowLoginV2Controller.php b/core/Controller/ClientFlowLoginV2Controller.php
index e6e1c282d2b..43eac012be1 100644
--- a/core/Controller/ClientFlowLoginV2Controller.php
+++ b/core/Controller/ClientFlowLoginV2Controller.php
@@ -110,7 +110,7 @@ class ClientFlowLoginV2Controller extends Controller {
$stateToken = $this->random->generate(
64,
- ISecureRandom::CHAR_LOWER.ISecureRandom::CHAR_UPPER.ISecureRandom::CHAR_DIGITS
+ ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_UPPER . ISecureRandom::CHAR_DIGITS
);
$this->session->set(self::STATE_NAME, $stateToken);
diff --git a/core/Controller/CssController.php b/core/Controller/CssController.php
index 345b70fe2d3..37e7edc530f 100644
--- a/core/Controller/CssController.php
+++ b/core/Controller/CssController.php
@@ -65,11 +65,11 @@ class CssController extends Controller {
}
$ttl = 31536000;
- $response->addHeader('Cache-Control', 'max-age='.$ttl.', immutable');
+ $response->addHeader('Cache-Control', 'max-age=' . $ttl . ', immutable');
$expires = new \DateTime();
$expires->setTimestamp($this->timeFactory->getTime());
- $expires->add(new \DateInterval('PT'.$ttl.'S'));
+ $expires->add(new \DateInterval('PT' . $ttl . 'S'));
$response->addHeader('Expires', $expires->format(\DateTime::RFC1123));
return $response;
}
diff --git a/core/Controller/JsController.php b/core/Controller/JsController.php
index f5fe381688d..5754c554e50 100644
--- a/core/Controller/JsController.php
+++ b/core/Controller/JsController.php
@@ -65,11 +65,11 @@ class JsController extends Controller {
}
$ttl = 31536000;
- $response->addHeader('Cache-Control', 'max-age='.$ttl.', immutable');
+ $response->addHeader('Cache-Control', 'max-age=' . $ttl . ', immutable');
$expires = new \DateTime();
$expires->setTimestamp($this->timeFactory->getTime());
- $expires->add(new \DateInterval('PT'.$ttl.'S'));
+ $expires->add(new \DateInterval('PT' . $ttl . 'S'));
$response->addHeader('Expires', $expires->format(\DateTime::RFC1123));
return $response;
}
diff --git a/core/Controller/OCMController.php b/core/Controller/OCMController.php
index d79b5b1669e..b53dc08fecf 100644
--- a/core/Controller/OCMController.php
+++ b/core/Controller/OCMController.php
@@ -32,7 +32,7 @@ class OCMController extends Controller {
public function __construct(
IRequest $request,
private IConfig $config,
- private LoggerInterface $logger
+ private LoggerInterface $logger,
) {
parent::__construct('core', $request);
}
diff --git a/core/Controller/SetupController.php b/core/Controller/SetupController.php
index e5f92eed1a9..eb78d74dd4e 100644
--- a/core/Controller/SetupController.php
+++ b/core/Controller/SetupController.php
@@ -18,7 +18,7 @@ class SetupController {
protected Setup $setupHelper,
protected LoggerInterface $logger,
) {
- $this->autoConfigFile = \OC::$configDir.'autoconfig.php';
+ $this->autoConfigFile = \OC::$configDir . 'autoconfig.php';
}
public function run(array $post): void {
diff --git a/core/Controller/TaskProcessingApiController.php b/core/Controller/TaskProcessingApiController.php
index b459143aa7e..cc685d34bf0 100644
--- a/core/Controller/TaskProcessingApiController.php
+++ b/core/Controller/TaskProcessingApiController.php
@@ -121,7 +121,7 @@ class TaskProcessingApiController extends \OCP\AppFramework\OCSController {
#[ApiRoute(verb: 'POST', url: '/schedule', root: '/taskprocessing')]
public function schedule(
array $input, string $type, string $appId, string $customId = '',
- ?string $webhookUri = null, ?string $webhookMethod = null
+ ?string $webhookUri = null, ?string $webhookMethod = null,
): DataResponse {
$task = new Task($type, $input, $appId, $this->userId, $customId);
$task->setWebhookUri($webhookUri);
diff --git a/core/Listener/BeforeMessageLoggedEventListener.php b/core/Listener/BeforeMessageLoggedEventListener.php
index ef771ca0a81..9010f7755eb 100644
--- a/core/Listener/BeforeMessageLoggedEventListener.php
+++ b/core/Listener/BeforeMessageLoggedEventListener.php
@@ -40,11 +40,11 @@ class BeforeMessageLoggedEventListener implements IEventListener {
2 => '[warning]',
3 => '[error]',
4 => '[fatal]',
- default => '['.$event->getLevel().']',
+ default => '[' . $event->getLevel() . ']',
}
- .' ['.$event->getApp().'] '
- .$event->getMessage()['message']
- ."\n";
+ . ' [' . $event->getApp() . '] '
+ . $event->getMessage()['message']
+ . "\n";
}
/**
@@ -55,10 +55,10 @@ class BeforeMessageLoggedEventListener implements IEventListener {
$argv = $_SERVER['argv'];
$level = 0;
foreach ($argv as $key => $arg) {
- if ($arg === '--'.ReservedOptions::DEBUG_LOG) {
+ if ($arg === '--' . ReservedOptions::DEBUG_LOG) {
unset($argv[$key]);
- } elseif (str_starts_with($arg, '--'.ReservedOptions::DEBUG_LOG_LEVEL.'=')) {
- $level = (int)substr($arg, strlen('--'.ReservedOptions::DEBUG_LOG_LEVEL.'='));
+ } elseif (str_starts_with($arg, '--' . ReservedOptions::DEBUG_LOG_LEVEL . '=')) {
+ $level = (int)substr($arg, strlen('--' . ReservedOptions::DEBUG_LOG_LEVEL . '='));
unset($argv[$key]);
}
}
diff --git a/core/Service/LoginFlowV2Service.php b/core/Service/LoginFlowV2Service.php
index 89c89f50b3e..e67a602e7b5 100644
--- a/core/Service/LoginFlowV2Service.php
+++ b/core/Service/LoginFlowV2Service.php
@@ -126,7 +126,7 @@ class LoginFlowV2Service {
return false;
}
- $appPassword = $this->random->generate(72, ISecureRandom::CHAR_UPPER.ISecureRandom::CHAR_LOWER.ISecureRandom::CHAR_DIGITS);
+ $appPassword = $this->random->generate(72, ISecureRandom::CHAR_UPPER . ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_DIGITS);
$this->tokenProvider->generateToken(
$appPassword,
$userId,
@@ -166,8 +166,8 @@ class LoginFlowV2Service {
public function createTokens(string $userAgent): LoginFlowV2Tokens {
$flow = new LoginFlowV2();
- $pollToken = $this->random->generate(128, ISecureRandom::CHAR_DIGITS.ISecureRandom::CHAR_LOWER.ISecureRandom::CHAR_UPPER);
- $loginToken = $this->random->generate(128, ISecureRandom::CHAR_DIGITS.ISecureRandom::CHAR_LOWER.ISecureRandom::CHAR_UPPER);
+ $pollToken = $this->random->generate(128, ISecureRandom::CHAR_DIGITS . ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_UPPER);
+ $loginToken = $this->random->generate(128, ISecureRandom::CHAR_DIGITS . ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_UPPER);
$flow->setPollToken($this->hashToken($pollToken));
$flow->setLoginToken($loginToken);
$flow->setStarted(0);
diff --git a/core/templates/installation.php b/core/templates/installation.php
index 5343464edbc..d03bc3cb174 100644
--- a/core/templates/installation.php
+++ b/core/templates/installation.php
@@ -67,7 +67,7 @@ script('core', 'install');
<div id="datadirContent">
<label for="directory"><?php p($l->t('Data folder')); ?></label>
<input type="text" name="directory" id="directory"
- placeholder="<?php p(OC::$SERVERROOT.'/data'); ?>"
+ placeholder="<?php p(OC::$SERVERROOT . '/data'); ?>"
value="<?php p($_['directory']); ?>"
autocomplete="off" autocapitalize="none" spellcheck="false">
</div>
diff --git a/core/templates/layout.public.php b/core/templates/layout.public.php
index d3c558ec04f..e2ed47d0716 100644
--- a/core/templates/layout.public.php
+++ b/core/templates/layout.public.php
@@ -10,7 +10,7 @@
<meta charset="utf-8">
<title>
<?php
- p(!empty($_['application']) ? $_['application'].' - ' : '');
+ p(!empty($_['application']) ? $_['application'] . ' - ' : '');
p($theme->getTitle());
?>
</title>
diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php
index f820a2f3ace..fc0f3af2d09 100644
--- a/core/templates/layout.user.php
+++ b/core/templates/layout.user.php
@@ -24,8 +24,8 @@ $getUserAvatar = static function (int $size) use ($_): string {
<meta charset="utf-8">
<title>
<?php
- p(!empty($_['pageTitle']) && $_['pageTitle'] !== $_['application'] ? $_['pageTitle'].' - ' : '');
-p(!empty($_['application']) ? $_['application'].' - ' : '');
+ p(!empty($_['pageTitle']) && $_['pageTitle'] !== $_['application'] ? $_['pageTitle'] . ' - ' : '');
+p(!empty($_['application']) ? $_['application'] . ' - ' : '');
p($theme->getTitle());
?>
</title>
@@ -84,7 +84,7 @@ p($theme->getTitle());
<main id="content" class="app-<?php p($_['appid']) ?>">
<h1 class="hidden-visually" id="page-heading-level-1">
<?php p((!empty($_['application']) && !empty($_['pageTitle']) && $_['application'] != $_['pageTitle'])
- ? $_['application'].': '.$_['pageTitle']
+ ? $_['application'] . ': ' . $_['pageTitle']
: (!empty($_['pageTitle']) ? $_['pageTitle'] : $theme->getName())
); ?>
</h1>