diff --git a/core/AppInfo/Application.php b/core/AppInfo/Application.php index 599ab4ddda4..15cf42c4a55 100644 --- a/core/AppInfo/Application.php +++ b/core/AppInfo/Application.php @@ -53,6 +53,7 @@ class Application extends App implements IBootstrap { parent::__construct(self::APP_ID, $urlParams); } + #[\Override] public function register(IRegistrationContext $context): void { $context->registerService('defaultMailAddress', function () { return Util::getDefaultEmailAddress('lostpassword-noreply'); @@ -90,6 +91,7 @@ class Application extends App implements IBootstrap { $context->registerCapability(Capabilities::class); } + #[\Override] public function boot(IBootContext $context): void { // ... } diff --git a/core/AppInfo/Capabilities.php b/core/AppInfo/Capabilities.php index 1596b8fbe5e..d06f944a127 100644 --- a/core/AppInfo/Capabilities.php +++ b/core/AppInfo/Capabilities.php @@ -29,6 +29,7 @@ class Capabilities implements ICapability { * * @return array{core: array{'user'?: array{language: string, locale: string, timezone: string}, 'can-create-app-token'?: bool } } */ + #[\Override] public function getCapabilities(): array { $capabilities = []; diff --git a/core/AppInfo/ConfigLexicon.php b/core/AppInfo/ConfigLexicon.php index 508a090e8a4..d733b552be0 100644 --- a/core/AppInfo/ConfigLexicon.php +++ b/core/AppInfo/ConfigLexicon.php @@ -40,10 +40,12 @@ class ConfigLexicon implements ILexicon { public const ON_DEMAND_PREVIEW_MIGRATION = 'on_demand_preview_migration'; + #[\Override] public function getStrictness(): Strictness { return Strictness::IGNORE; } + #[\Override] public function getAppConfigs(): array { return [ new Entry( @@ -104,6 +106,7 @@ class ConfigLexicon implements ILexicon { ]; } + #[\Override] public function getUserConfigs(): array { return [ new Entry(self::USER_LANGUAGE, ValueType::STRING, definition: 'language'), diff --git a/core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php b/core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php index d1ecc08ca4b..868c517a34c 100644 --- a/core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php +++ b/core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php @@ -28,6 +28,7 @@ class BackgroundCleanupUpdaterBackupsJob extends QueuedJob { * * @param array $argument */ + #[\Override] public function run($argument): void { $this->log->info('Running background job to clean-up outdated updater backups'); diff --git a/core/BackgroundJobs/CheckForUserCertificates.php b/core/BackgroundJobs/CheckForUserCertificates.php index e8dd0cffbdd..aec853252ad 100644 --- a/core/BackgroundJobs/CheckForUserCertificates.php +++ b/core/BackgroundJobs/CheckForUserCertificates.php @@ -30,6 +30,7 @@ class CheckForUserCertificates extends QueuedJob { /** * Checks all user directories for old user uploaded certificates */ + #[\Override] public function run($argument): void { $uploadList = []; $this->userManager->callForSeenUsers(function (IUser $user) use (&$uploadList): void { diff --git a/core/BackgroundJobs/CleanupLoginFlowV2.php b/core/BackgroundJobs/CleanupLoginFlowV2.php index e5bcf00a921..c7e7ba3dd43 100644 --- a/core/BackgroundJobs/CleanupLoginFlowV2.php +++ b/core/BackgroundJobs/CleanupLoginFlowV2.php @@ -22,6 +22,7 @@ class CleanupLoginFlowV2 extends TimedJob { $this->setInterval(60 * 60); } + #[\Override] protected function run($argument): void { $this->loginFlowV2Mapper->cleanup(); } diff --git a/core/BackgroundJobs/ExpirePreviewsJob.php b/core/BackgroundJobs/ExpirePreviewsJob.php index baed1a6768f..12d608b1d5a 100644 --- a/core/BackgroundJobs/ExpirePreviewsJob.php +++ b/core/BackgroundJobs/ExpirePreviewsJob.php @@ -27,6 +27,7 @@ class ExpirePreviewsJob extends TimedJob { $this->setInterval(60 * 60 * 24); } + #[\Override] protected function run(mixed $argument): void { $days = $this->config->getSystemValueInt('preview_expiration_days'); if ($days <= 0) { diff --git a/core/BackgroundJobs/GenerateMetadataJob.php b/core/BackgroundJobs/GenerateMetadataJob.php index 8cf4a65ad2b..c1d784b3cab 100644 --- a/core/BackgroundJobs/GenerateMetadataJob.php +++ b/core/BackgroundJobs/GenerateMetadataJob.php @@ -41,6 +41,7 @@ class GenerateMetadataJob extends TimedJob { $this->setInterval(24 * 60 * 60); } + #[\Override] protected function run(mixed $argument): void { if ($this->appConfig->getValueBool('core', 'metadataGenerationDone', false)) { return; diff --git a/core/BackgroundJobs/LookupServerSendCheckBackgroundJob.php b/core/BackgroundJobs/LookupServerSendCheckBackgroundJob.php index 86622e58758..472f4235717 100644 --- a/core/BackgroundJobs/LookupServerSendCheckBackgroundJob.php +++ b/core/BackgroundJobs/LookupServerSendCheckBackgroundJob.php @@ -26,6 +26,7 @@ class LookupServerSendCheckBackgroundJob extends QueuedJob { /** * @param array $argument */ + #[\Override] public function run($argument): void { $this->userManager->callForSeenUsers(function (IUser $user): void { // If the user data was not updated yet (check if LUS is enabled and if then update on LUS or delete on LUS) diff --git a/core/Command/App/Disable.php b/core/Command/App/Disable.php index 121ad3f010c..7f25959bacd 100644 --- a/core/Command/App/Disable.php +++ b/core/Command/App/Disable.php @@ -23,6 +23,7 @@ class Disable extends Command implements CompletionAwareInterface { parent::__construct(); } + #[\Override] protected function configure(): void { $this ->setName('app:disable') @@ -34,6 +35,7 @@ class Disable extends Command implements CompletionAwareInterface { ); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $appIds = $input->getArgument('app-id'); @@ -65,6 +67,7 @@ class Disable extends Command implements CompletionAwareInterface { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeOptionValues($optionName, CompletionContext $context): array { return []; } @@ -74,6 +77,7 @@ class Disable extends Command implements CompletionAwareInterface { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeArgumentValues($argumentName, CompletionContext $context): array { if ($argumentName === 'app-id') { return array_diff(\OC_App::getEnabledApps(true, true), $this->appManager->getAlwaysEnabledApps()); diff --git a/core/Command/App/Enable.php b/core/Command/App/Enable.php index 3936acfbf6e..8c6c11e7b9c 100644 --- a/core/Command/App/Enable.php +++ b/core/Command/App/Enable.php @@ -32,6 +32,7 @@ class Enable extends Command implements CompletionAwareInterface { parent::__construct(); } + #[\Override] protected function configure(): void { $this ->setName('app:enable') @@ -55,6 +56,7 @@ class Enable extends Command implements CompletionAwareInterface { ); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $appIds = $input->getArgument('app-id'); $groups = $this->resolveGroupIds($input->getOption('groups')); @@ -127,6 +129,7 @@ class Enable extends Command implements CompletionAwareInterface { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeOptionValues($optionName, CompletionContext $context): array { if ($optionName === 'groups') { return array_map(function (IGroup $group) { @@ -141,6 +144,7 @@ class Enable extends Command implements CompletionAwareInterface { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeArgumentValues($argumentName, CompletionContext $context): array { if ($argumentName === 'app-id') { $allApps = $this->appManager->getAllAppsInAppsFolders(); diff --git a/core/Command/App/GetPath.php b/core/Command/App/GetPath.php index 3ba4ed7781b..222bbd278f4 100644 --- a/core/Command/App/GetPath.php +++ b/core/Command/App/GetPath.php @@ -23,6 +23,7 @@ class GetPath extends Base { parent::__construct(); } + #[\Override] protected function configure(): void { parent::configure(); @@ -44,6 +45,7 @@ class GetPath extends Base { * @param OutputInterface $output An OutputInterface instance * @return int 0 if everything went fine, or an error code */ + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $appName = $input->getArgument('app'); try { @@ -61,6 +63,7 @@ class GetPath extends Base { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeArgumentValues($argumentName, CompletionContext $context): array { if ($argumentName === 'app') { return $this->appManager->getAllAppsInAppsFolders(); diff --git a/core/Command/App/Install.php b/core/Command/App/Install.php index eab0a294cc3..bc426e8d8be 100644 --- a/core/Command/App/Install.php +++ b/core/Command/App/Install.php @@ -25,6 +25,7 @@ class Install extends Command { parent::__construct(); } + #[\Override] protected function configure(): void { $this ->setName('app:install') @@ -55,6 +56,7 @@ class Install extends Command { ; } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $appId = $input->getArgument('app-id'); $forceEnable = (bool)$input->getOption('force'); diff --git a/core/Command/App/ListApps.php b/core/Command/App/ListApps.php index dc947bea55f..b51bc3149d4 100644 --- a/core/Command/App/ListApps.php +++ b/core/Command/App/ListApps.php @@ -20,6 +20,7 @@ class ListApps extends Base { parent::__construct(); } + #[\Override] protected function configure(): void { parent::configure(); @@ -47,6 +48,7 @@ class ListApps extends Base { ; } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { if ($input->getOption('shipped') === 'true' || $input->getOption('shipped') === 'false') { $shippedFilter = $input->getOption('shipped') === 'true'; @@ -127,6 +129,7 @@ class ListApps extends Base { * @param CompletionContext $context * @return array */ + #[\Override] public function completeOptionValues($optionName, CompletionContext $context): array { if ($optionName === 'shipped') { return ['true', 'false']; @@ -139,6 +142,7 @@ class ListApps extends Base { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeArgumentValues($argumentName, CompletionContext $context): array { return []; } diff --git a/core/Command/App/Remove.php b/core/Command/App/Remove.php index d43bfa96ccc..7e5ade4a691 100644 --- a/core/Command/App/Remove.php +++ b/core/Command/App/Remove.php @@ -29,6 +29,7 @@ class Remove extends Command implements CompletionAwareInterface { parent::__construct(); } + #[\Override] protected function configure(): void { $this ->setName('app:remove') @@ -46,6 +47,7 @@ class Remove extends Command implements CompletionAwareInterface { ); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $appId = $input->getArgument('app-id'); @@ -106,6 +108,7 @@ class Remove extends Command implements CompletionAwareInterface { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeOptionValues($optionName, CompletionContext $context): array { return []; } @@ -115,6 +118,7 @@ class Remove extends Command implements CompletionAwareInterface { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeArgumentValues($argumentName, CompletionContext $context): array { if ($argumentName === 'app-id') { return $this->manager->getEnabledApps(); diff --git a/core/Command/App/Update.php b/core/Command/App/Update.php index 62e22e5465d..0061b4d6e76 100644 --- a/core/Command/App/Update.php +++ b/core/Command/App/Update.php @@ -27,6 +27,7 @@ class Update extends Command { parent::__construct(); } + #[\Override] protected function configure(): void { $this ->setName('app:update') @@ -63,6 +64,7 @@ class Update extends Command { ; } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $singleAppId = $input->getArgument('app-id'); $updateFound = false; diff --git a/core/Command/Background/Delete.php b/core/Command/Background/Delete.php index c0b87e215c7..c7272c1f95c 100644 --- a/core/Command/Background/Delete.php +++ b/core/Command/Background/Delete.php @@ -23,6 +23,7 @@ class Delete extends Base { parent::__construct(); } + #[\Override] protected function configure(): void { $this ->setName('background-job:delete') @@ -34,6 +35,7 @@ class Delete extends Base { ); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $jobId = (string)$input->getArgument('job-id'); diff --git a/core/Command/Background/Job.php b/core/Command/Background/Job.php index a82bfe69b26..4ab7c930b79 100644 --- a/core/Command/Background/Job.php +++ b/core/Command/Background/Job.php @@ -25,6 +25,7 @@ class Job extends Command { parent::__construct(); } + #[\Override] protected function configure(): void { $this ->setName('background-job:execute') @@ -43,6 +44,7 @@ class Job extends Command { ; } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $jobId = (string)$input->getArgument('job-id'); diff --git a/core/Command/Background/JobWorker.php b/core/Command/Background/JobWorker.php index 4ce7fba1517..f7c85cc0bae 100644 --- a/core/Command/Background/JobWorker.php +++ b/core/Command/Background/JobWorker.php @@ -28,6 +28,7 @@ class JobWorker extends JobBase { ) { parent::__construct($jobList, $logger); } + #[\Override] protected function configure(): void { parent::configure(); @@ -61,6 +62,7 @@ class JobWorker extends JobBase { ; } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $startTime = time(); $stopAfterOptionValue = $input->getOption('stop_after'); diff --git a/core/Command/Background/ListCommand.php b/core/Command/Background/ListCommand.php index c8efbfef5c7..b60e33e7800 100644 --- a/core/Command/Background/ListCommand.php +++ b/core/Command/Background/ListCommand.php @@ -21,6 +21,7 @@ class ListCommand extends Base { parent::__construct(); } + #[\Override] protected function configure(): void { $this ->setName('background-job:list') @@ -48,6 +49,7 @@ class ListCommand extends Base { parent::configure(); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $limit = (int)$input->getOption('limit'); $jobsInfo = $this->formatJobs($this->jobList->getJobsIterator($input->getOption('class'), $limit, (int)$input->getOption('offset'))); diff --git a/core/Command/Background/Mode.php b/core/Command/Background/Mode.php index 4c0f40bb4a2..302f0428818 100644 --- a/core/Command/Background/Mode.php +++ b/core/Command/Background/Mode.php @@ -21,6 +21,7 @@ class Mode extends Command { parent::__construct(); } + #[\Override] protected function configure(): void { $this ->setName('background:cron') @@ -28,6 +29,7 @@ class Mode extends Command { ->setDescription('Use cron, ajax or webcron to run background jobs'); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { /** @var 'background:cron'|'background:ajax'|'background:webcron' $command */ $command = $input->getArgument('command'); diff --git a/core/Command/Base.php b/core/Command/Base.php index 138f3ca613b..ff95eccf02a 100644 --- a/core/Command/Base.php +++ b/core/Command/Base.php @@ -27,6 +27,7 @@ class Base extends Command implements CompletionAwareInterface { private bool $php_pcntl_signal = false; private bool $interrupted = false; + #[\Override] protected function configure() { // Some of our commands do not extend this class; and some of those that do do not call parent::configure() $defaultHelp = 'More extensive and thorough documentation may be found at ' . Server::get(Defaults::class)->getDocBaseUrl() . PHP_EOL; @@ -208,6 +209,7 @@ class Base extends Command implements CompletionAwareInterface { $this->interrupted = true; } + #[\Override] public function run(InputInterface $input, OutputInterface $output): int { // check if the php pcntl_signal functions are accessible $this->php_pcntl_signal = function_exists('pcntl_signal'); @@ -225,6 +227,7 @@ class Base extends Command implements CompletionAwareInterface { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeOptionValues($optionName, CompletionContext $context) { if ($optionName === 'output') { return ['plain', 'json', 'json_pretty']; @@ -237,6 +240,7 @@ class Base extends Command implements CompletionAwareInterface { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeArgumentValues($argumentName, CompletionContext $context) { return []; } diff --git a/core/Command/Broadcast/Test.php b/core/Command/Broadcast/Test.php index eb8b49bc3ee..5419c3d8b00 100644 --- a/core/Command/Broadcast/Test.php +++ b/core/Command/Broadcast/Test.php @@ -22,6 +22,7 @@ class Test extends Command { parent::__construct(); } + #[\Override] protected function configure(): void { $this ->setName('broadcast:test') @@ -39,6 +40,7 @@ class Test extends Command { ); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $name = $input->getArgument('name'); $uid = $input->getArgument('uid'); @@ -51,16 +53,19 @@ class Test extends Command { parent::__construct(); } + #[\Override] public function broadcastAs(): string { return $this->name; } + #[\Override] public function getUids(): array { return [ $this->uid, ]; } + #[\Override] public function jsonSerialize(): array { return [ 'description' => 'this is a test event', diff --git a/core/Command/Check.php b/core/Command/Check.php index dcc9b089e1c..51499b16f8e 100644 --- a/core/Command/Check.php +++ b/core/Command/Check.php @@ -18,6 +18,7 @@ class Check extends Base { parent::__construct(); } + #[\Override] protected function configure() { parent::configure(); @@ -27,6 +28,7 @@ class Check extends Base { ; } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $errors = \OC_Util::checkServer($this->config); if (!empty($errors)) { diff --git a/core/Command/Config/App/Base.php b/core/Command/Config/App/Base.php index e90a8e78f5b..5844b112c19 100644 --- a/core/Command/Config/App/Base.php +++ b/core/Command/Config/App/Base.php @@ -24,6 +24,7 @@ abstract class Base extends \OC\Core\Command\Base { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeArgumentValues($argumentName, CompletionContext $context) { if ($argumentName === 'app') { return $this->appConfig->getApps(); diff --git a/core/Command/Config/App/DeleteConfig.php b/core/Command/Config/App/DeleteConfig.php index 5a08ecbdc42..64b00275ad7 100644 --- a/core/Command/Config/App/DeleteConfig.php +++ b/core/Command/Config/App/DeleteConfig.php @@ -14,6 +14,7 @@ use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; class DeleteConfig extends Base { + #[\Override] protected function configure() { parent::configure(); @@ -39,6 +40,7 @@ class DeleteConfig extends Base { ; } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $appName = $input->getArgument('app'); $configName = $input->getArgument('name'); diff --git a/core/Command/Config/App/GetConfig.php b/core/Command/Config/App/GetConfig.php index af0c5648232..f118dd01f8b 100644 --- a/core/Command/Config/App/GetConfig.php +++ b/core/Command/Config/App/GetConfig.php @@ -15,6 +15,7 @@ use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; class GetConfig extends Base { + #[\Override] protected function configure() { parent::configure(); @@ -59,6 +60,7 @@ class GetConfig extends Base { * @param OutputInterface $output An OutputInterface instance * @return int 0 if everything went fine, or an error code */ + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $appName = $input->getArgument('app'); $configName = $input->getArgument('name'); diff --git a/core/Command/Config/App/SetConfig.php b/core/Command/Config/App/SetConfig.php index 97454b353d6..8dd91070633 100644 --- a/core/Command/Config/App/SetConfig.php +++ b/core/Command/Config/App/SetConfig.php @@ -19,6 +19,7 @@ use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Question\Question; class SetConfig extends Base { + #[\Override] protected function configure() { parent::configure(); @@ -75,6 +76,7 @@ class SetConfig extends Base { ; } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $appName = $input->getArgument('app'); $configName = $input->getArgument('name'); diff --git a/core/Command/Config/Import.php b/core/Command/Config/Import.php index b58abec3390..95989e7c44f 100644 --- a/core/Command/Config/Import.php +++ b/core/Command/Config/Import.php @@ -26,6 +26,7 @@ class Import extends Command implements CompletionAwareInterface { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('config:import') @@ -38,6 +39,7 @@ class Import extends Command implements CompletionAwareInterface { ; } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $importFile = $input->getArgument('file'); if ($importFile !== null) { @@ -183,6 +185,7 @@ class Import extends Command implements CompletionAwareInterface { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeOptionValues($optionName, CompletionContext $context) { return []; } @@ -192,6 +195,7 @@ class Import extends Command implements CompletionAwareInterface { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeArgumentValues($argumentName, CompletionContext $context) { if ($argumentName === 'file') { $helper = new ShellPathCompletion( diff --git a/core/Command/Config/ListConfigs.php b/core/Command/Config/ListConfigs.php index a7c195276eb..4c683974908 100644 --- a/core/Command/Config/ListConfigs.php +++ b/core/Command/Config/ListConfigs.php @@ -28,6 +28,7 @@ class ListConfigs extends Base { parent::__construct(); } + #[\Override] protected function configure() { parent::configure(); @@ -50,6 +51,7 @@ class ListConfigs extends Base { ; } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $app = $input->getArgument('app'); $noSensitiveValues = !$input->getOption('private'); @@ -136,6 +138,7 @@ class ListConfigs extends Base { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeArgumentValues($argumentName, CompletionContext $context) { if ($argumentName === 'app') { return array_merge(['all', 'system'], \OC_App::getAllApps()); diff --git a/core/Command/Config/Preset.php b/core/Command/Config/Preset.php index bd98bc08c96..8e5d0d6b567 100644 --- a/core/Command/Config/Preset.php +++ b/core/Command/Config/Preset.php @@ -24,6 +24,7 @@ class Preset extends Base { parent::__construct(); } + #[\Override] protected function configure() { parent::configure(); $this->setName('config:preset') @@ -34,6 +35,7 @@ class Preset extends Base { ->addOption('compare', '', InputOption::VALUE_NONE, 'compare preset'); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { if ($input->getOption('list')) { $this->getEnum('', $list); diff --git a/core/Command/Config/System/Base.php b/core/Command/Config/System/Base.php index 088d902b4fd..bf722e96427 100644 --- a/core/Command/Config/System/Base.php +++ b/core/Command/Config/System/Base.php @@ -21,6 +21,7 @@ abstract class Base extends \OC\Core\Command\Base { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeArgumentValues($argumentName, CompletionContext $context) { if ($argumentName === 'name') { $words = $this->getPreviousNames($context, $context->getWordIndex()); diff --git a/core/Command/Config/System/DeleteConfig.php b/core/Command/Config/System/DeleteConfig.php index 03960136f6f..c588b37e705 100644 --- a/core/Command/Config/System/DeleteConfig.php +++ b/core/Command/Config/System/DeleteConfig.php @@ -20,6 +20,7 @@ class DeleteConfig extends Base { parent::__construct($systemConfig); } + #[\Override] protected function configure() { parent::configure(); @@ -40,6 +41,7 @@ class DeleteConfig extends Base { ; } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $configNames = $input->getArgument('name'); $configName = $configNames[0]; diff --git a/core/Command/Config/System/GetConfig.php b/core/Command/Config/System/GetConfig.php index c0a9623a84e..3b9571b1290 100644 --- a/core/Command/Config/System/GetConfig.php +++ b/core/Command/Config/System/GetConfig.php @@ -20,6 +20,7 @@ class GetConfig extends Base { parent::__construct($systemConfig); } + #[\Override] protected function configure() { parent::configure(); @@ -47,6 +48,7 @@ class GetConfig extends Base { * @param OutputInterface $output An OutputInterface instance * @return int 0 if everything went fine, or an error code */ + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $configNames = $input->getArgument('name'); $configName = array_shift($configNames); diff --git a/core/Command/Config/System/SetConfig.php b/core/Command/Config/System/SetConfig.php index 1b1bdc66a6e..40227f3beca 100644 --- a/core/Command/Config/System/SetConfig.php +++ b/core/Command/Config/System/SetConfig.php @@ -22,6 +22,7 @@ class SetConfig extends Base { parent::__construct($systemConfig); } + #[\Override] protected function configure() { parent::configure(); @@ -55,6 +56,7 @@ class SetConfig extends Base { ; } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $configNames = $input->getArgument('name'); $configName = $configNames[0]; @@ -115,6 +117,7 @@ class SetConfig extends Base { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeOptionValues($optionName, CompletionContext $context) { if ($optionName === 'type') { return ['string', 'integer', 'double', 'boolean', 'json', 'null']; diff --git a/core/Command/Db/AddMissingColumns.php b/core/Command/Db/AddMissingColumns.php index 33b4b24a6cb..1380c708d4b 100644 --- a/core/Command/Db/AddMissingColumns.php +++ b/core/Command/Db/AddMissingColumns.php @@ -33,6 +33,7 @@ class AddMissingColumns extends Command { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('db:add-missing-columns') @@ -40,6 +41,7 @@ class AddMissingColumns extends Command { ->addOption('dry-run', null, InputOption::VALUE_NONE, 'Output the SQL queries instead of running them.'); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $dryRun = $input->getOption('dry-run'); diff --git a/core/Command/Db/AddMissingIndices.php b/core/Command/Db/AddMissingIndices.php index eec0aedce11..31a28ea6588 100644 --- a/core/Command/Db/AddMissingIndices.php +++ b/core/Command/Db/AddMissingIndices.php @@ -33,6 +33,7 @@ class AddMissingIndices extends Command { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('db:add-missing-indices') @@ -40,6 +41,7 @@ class AddMissingIndices extends Command { ->addOption('dry-run', null, InputOption::VALUE_NONE, 'Output the SQL queries instead of running them.'); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $dryRun = $input->getOption('dry-run'); diff --git a/core/Command/Db/AddMissingPrimaryKeys.php b/core/Command/Db/AddMissingPrimaryKeys.php index aed7084c946..475715a94e6 100644 --- a/core/Command/Db/AddMissingPrimaryKeys.php +++ b/core/Command/Db/AddMissingPrimaryKeys.php @@ -33,6 +33,7 @@ class AddMissingPrimaryKeys extends Command { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('db:add-missing-primary-keys') @@ -40,6 +41,7 @@ class AddMissingPrimaryKeys extends Command { ->addOption('dry-run', null, InputOption::VALUE_NONE, 'Output the SQL queries instead of running them.'); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $dryRun = $input->getOption('dry-run'); diff --git a/core/Command/Db/ConvertFilecacheBigInt.php b/core/Command/Db/ConvertFilecacheBigInt.php index 47111063582..04b58595a39 100644 --- a/core/Command/Db/ConvertFilecacheBigInt.php +++ b/core/Command/Db/ConvertFilecacheBigInt.php @@ -24,6 +24,7 @@ class ConvertFilecacheBigInt extends Command { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('db:convert-filecache-bigint') @@ -53,6 +54,7 @@ class ConvertFilecacheBigInt extends Command { ]; } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $schema = new SchemaWrapper($this->connection); $isSqlite = $this->connection->getDatabaseProvider() === IDBConnection::PLATFORM_SQLITE; diff --git a/core/Command/Db/ConvertMysqlToMB4.php b/core/Command/Db/ConvertMysqlToMB4.php index 926e56c4300..b83da3c7c06 100644 --- a/core/Command/Db/ConvertMysqlToMB4.php +++ b/core/Command/Db/ConvertMysqlToMB4.php @@ -27,12 +27,14 @@ class ConvertMysqlToMB4 extends Command { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('db:convert-mysql-charset') ->setDescription('Convert charset of MySQL/MariaDB to use utf8mb4'); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { if ($this->connection->getDatabaseProvider() !== IDBConnection::PLATFORM_MYSQL) { $output->writeln('This command is only valid for MySQL/MariaDB databases.'); diff --git a/core/Command/Db/ConvertType.php b/core/Command/Db/ConvertType.php index 4e7e8c604f3..f6f2df92ae2 100644 --- a/core/Command/Db/ConvertType.php +++ b/core/Command/Db/ConvertType.php @@ -45,6 +45,7 @@ class ConvertType extends Command implements CompletionAwareInterface { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('db:convert-type') @@ -159,6 +160,7 @@ class ConvertType extends Command implements CompletionAwareInterface { } } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $this->validateInput($input, $output); $this->readPassword($input, $output); @@ -446,6 +448,7 @@ class ConvertType extends Command implements CompletionAwareInterface { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeOptionValues($optionName, CompletionContext $context) { return []; } @@ -457,6 +460,7 @@ class ConvertType extends Command implements CompletionAwareInterface { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeArgumentValues($argumentName, CompletionContext $context) { if ($argumentName === 'type') { return ['mysql', 'oci', 'pgsql']; diff --git a/core/Command/Db/ExportSchema.php b/core/Command/Db/ExportSchema.php index 1ea0a95d2e6..3903aa9f22c 100644 --- a/core/Command/Db/ExportSchema.php +++ b/core/Command/Db/ExportSchema.php @@ -22,6 +22,7 @@ class ExportSchema extends Base { parent::__construct(); } + #[\Override] protected function configure(): void { $this ->setName('db:schema:export') @@ -31,6 +32,7 @@ class ExportSchema extends Base { parent::configure(); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $schema = $this->connection->createSchema(); $sql = $input->getOption('sql'); diff --git a/core/Command/Db/Migrations/ExecuteCommand.php b/core/Command/Db/Migrations/ExecuteCommand.php index a89072c1ad1..9a813a45c8e 100644 --- a/core/Command/Db/Migrations/ExecuteCommand.php +++ b/core/Command/Db/Migrations/ExecuteCommand.php @@ -26,6 +26,7 @@ class ExecuteCommand extends Command implements CompletionAwareInterface { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('migrations:execute') @@ -41,6 +42,7 @@ class ExecuteCommand extends Command implements CompletionAwareInterface { * @param OutputInterface $output * @return int */ + #[\Override] public function execute(InputInterface $input, OutputInterface $output): int { $appName = $input->getArgument('app'); $ms = new MigrationService($appName, $this->connection, new ConsoleOutput($output)); @@ -66,6 +68,7 @@ class ExecuteCommand extends Command implements CompletionAwareInterface { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeOptionValues($optionName, CompletionContext $context) { return []; } @@ -75,6 +78,7 @@ class ExecuteCommand extends Command implements CompletionAwareInterface { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeArgumentValues($argumentName, CompletionContext $context) { if ($argumentName === 'app') { $allApps = \OC_App::getAllApps(); diff --git a/core/Command/Db/Migrations/GenerateCommand.php b/core/Command/Db/Migrations/GenerateCommand.php index 5bc7a3abdf2..86ff22cffde 100644 --- a/core/Command/Db/Migrations/GenerateCommand.php +++ b/core/Command/Db/Migrations/GenerateCommand.php @@ -84,6 +84,7 @@ class {{classname}} extends SimpleMigrationStep { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('migrations:generate') @@ -94,6 +95,7 @@ class {{classname}} extends SimpleMigrationStep { parent::configure(); } + #[\Override] public function execute(InputInterface $input, OutputInterface $output): int { $appName = $input->getArgument('app'); $version = $input->getArgument('version'); @@ -148,6 +150,7 @@ class {{classname}} extends SimpleMigrationStep { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeOptionValues($optionName, CompletionContext $context) { return []; } @@ -157,6 +160,7 @@ class {{classname}} extends SimpleMigrationStep { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeArgumentValues($argumentName, CompletionContext $context) { if ($argumentName === 'app') { $allApps = $this->appManager->getAllAppsInAppsFolders(); diff --git a/core/Command/Db/Migrations/GenerateMetadataCommand.php b/core/Command/Db/Migrations/GenerateMetadataCommand.php index 581259c99df..438ef112689 100644 --- a/core/Command/Db/Migrations/GenerateMetadataCommand.php +++ b/core/Command/Db/Migrations/GenerateMetadataCommand.php @@ -25,6 +25,7 @@ class GenerateMetadataCommand extends Command { parent::__construct(); } + #[\Override] protected function configure(): void { $this->setName('migrations:generate-metadata') ->setHidden(true) @@ -33,6 +34,7 @@ class GenerateMetadataCommand extends Command { parent::configure(); } + #[\Override] public function execute(InputInterface $input, OutputInterface $output): int { $output->writeln( json_encode( diff --git a/core/Command/Db/Migrations/MigrateCommand.php b/core/Command/Db/Migrations/MigrateCommand.php index 2e02f031479..23b9204db00 100644 --- a/core/Command/Db/Migrations/MigrateCommand.php +++ b/core/Command/Db/Migrations/MigrateCommand.php @@ -24,6 +24,7 @@ class MigrateCommand extends Command implements CompletionAwareInterface { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('migrations:migrate') @@ -34,6 +35,7 @@ class MigrateCommand extends Command implements CompletionAwareInterface { parent::configure(); } + #[\Override] public function execute(InputInterface $input, OutputInterface $output): int { $appName = $input->getArgument('app'); $ms = new MigrationService($appName, $this->connection, new ConsoleOutput($output)); @@ -48,6 +50,7 @@ class MigrateCommand extends Command implements CompletionAwareInterface { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeOptionValues($optionName, CompletionContext $context) { return []; } @@ -57,6 +60,7 @@ class MigrateCommand extends Command implements CompletionAwareInterface { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeArgumentValues($argumentName, CompletionContext $context) { if ($argumentName === 'app') { $allApps = \OC_App::getAllApps(); diff --git a/core/Command/Db/Migrations/PreviewCommand.php b/core/Command/Db/Migrations/PreviewCommand.php index f5b850fff76..2177f22a3df 100644 --- a/core/Command/Db/Migrations/PreviewCommand.php +++ b/core/Command/Db/Migrations/PreviewCommand.php @@ -32,6 +32,7 @@ class PreviewCommand extends Command { parent::__construct(); } + #[\Override] protected function configure(): void { $this ->setName('migrations:preview') @@ -41,6 +42,7 @@ class PreviewCommand extends Command { parent::configure(); } + #[\Override] public function execute(InputInterface $input, OutputInterface $output): int { $version = $input->getArgument('version'); if (filter_var($version, FILTER_VALIDATE_URL)) { diff --git a/core/Command/Db/Migrations/StatusCommand.php b/core/Command/Db/Migrations/StatusCommand.php index f112763c800..abbfd10ed90 100644 --- a/core/Command/Db/Migrations/StatusCommand.php +++ b/core/Command/Db/Migrations/StatusCommand.php @@ -24,6 +24,7 @@ class StatusCommand extends Command implements CompletionAwareInterface { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('migrations:status') @@ -31,6 +32,7 @@ class StatusCommand extends Command implements CompletionAwareInterface { ->addArgument('app', InputArgument::REQUIRED, 'Name of the app this migration command shall work on'); } + #[\Override] public function execute(InputInterface $input, OutputInterface $output): int { $appName = $input->getArgument('app'); $ms = new MigrationService($appName, $this->connection, new ConsoleOutput($output)); @@ -54,6 +56,7 @@ class StatusCommand extends Command implements CompletionAwareInterface { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeOptionValues($optionName, CompletionContext $context) { return []; } @@ -63,6 +66,7 @@ class StatusCommand extends Command implements CompletionAwareInterface { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeArgumentValues($argumentName, CompletionContext $context) { if ($argumentName === 'app') { $allApps = \OC_App::getAllApps(); diff --git a/core/Command/Encryption/ChangeKeyStorageRoot.php b/core/Command/Encryption/ChangeKeyStorageRoot.php index 3049fd2ca08..ee914f73f0b 100644 --- a/core/Command/Encryption/ChangeKeyStorageRoot.php +++ b/core/Command/Encryption/ChangeKeyStorageRoot.php @@ -32,6 +32,7 @@ class ChangeKeyStorageRoot extends Command { parent::__construct(); } + #[\Override] protected function configure() { parent::configure(); $this @@ -44,6 +45,7 @@ class ChangeKeyStorageRoot extends Command { ); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $oldRoot = $this->util->getKeyStorageRoot(); $newRoot = $input->getArgument('newRoot'); diff --git a/core/Command/Encryption/DecryptAll.php b/core/Command/Encryption/DecryptAll.php index f3133fa33e8..85a70b49cec 100644 --- a/core/Command/Encryption/DecryptAll.php +++ b/core/Command/Encryption/DecryptAll.php @@ -52,6 +52,7 @@ class DecryptAll extends Command { } } + #[\Override] protected function configure() { parent::configure(); @@ -70,6 +71,7 @@ class DecryptAll extends Command { ); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { if (!$input->isInteractive()) { $output->writeln('Invalid TTY.'); diff --git a/core/Command/Encryption/Disable.php b/core/Command/Encryption/Disable.php index d6b92a9f236..fe280daa111 100644 --- a/core/Command/Encryption/Disable.php +++ b/core/Command/Encryption/Disable.php @@ -21,6 +21,7 @@ class Disable extends Command { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('encryption:disable') @@ -28,6 +29,7 @@ class Disable extends Command { ; } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { if ($this->config->getAppValue('core', 'encryption_enabled', 'no') !== 'yes') { $output->writeln('Encryption is already disabled'); diff --git a/core/Command/Encryption/Enable.php b/core/Command/Encryption/Enable.php index c5f7bc6e0e6..02c61025001 100644 --- a/core/Command/Encryption/Enable.php +++ b/core/Command/Encryption/Enable.php @@ -23,6 +23,7 @@ class Enable extends Command { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('encryption:enable') @@ -30,6 +31,7 @@ class Enable extends Command { ; } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { if ($this->config->getAppValue('core', 'encryption_enabled', 'no') === 'yes') { $output->writeln('Encryption is already enabled'); diff --git a/core/Command/Encryption/EncryptAll.php b/core/Command/Encryption/EncryptAll.php index f6cdb2aa155..dfdf9c98a2e 100644 --- a/core/Command/Encryption/EncryptAll.php +++ b/core/Command/Encryption/EncryptAll.php @@ -49,6 +49,7 @@ class EncryptAll extends Command { } } + #[\Override] protected function configure() { parent::configure(); @@ -63,6 +64,7 @@ class EncryptAll extends Command { /** * @throws \Exception */ + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { if (!$input->isInteractive() && !$input->getOption('no-interaction')) { $output->writeln('Invalid TTY.'); diff --git a/core/Command/Encryption/ListModules.php b/core/Command/Encryption/ListModules.php index bf02c29f432..3c5af72c701 100644 --- a/core/Command/Encryption/ListModules.php +++ b/core/Command/Encryption/ListModules.php @@ -21,6 +21,7 @@ class ListModules extends Base { parent::__construct(); } + #[\Override] protected function configure() { parent::configure(); @@ -30,6 +31,7 @@ class ListModules extends Base { ; } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $isMaintenanceModeEnabled = $this->config->getSystemValue('maintenance', false); if ($isMaintenanceModeEnabled) { diff --git a/core/Command/Encryption/MigrateKeyStorage.php b/core/Command/Encryption/MigrateKeyStorage.php index 937b17cde5f..0b61572fdc0 100644 --- a/core/Command/Encryption/MigrateKeyStorage.php +++ b/core/Command/Encryption/MigrateKeyStorage.php @@ -30,6 +30,7 @@ class MigrateKeyStorage extends Command { parent::__construct(); } + #[\Override] protected function configure(): void { parent::configure(); $this @@ -37,6 +38,7 @@ class MigrateKeyStorage extends Command { ->setDescription('Migrate the format of the keystorage to a newer format'); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $root = $this->util->getKeyStorageRoot(); diff --git a/core/Command/Encryption/SetDefaultModule.php b/core/Command/Encryption/SetDefaultModule.php index d10872afd38..5324cd8cdee 100644 --- a/core/Command/Encryption/SetDefaultModule.php +++ b/core/Command/Encryption/SetDefaultModule.php @@ -22,6 +22,7 @@ class SetDefaultModule extends Command { parent::__construct(); } + #[\Override] protected function configure() { parent::configure(); @@ -36,6 +37,7 @@ class SetDefaultModule extends Command { ; } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $isMaintenanceModeEnabled = $this->config->getSystemValue('maintenance', false); if ($isMaintenanceModeEnabled) { diff --git a/core/Command/Encryption/ShowKeyStorageRoot.php b/core/Command/Encryption/ShowKeyStorageRoot.php index 17649a260d0..e717983bf25 100644 --- a/core/Command/Encryption/ShowKeyStorageRoot.php +++ b/core/Command/Encryption/ShowKeyStorageRoot.php @@ -21,6 +21,7 @@ class ShowKeyStorageRoot extends Command { parent::__construct(); } + #[\Override] protected function configure() { parent::configure(); $this @@ -28,6 +29,7 @@ class ShowKeyStorageRoot extends Command { ->setDescription('Show current key storage root'); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $currentRoot = $this->util->getKeyStorageRoot(); diff --git a/core/Command/Encryption/Status.php b/core/Command/Encryption/Status.php index 7e8d0bd0c01..f8602236ffd 100644 --- a/core/Command/Encryption/Status.php +++ b/core/Command/Encryption/Status.php @@ -21,6 +21,7 @@ class Status extends Base { parent::__construct(); } + #[\Override] protected function configure() { parent::configure(); @@ -30,6 +31,7 @@ class Status extends Base { ; } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $this->writeArrayInOutputFormat($input, $output, [ 'enabled' => $this->encryptionManager->isEnabled(), diff --git a/core/Command/FilesMetadata/Get.php b/core/Command/FilesMetadata/Get.php index 0b022d0951b..1f9e7cb53c7 100644 --- a/core/Command/FilesMetadata/Get.php +++ b/core/Command/FilesMetadata/Get.php @@ -29,6 +29,7 @@ class Get extends Command { parent::__construct(); } + #[\Override] protected function configure(): void { $this->setName('metadata:get') ->setDescription('get stored metadata about a file, by its id') @@ -68,6 +69,7 @@ class Get extends Command { * @throws NoUserException * @throws NotFoundException */ + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $fileId = (int)$input->getArgument('fileId'); diff --git a/core/Command/Group/Add.php b/core/Command/Group/Add.php index 26d44c7ea83..a6d40178be6 100644 --- a/core/Command/Group/Add.php +++ b/core/Command/Group/Add.php @@ -23,6 +23,7 @@ class Add extends Base { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('group:add') @@ -40,6 +41,7 @@ class Add extends Base { ); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $gid = $input->getArgument('groupid'); $group = $this->groupManager->get($gid); diff --git a/core/Command/Group/AddUser.php b/core/Command/Group/AddUser.php index 2a74452949d..2f006485063 100644 --- a/core/Command/Group/AddUser.php +++ b/core/Command/Group/AddUser.php @@ -24,6 +24,7 @@ class AddUser extends Base { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('group:adduser') @@ -39,6 +40,7 @@ class AddUser extends Base { ); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $group = $this->groupManager->get($input->getArgument('group')); if (is_null($group)) { @@ -59,6 +61,7 @@ class AddUser extends Base { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeArgumentValues($argumentName, CompletionContext $context) { if ($argumentName === 'group') { return array_map(static fn (IGroup $group) => $group->getGID(), $this->groupManager->search($context->getCurrentWord())); diff --git a/core/Command/Group/Delete.php b/core/Command/Group/Delete.php index a2736476920..4c548e83b18 100644 --- a/core/Command/Group/Delete.php +++ b/core/Command/Group/Delete.php @@ -23,6 +23,7 @@ class Delete extends Base { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('group:delete') @@ -34,6 +35,7 @@ class Delete extends Base { ); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $gid = $input->getArgument('groupid'); if ($gid === 'admin') { @@ -59,6 +61,7 @@ class Delete extends Base { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeArgumentValues($argumentName, CompletionContext $context) { if ($argumentName === 'groupid') { return array_map(static fn (IGroup $group) => $group->getGID(), $this->groupManager->search($context->getCurrentWord())); diff --git a/core/Command/Group/Info.php b/core/Command/Group/Info.php index d42d2a64577..71492507086 100644 --- a/core/Command/Group/Info.php +++ b/core/Command/Group/Info.php @@ -24,6 +24,7 @@ class Info extends Base { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('group:info') @@ -41,6 +42,7 @@ class Info extends Base { ); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $gid = $input->getArgument('groupid'); $group = $this->groupManager->get($gid); @@ -64,6 +66,7 @@ class Info extends Base { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeArgumentValues($argumentName, CompletionContext $context) { if ($argumentName === 'groupid') { return array_map(static fn (IGroup $group) => $group->getGID(), $this->groupManager->search($context->getCurrentWord())); diff --git a/core/Command/Group/ListCommand.php b/core/Command/Group/ListCommand.php index 01522a23f7f..c80dc52f4ac 100644 --- a/core/Command/Group/ListCommand.php +++ b/core/Command/Group/ListCommand.php @@ -21,6 +21,7 @@ class ListCommand extends Base { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('group:list') @@ -57,6 +58,7 @@ class ListCommand extends Base { ); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $groups = $this->groupManager->search((string)$input->getArgument('searchstring'), (int)$input->getOption('limit'), (int)$input->getOption('offset')); $this->writeArrayInOutputFormat($input, $output, $this->formatGroups($groups, (bool)$input->getOption('info'))); diff --git a/core/Command/Group/RemoveUser.php b/core/Command/Group/RemoveUser.php index 952fc6e7712..3ca3d261821 100644 --- a/core/Command/Group/RemoveUser.php +++ b/core/Command/Group/RemoveUser.php @@ -24,6 +24,7 @@ class RemoveUser extends Base { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('group:removeuser') @@ -39,6 +40,7 @@ class RemoveUser extends Base { ); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $group = $this->groupManager->get($input->getArgument('group')); if (is_null($group)) { @@ -59,6 +61,7 @@ class RemoveUser extends Base { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeArgumentValues($argumentName, CompletionContext $context) { if ($argumentName === 'group') { return array_map(static fn (IGroup $group) => $group->getGID(), $this->groupManager->search($context->getCurrentWord())); diff --git a/core/Command/Info/File.php b/core/Command/Info/File.php index eb9657e62c3..4f5a04e521d 100644 --- a/core/Command/Info/File.php +++ b/core/Command/Info/File.php @@ -43,6 +43,7 @@ class File extends Command { parent::__construct(); } + #[\Override] protected function configure(): void { $this ->setName('info:file') @@ -52,6 +53,7 @@ class File extends Command { ->addOption('storage-tree', null, InputOption::VALUE_NONE, 'Show storage and cache wrapping tree'); } + #[\Override] public function execute(InputInterface $input, OutputInterface $output): int { $fileInput = $input->getArgument('file'); $showChildren = $input->getOption('children'); diff --git a/core/Command/Info/Space.php b/core/Command/Info/Space.php index 35c1d5c3228..990de828986 100644 --- a/core/Command/Info/Space.php +++ b/core/Command/Info/Space.php @@ -23,6 +23,7 @@ class Space extends Command { parent::__construct(); } + #[\Override] protected function configure(): void { $this ->setName('info:file:space') @@ -32,6 +33,7 @@ class Space extends Command { ->addOption('all', 'a', InputOption::VALUE_NONE, 'Display all items'); } + #[\Override] public function execute(InputInterface $input, OutputInterface $output): int { $fileInput = $input->getArgument('file'); $count = (int)$input->getOption('count'); diff --git a/core/Command/Info/Storage.php b/core/Command/Info/Storage.php index c1d0e1725ca..5f3263e7ce3 100644 --- a/core/Command/Info/Storage.php +++ b/core/Command/Info/Storage.php @@ -22,6 +22,7 @@ class Storage extends Base { parent::__construct(); } + #[\Override] protected function configure(): void { parent::configure(); $this @@ -30,6 +31,7 @@ class Storage extends Base { ->addArgument('storage', InputArgument::REQUIRED, 'Storage to get information for'); } + #[\Override] public function execute(InputInterface $input, OutputInterface $output): int { $storage = $input->getArgument('storage'); $storageId = $this->fileUtils->getNumericStorageId($storage); diff --git a/core/Command/Info/Storages.php b/core/Command/Info/Storages.php index ff767a2ff5d..75c3eb3625c 100644 --- a/core/Command/Info/Storages.php +++ b/core/Command/Info/Storages.php @@ -22,6 +22,7 @@ class Storages extends Base { parent::__construct(); } + #[\Override] protected function configure(): void { parent::configure(); $this @@ -31,6 +32,7 @@ class Storages extends Base { ->addOption('all', 'a', InputOption::VALUE_NONE, 'Display all storages'); } + #[\Override] public function execute(InputInterface $input, OutputInterface $output): int { $count = (int)$input->getOption('count'); $all = $input->getOption('all'); diff --git a/core/Command/Integrity/CheckApp.php b/core/Command/Integrity/CheckApp.php index df9e9973aa7..d4fdf5190e0 100644 --- a/core/Command/Integrity/CheckApp.php +++ b/core/Command/Integrity/CheckApp.php @@ -34,6 +34,7 @@ class CheckApp extends Base { /** * {@inheritdoc } */ + #[\Override] protected function configure() { parent::configure(); $this @@ -47,6 +48,7 @@ class CheckApp extends Base { /** * {@inheritdoc } */ + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { if ($input->getOption('all') && $input->getArgument('appid')) { $output->writeln('Option "--all" cannot be combined with an appid'); diff --git a/core/Command/Integrity/CheckCore.php b/core/Command/Integrity/CheckCore.php index 1eee2679b70..750da22286c 100644 --- a/core/Command/Integrity/CheckCore.php +++ b/core/Command/Integrity/CheckCore.php @@ -29,6 +29,7 @@ class CheckCore extends Base { /** * {@inheritdoc } */ + #[\Override] protected function configure() { parent::configure(); $this @@ -39,6 +40,7 @@ class CheckCore extends Base { /** * {@inheritdoc } */ + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { if (!$this->checker->isCodeCheckEnforced()) { $output->writeln('integrity:check-core can not be used on git checkouts'); diff --git a/core/Command/Integrity/SignApp.php b/core/Command/Integrity/SignApp.php index d307bc58985..a9c1cbb7be1 100644 --- a/core/Command/Integrity/SignApp.php +++ b/core/Command/Integrity/SignApp.php @@ -31,6 +31,7 @@ class SignApp extends Command { parent::__construct(null); } + #[\Override] protected function configure() { $this ->setName('integrity:sign-app') @@ -43,6 +44,7 @@ class SignApp extends Command { /** * {@inheritdoc } */ + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $path = $input->getOption('path'); $privateKeyPath = $input->getOption('privateKey'); diff --git a/core/Command/Integrity/SignCore.php b/core/Command/Integrity/SignCore.php index ed80091ec38..bd46e0e4f51 100644 --- a/core/Command/Integrity/SignCore.php +++ b/core/Command/Integrity/SignCore.php @@ -29,6 +29,7 @@ class SignCore extends Command { parent::__construct(null); } + #[\Override] protected function configure() { $this ->setName('integrity:sign-core') @@ -41,6 +42,7 @@ class SignCore extends Command { /** * {@inheritdoc } */ + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $privateKeyPath = $input->getOption('privateKey'); $keyBundlePath = $input->getOption('certificate'); diff --git a/core/Command/L10n/CreateJs.php b/core/Command/L10n/CreateJs.php index 64a21e6d48c..d4eee220e5f 100644 --- a/core/Command/L10n/CreateJs.php +++ b/core/Command/L10n/CreateJs.php @@ -28,6 +28,7 @@ class CreateJs extends Command implements CompletionAwareInterface { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('l10n:createjs') @@ -44,6 +45,7 @@ class CreateJs extends Command implements CompletionAwareInterface { ); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $app = $input->getArgument('app'); $lang = $input->getArgument('lang'); @@ -135,6 +137,7 @@ class CreateJs extends Command implements CompletionAwareInterface { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeOptionValues($optionName, CompletionContext $context) { return []; } @@ -146,6 +149,7 @@ class CreateJs extends Command implements CompletionAwareInterface { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeArgumentValues($argumentName, CompletionContext $context) { if ($argumentName === 'app') { return $this->appManager->getAllAppsInAppsFolders(); diff --git a/core/Command/Log/File.php b/core/Command/Log/File.php index ba5dad956e9..aa87ea59305 100644 --- a/core/Command/Log/File.php +++ b/core/Command/Log/File.php @@ -25,6 +25,7 @@ class File extends Command implements Completion\CompletionAwareInterface { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('log:file') @@ -50,6 +51,7 @@ class File extends Command implements Completion\CompletionAwareInterface { ; } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $toBeSet = []; @@ -113,6 +115,7 @@ class File extends Command implements Completion\CompletionAwareInterface { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeOptionValues($optionName, CompletionContext $context) { if ($optionName === 'file') { $helper = new ShellPathCompletion( @@ -132,6 +135,7 @@ class File extends Command implements Completion\CompletionAwareInterface { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeArgumentValues($argumentName, CompletionContext $context) { return []; } diff --git a/core/Command/Log/Manage.php b/core/Command/Log/Manage.php index f67f0d969f6..c04ddf837a0 100644 --- a/core/Command/Log/Manage.php +++ b/core/Command/Log/Manage.php @@ -26,6 +26,7 @@ class Manage extends Command implements CompletionAwareInterface { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('log:manage') @@ -51,6 +52,7 @@ class Manage extends Command implements CompletionAwareInterface { ; } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { // collate config setting to the end, to avoid partial configuration $toBeSet = []; @@ -163,6 +165,7 @@ class Manage extends Command implements CompletionAwareInterface { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeOptionValues($optionName, CompletionContext $context) { if ($optionName === 'backend') { return ['file', 'syslog', 'errorlog', 'systemd']; @@ -179,6 +182,7 @@ class Manage extends Command implements CompletionAwareInterface { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeArgumentValues($argumentName, CompletionContext $context) { return []; } diff --git a/core/Command/Maintenance/DataFingerprint.php b/core/Command/Maintenance/DataFingerprint.php index 014d6c411a4..99be354f09d 100644 --- a/core/Command/Maintenance/DataFingerprint.php +++ b/core/Command/Maintenance/DataFingerprint.php @@ -21,12 +21,14 @@ class DataFingerprint extends Command { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('maintenance:data-fingerprint') ->setDescription('update the systems data-fingerprint after a backup is restored'); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $fingerPrint = md5($this->timeFactory->getTime()); $this->config->setSystemValue('data-fingerprint', $fingerPrint); diff --git a/core/Command/Maintenance/Install.php b/core/Command/Maintenance/Install.php index 63826d8a331..c91f500aa72 100644 --- a/core/Command/Maintenance/Install.php +++ b/core/Command/Maintenance/Install.php @@ -33,6 +33,7 @@ class Install extends Command { parent::__construct(); } + #[\Override] protected function configure(): void { $this ->setName('maintenance:install') @@ -53,6 +54,7 @@ class Install extends Command { ->addOption('server-secret', null, InputOption::VALUE_OPTIONAL, 'Server secret, at least ' . Setup::MIN_SECRET_LENGTH . ' characters (will be randomly generated if not provided)'); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { // validate the environment $setupHelper = Server::get(Setup::class); diff --git a/core/Command/Maintenance/Mimetype/UpdateDB.php b/core/Command/Maintenance/Mimetype/UpdateDB.php index 4467e89eb32..3636e7d96ec 100644 --- a/core/Command/Maintenance/Mimetype/UpdateDB.php +++ b/core/Command/Maintenance/Mimetype/UpdateDB.php @@ -25,6 +25,7 @@ class UpdateDB extends Command { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('maintenance:mimetype:update-db') @@ -38,6 +39,7 @@ class UpdateDB extends Command { ; } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $mappings = $this->mimetypeDetector->getAllMappings(); diff --git a/core/Command/Maintenance/Mimetype/UpdateJS.php b/core/Command/Maintenance/Mimetype/UpdateJS.php index 2132ff54c6d..a9e7e79db19 100644 --- a/core/Command/Maintenance/Mimetype/UpdateJS.php +++ b/core/Command/Maintenance/Mimetype/UpdateJS.php @@ -20,12 +20,14 @@ class UpdateJS extends Command { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('maintenance:mimetype:update-js') ->setDescription('Update mimetypelist.js'); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { // Fetch all the aliases $aliases = $this->mimetypeDetector->getAllAliases(); diff --git a/core/Command/Maintenance/Mode.php b/core/Command/Maintenance/Mode.php index 19a12398022..7f8cfe4e012 100644 --- a/core/Command/Maintenance/Mode.php +++ b/core/Command/Maintenance/Mode.php @@ -23,6 +23,7 @@ class Mode extends Command { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('maintenance:mode') @@ -42,6 +43,7 @@ class Mode extends Command { ); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $maintenanceMode = $this->config->getSystemValueBool('maintenance'); if ($input->getOption('on')) { diff --git a/core/Command/Maintenance/Repair.php b/core/Command/Maintenance/Repair.php index 7b5959871c9..a79d296e520 100644 --- a/core/Command/Maintenance/Repair.php +++ b/core/Command/Maintenance/Repair.php @@ -39,6 +39,7 @@ class Repair extends Command { parent::__construct(); } + #[\Override] protected function configure(): void { $this ->setName('maintenance:repair') @@ -50,6 +51,7 @@ class Repair extends Command { 'Use this option when you want to include resource and load expensive tasks'); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $includeExpensive = (bool)$input->getOption('include-expensive'); $repairSteps = $this->repair::getRepairSteps($includeExpensive); diff --git a/core/Command/Maintenance/RepairShareOwnership.php b/core/Command/Maintenance/RepairShareOwnership.php index 6556d7ee707..3288943dc56 100644 --- a/core/Command/Maintenance/RepairShareOwnership.php +++ b/core/Command/Maintenance/RepairShareOwnership.php @@ -29,6 +29,7 @@ class RepairShareOwnership extends Command { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('maintenance:repair-share-owner') @@ -37,6 +38,7 @@ class RepairShareOwnership extends Command { ->addArgument('user', InputArgument::OPTIONAL, 'User to fix incoming shares for, if omitted all users will be fixed'); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $noConfirm = $input->getOption('no-confirm'); $userId = $input->getArgument('user'); diff --git a/core/Command/Maintenance/UpdateHtaccess.php b/core/Command/Maintenance/UpdateHtaccess.php index b4a99ddba34..881b5187ba3 100644 --- a/core/Command/Maintenance/UpdateHtaccess.php +++ b/core/Command/Maintenance/UpdateHtaccess.php @@ -15,12 +15,14 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; class UpdateHtaccess extends Command { + #[\Override] protected function configure() { $this ->setName('maintenance:update:htaccess') ->setDescription('Updates the .htaccess file'); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { if (Setup::updateHtaccess()) { $output->writeln('.htaccess has been updated'); diff --git a/core/Command/Maintenance/UpdateTheme.php b/core/Command/Maintenance/UpdateTheme.php index d4c85ec020d..d077032935b 100644 --- a/core/Command/Maintenance/UpdateTheme.php +++ b/core/Command/Maintenance/UpdateTheme.php @@ -23,12 +23,14 @@ class UpdateTheme extends UpdateJS { parent::__construct($mimetypeDetector); } + #[\Override] protected function configure() { $this ->setName('maintenance:theme:update') ->setDescription('Apply custom theme changes'); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { // run mimetypelist.js update since themes might change mimetype icons parent::execute($input, $output); diff --git a/core/Command/Memcache/DistributedClear.php b/core/Command/Memcache/DistributedClear.php index 424f21f1e81..73f9c0d9224 100644 --- a/core/Command/Memcache/DistributedClear.php +++ b/core/Command/Memcache/DistributedClear.php @@ -21,6 +21,7 @@ class DistributedClear extends Base { parent::__construct(); } + #[\Override] protected function configure(): void { $this ->setName('memcache:distributed:clear') @@ -29,6 +30,7 @@ class DistributedClear extends Base { parent::configure(); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $cache = $this->cacheFactory->createDistributed(); $prefix = $input->getOption('prefix'); diff --git a/core/Command/Memcache/DistributedDelete.php b/core/Command/Memcache/DistributedDelete.php index ae0855acb03..d7654e357d2 100644 --- a/core/Command/Memcache/DistributedDelete.php +++ b/core/Command/Memcache/DistributedDelete.php @@ -21,6 +21,7 @@ class DistributedDelete extends Base { parent::__construct(); } + #[\Override] protected function configure(): void { $this ->setName('memcache:distributed:delete') @@ -29,6 +30,7 @@ class DistributedDelete extends Base { parent::configure(); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $cache = $this->cacheFactory->createDistributed(); $key = $input->getArgument('key'); diff --git a/core/Command/Memcache/DistributedGet.php b/core/Command/Memcache/DistributedGet.php index bf1b00d312d..1612cebad4f 100644 --- a/core/Command/Memcache/DistributedGet.php +++ b/core/Command/Memcache/DistributedGet.php @@ -21,6 +21,7 @@ class DistributedGet extends Base { parent::__construct(); } + #[\Override] protected function configure(): void { $this ->setName('memcache:distributed:get') @@ -29,6 +30,7 @@ class DistributedGet extends Base { parent::configure(); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $cache = $this->cacheFactory->createDistributed(); $key = $input->getArgument('key'); diff --git a/core/Command/Memcache/DistributedSet.php b/core/Command/Memcache/DistributedSet.php index 0f31c22f730..1f06029a258 100644 --- a/core/Command/Memcache/DistributedSet.php +++ b/core/Command/Memcache/DistributedSet.php @@ -24,6 +24,7 @@ class DistributedSet extends Base { parent::__construct(); } + #[\Override] protected function configure(): void { $this ->setName('memcache:distributed:set') @@ -40,6 +41,7 @@ class DistributedSet extends Base { parent::configure(); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $cache = $this->cacheFactory->createDistributed(); $key = $input->getArgument('key'); diff --git a/core/Command/Memcache/RedisCommand.php b/core/Command/Memcache/RedisCommand.php index 1d1a7243d21..4de4f8b885a 100644 --- a/core/Command/Memcache/RedisCommand.php +++ b/core/Command/Memcache/RedisCommand.php @@ -23,6 +23,7 @@ class RedisCommand extends Base { parent::__construct(); } + #[\Override] protected function configure(): void { $this ->setName('memcache:redis:command') @@ -31,6 +32,7 @@ class RedisCommand extends Base { parent::configure(); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $command = $input->getArgument('redis-command'); if (!$this->redisFactory->isAvailable()) { diff --git a/core/Command/Preview/Cleanup.php b/core/Command/Preview/Cleanup.php index b4cab0b1c9c..56508c3f0f0 100644 --- a/core/Command/Preview/Cleanup.php +++ b/core/Command/Preview/Cleanup.php @@ -30,12 +30,14 @@ class Cleanup extends Base { parent::__construct(); } + #[\Override] protected function configure(): void { $this ->setName('preview:cleanup') ->setDescription('Removes existing preview files'); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { if ($this->deletePreviewFromPreviewTable($output) !== 0) { return 1; diff --git a/core/Command/Preview/Generate.php b/core/Command/Preview/Generate.php index 222c42f613b..f827586c6b1 100644 --- a/core/Command/Preview/Generate.php +++ b/core/Command/Preview/Generate.php @@ -29,6 +29,7 @@ class Generate extends Command { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('preview:generate') @@ -39,6 +40,7 @@ class Generate extends Command { ->addOption('mode', 'm', InputOption::VALUE_REQUIRED, "mode for generating uncropped previews, 'cover' or 'fill'", IPreview::MODE_FILL); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $fileInput = $input->getArgument('file'); $sizes = $input->getOption('size'); diff --git a/core/Command/Router/ListRoutes.php b/core/Command/Router/ListRoutes.php index 8932b549a65..4dee82464e3 100644 --- a/core/Command/Router/ListRoutes.php +++ b/core/Command/Router/ListRoutes.php @@ -27,6 +27,7 @@ class ListRoutes extends Base { parent::__construct(); } + #[\Override] protected function configure(): void { parent::configure(); $this @@ -52,6 +53,7 @@ class ListRoutes extends Base { ; } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $apps = $input->getArgument('app'); if (empty($apps)) { diff --git a/core/Command/Router/MatchRoute.php b/core/Command/Router/MatchRoute.php index 3b90463c7b2..a6b4262369d 100644 --- a/core/Command/Router/MatchRoute.php +++ b/core/Command/Router/MatchRoute.php @@ -29,6 +29,7 @@ class MatchRoute extends Base { parent::__construct(); } + #[\Override] protected function configure(): void { parent::configure(); $this @@ -49,6 +50,7 @@ class MatchRoute extends Base { ; } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $context = new RequestContext(method: strtoupper($input->getOption('method'))); $this->router->setContext($context); diff --git a/core/Command/Security/BruteforceAttempts.php b/core/Command/Security/BruteforceAttempts.php index d5fa0a284fd..10bd5809d28 100644 --- a/core/Command/Security/BruteforceAttempts.php +++ b/core/Command/Security/BruteforceAttempts.php @@ -20,6 +20,7 @@ class BruteforceAttempts extends Base { parent::__construct(); } + #[\Override] protected function configure(): void { parent::configure(); $this @@ -38,6 +39,7 @@ class BruteforceAttempts extends Base { ; } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $ip = $input->getArgument('ipaddress'); diff --git a/core/Command/Security/BruteforceResetAttempts.php b/core/Command/Security/BruteforceResetAttempts.php index 6987c0ef682..f882f1d0263 100644 --- a/core/Command/Security/BruteforceResetAttempts.php +++ b/core/Command/Security/BruteforceResetAttempts.php @@ -20,6 +20,7 @@ class BruteforceResetAttempts extends Base { parent::__construct(); } + #[\Override] protected function configure(): void { $this ->setName('security:bruteforce:reset') @@ -31,6 +32,7 @@ class BruteforceResetAttempts extends Base { ); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $ip = $input->getArgument('ipaddress'); diff --git a/core/Command/Security/ExportCertificates.php b/core/Command/Security/ExportCertificates.php index dcf34d4bce4..0af78e595f5 100644 --- a/core/Command/Security/ExportCertificates.php +++ b/core/Command/Security/ExportCertificates.php @@ -20,12 +20,14 @@ class ExportCertificates extends Base { parent::__construct(); } + #[\Override] protected function configure(): void { $this ->setName('security:certificates:export') ->setDescription('export the certificate bundle'); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $bundlePath = $this->certificateManager->getAbsoluteBundlePath(); $bundle = file_get_contents($bundlePath); diff --git a/core/Command/Security/ImportCertificate.php b/core/Command/Security/ImportCertificate.php index b23612baeb1..b2fdabd3237 100644 --- a/core/Command/Security/ImportCertificate.php +++ b/core/Command/Security/ImportCertificate.php @@ -20,6 +20,7 @@ class ImportCertificate extends Base { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('security:certificates:import') @@ -31,6 +32,7 @@ class ImportCertificate extends Base { ); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $path = $input->getArgument('path'); diff --git a/core/Command/Security/ListCertificates.php b/core/Command/Security/ListCertificates.php index cf1874a09d3..0692d8204fb 100644 --- a/core/Command/Security/ListCertificates.php +++ b/core/Command/Security/ListCertificates.php @@ -27,6 +27,7 @@ class ListCertificates extends Base { $this->l = $l10nFactory->get('core'); } + #[\Override] protected function configure() { $this ->setName('security:certificates') @@ -34,6 +35,7 @@ class ListCertificates extends Base { parent::configure(); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $outputType = $input->getOption('output'); if ($outputType === self::OUTPUT_FORMAT_JSON || $outputType === self::OUTPUT_FORMAT_JSON_PRETTY) { diff --git a/core/Command/Security/RemoveCertificate.php b/core/Command/Security/RemoveCertificate.php index 48062724d52..4c37eb0670b 100644 --- a/core/Command/Security/RemoveCertificate.php +++ b/core/Command/Security/RemoveCertificate.php @@ -20,6 +20,7 @@ class RemoveCertificate extends Base { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('security:certificates:remove') @@ -31,6 +32,7 @@ class RemoveCertificate extends Base { ); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $name = $input->getArgument('name'); diff --git a/core/Command/SetupChecks.php b/core/Command/SetupChecks.php index 6ef67726839..c8f7aa4c51d 100644 --- a/core/Command/SetupChecks.php +++ b/core/Command/SetupChecks.php @@ -22,6 +22,7 @@ class SetupChecks extends Base { parent::__construct(); } + #[\Override] protected function configure(): void { parent::configure(); @@ -31,6 +32,7 @@ class SetupChecks extends Base { ; } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $results = $this->setupCheckManager->runAll(); switch ($input->getOption('output')) { diff --git a/core/Command/SnowflakeDecodeId.php b/core/Command/SnowflakeDecodeId.php index e9993077aae..4c75488ab1a 100644 --- a/core/Command/SnowflakeDecodeId.php +++ b/core/Command/SnowflakeDecodeId.php @@ -21,6 +21,7 @@ class SnowflakeDecodeId extends Base { parent::__construct(); } + #[\Override] protected function configure(): void { parent::configure(); @@ -30,6 +31,7 @@ class SnowflakeDecodeId extends Base { ->addArgument('snowflake-id', InputArgument::REQUIRED, 'Nextcloud Snowflake ID to decode'); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $snowflakeId = $input->getArgument('snowflake-id'); $data = $this->decoder->decode($snowflakeId); diff --git a/core/Command/Status.php b/core/Command/Status.php index b76da40ba20..77aaa537419 100644 --- a/core/Command/Status.php +++ b/core/Command/Status.php @@ -26,6 +26,7 @@ class Status extends Base { parent::__construct('status'); } + #[\Override] protected function configure() { parent::configure(); @@ -39,6 +40,7 @@ class Status extends Base { ); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $maintenanceMode = $this->config->getSystemValueBool('maintenance', false); $needUpgrade = Util::needUpgrade(); diff --git a/core/Command/SystemTag/Add.php b/core/Command/SystemTag/Add.php index df8b507b07d..7e2006d6aff 100644 --- a/core/Command/SystemTag/Add.php +++ b/core/Command/SystemTag/Add.php @@ -21,6 +21,7 @@ class Add extends Base { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('tag:add') @@ -38,6 +39,7 @@ class Add extends Base { parent::configure(); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $name = $input->getArgument('name'); if ($name === '') { diff --git a/core/Command/SystemTag/Delete.php b/core/Command/SystemTag/Delete.php index f657f4473ab..93a2d015bfc 100644 --- a/core/Command/SystemTag/Delete.php +++ b/core/Command/SystemTag/Delete.php @@ -20,6 +20,7 @@ class Delete extends Base { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('tag:delete') @@ -31,6 +32,7 @@ class Delete extends Base { ); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { try { $this->systemTagManager->deleteTags($input->getArgument('id')); diff --git a/core/Command/SystemTag/Edit.php b/core/Command/SystemTag/Edit.php index 09c662e58e9..6e6295c486d 100644 --- a/core/Command/SystemTag/Edit.php +++ b/core/Command/SystemTag/Edit.php @@ -21,6 +21,7 @@ class Edit extends Base { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('tag:edit') @@ -50,6 +51,7 @@ class Edit extends Base { ); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $tagArray = $this->systemTagManager->getTagsByIds($input->getArgument('id')); // returns an array, but we always expect 0 or 1 results diff --git a/core/Command/SystemTag/ListCommand.php b/core/Command/SystemTag/ListCommand.php index 2c6435d6faf..c96e6af405f 100644 --- a/core/Command/SystemTag/ListCommand.php +++ b/core/Command/SystemTag/ListCommand.php @@ -20,6 +20,7 @@ class ListCommand extends Base { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('tag:list') @@ -39,6 +40,7 @@ class ListCommand extends Base { parent::configure(); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $tags = $this->systemTagManager->getAllTags( $input->getOption('visibilityFilter'), diff --git a/core/Command/TaskProcessing/Cleanup.php b/core/Command/TaskProcessing/Cleanup.php index b032bf898f9..63a5cee393e 100644 --- a/core/Command/TaskProcessing/Cleanup.php +++ b/core/Command/TaskProcessing/Cleanup.php @@ -32,6 +32,7 @@ class Cleanup extends Base { $this->appData = $appDataFactory->get('core'); } + #[\Override] protected function configure() { $this ->setName('taskprocessing:task:cleanup') @@ -45,6 +46,7 @@ class Cleanup extends Base { parent::configure(); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $maxAgeSeconds = (int)($input->getArgument('maxAgeSeconds') ?? Manager::MAX_TASK_AGE_SECONDS); $output->writeln('Cleanup up tasks older than ' . $maxAgeSeconds . ' seconds and the related output files'); diff --git a/core/Command/TaskProcessing/EnabledCommand.php b/core/Command/TaskProcessing/EnabledCommand.php index a99e3e001b9..c0136398104 100644 --- a/core/Command/TaskProcessing/EnabledCommand.php +++ b/core/Command/TaskProcessing/EnabledCommand.php @@ -23,6 +23,7 @@ class EnabledCommand extends Base { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('taskprocessing:task-type:set-enabled') @@ -40,6 +41,7 @@ class EnabledCommand extends Base { parent::configure(); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $enabled = (bool)$input->getArgument('enabled'); $taskType = $input->getArgument('task-type-id'); diff --git a/core/Command/TaskProcessing/GetCommand.php b/core/Command/TaskProcessing/GetCommand.php index f97556281a1..f7cfe3c8750 100644 --- a/core/Command/TaskProcessing/GetCommand.php +++ b/core/Command/TaskProcessing/GetCommand.php @@ -21,6 +21,7 @@ class GetCommand extends Base { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('taskprocessing:task:get') @@ -33,6 +34,7 @@ class GetCommand extends Base { parent::configure(); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $taskId = (int)$input->getArgument('task-id'); $task = $this->taskProcessingManager->getTask($taskId); diff --git a/core/Command/TaskProcessing/ListCommand.php b/core/Command/TaskProcessing/ListCommand.php index 59ede7d2e1d..0fb208ad72a 100644 --- a/core/Command/TaskProcessing/ListCommand.php +++ b/core/Command/TaskProcessing/ListCommand.php @@ -22,6 +22,7 @@ class ListCommand extends Base { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('taskprocessing:task:list') @@ -71,6 +72,7 @@ class ListCommand extends Base { parent::configure(); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $userIdFilter = $input->getOption('userIdFilter'); if ($userIdFilter === null) { diff --git a/core/Command/TaskProcessing/Statistics.php b/core/Command/TaskProcessing/Statistics.php index 84aaf812651..4a8622efefb 100644 --- a/core/Command/TaskProcessing/Statistics.php +++ b/core/Command/TaskProcessing/Statistics.php @@ -22,6 +22,7 @@ class Statistics extends Base { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('taskprocessing:task:stats') @@ -71,6 +72,7 @@ class Statistics extends Base { parent::configure(); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $userIdFilter = $input->getOption('userIdFilter'); if ($userIdFilter === null) { diff --git a/core/Command/TaskProcessing/WorkerCommand.php b/core/Command/TaskProcessing/WorkerCommand.php index 09f3f3573d2..2fb2aa30ff3 100644 --- a/core/Command/TaskProcessing/WorkerCommand.php +++ b/core/Command/TaskProcessing/WorkerCommand.php @@ -27,6 +27,7 @@ class WorkerCommand extends Base { parent::__construct(); } + #[\Override] protected function configure(): void { $this ->setName('taskprocessing:worker') @@ -60,6 +61,7 @@ class WorkerCommand extends Base { parent::configure(); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $startTime = time(); $timeout = (int)$input->getOption('timeout'); diff --git a/core/Command/TwoFactorAuth/Base.php b/core/Command/TwoFactorAuth/Base.php index ec4faf0835b..8d417eb4400 100644 --- a/core/Command/TwoFactorAuth/Base.php +++ b/core/Command/TwoFactorAuth/Base.php @@ -25,6 +25,7 @@ class Base extends \OC\Core\Command\Base { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeOptionValues($optionName, CompletionContext $context) { return []; } @@ -36,6 +37,7 @@ class Base extends \OC\Core\Command\Base { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeArgumentValues($argumentName, CompletionContext $context) { if ($argumentName === 'uid') { return array_map(function (IUser $user) { diff --git a/core/Command/TwoFactorAuth/Cleanup.php b/core/Command/TwoFactorAuth/Cleanup.php index f8f116af3fd..02fa86251d6 100644 --- a/core/Command/TwoFactorAuth/Cleanup.php +++ b/core/Command/TwoFactorAuth/Cleanup.php @@ -25,6 +25,7 @@ class Cleanup extends Base { ); } + #[\Override] protected function configure() { parent::configure(); @@ -33,6 +34,7 @@ class Cleanup extends Base { $this->addArgument('provider-id', InputArgument::REQUIRED); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $providerId = $input->getArgument('provider-id'); diff --git a/core/Command/TwoFactorAuth/Disable.php b/core/Command/TwoFactorAuth/Disable.php index c60c1245735..201dd9c1991 100644 --- a/core/Command/TwoFactorAuth/Disable.php +++ b/core/Command/TwoFactorAuth/Disable.php @@ -24,6 +24,7 @@ class Disable extends Base { ); } + #[\Override] protected function configure() { parent::configure(); @@ -33,6 +34,7 @@ class Disable extends Base { $this->addArgument('provider_id', InputArgument::REQUIRED); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $uid = $input->getArgument('uid'); $providerId = $input->getArgument('provider_id'); diff --git a/core/Command/TwoFactorAuth/Enable.php b/core/Command/TwoFactorAuth/Enable.php index 215cb31397e..7158a4695fd 100644 --- a/core/Command/TwoFactorAuth/Enable.php +++ b/core/Command/TwoFactorAuth/Enable.php @@ -24,6 +24,7 @@ class Enable extends Base { ); } + #[\Override] protected function configure() { parent::configure(); @@ -33,6 +34,7 @@ class Enable extends Base { $this->addArgument('provider_id', InputArgument::REQUIRED); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $uid = $input->getArgument('uid'); $providerId = $input->getArgument('provider_id'); diff --git a/core/Command/TwoFactorAuth/Enforce.php b/core/Command/TwoFactorAuth/Enforce.php index 3315f045bc8..dfa6ce362e1 100644 --- a/core/Command/TwoFactorAuth/Enforce.php +++ b/core/Command/TwoFactorAuth/Enforce.php @@ -23,6 +23,7 @@ class Enforce extends Command { parent::__construct(); } + #[\Override] protected function configure() { $this->setName('twofactorauth:enforce'); $this->setDescription('Enabled/disable enforced two-factor authentication'); @@ -52,6 +53,7 @@ class Enforce extends Command { ); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { if ($input->getOption('on')) { $enforcedGroups = $input->getOption('group'); diff --git a/core/Command/TwoFactorAuth/State.php b/core/Command/TwoFactorAuth/State.php index ab2e8f2aecf..dc718cb0c8b 100644 --- a/core/Command/TwoFactorAuth/State.php +++ b/core/Command/TwoFactorAuth/State.php @@ -25,6 +25,7 @@ class State extends Base { ); } + #[\Override] protected function configure() { parent::configure(); @@ -33,6 +34,7 @@ class State extends Base { $this->addArgument('uid', InputArgument::REQUIRED); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $uid = $input->getArgument('uid'); $user = $this->userManager->get($uid); diff --git a/core/Command/Upgrade.php b/core/Command/Upgrade.php index fbf7768ec74..20c2ec0d5ef 100644 --- a/core/Command/Upgrade.php +++ b/core/Command/Upgrade.php @@ -43,6 +43,7 @@ class Upgrade extends Command { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('upgrade') @@ -55,6 +56,7 @@ class Upgrade extends Command { * @param InputInterface $input input interface * @param OutputInterface $output output interface */ + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { if (Util::needUpgrade()) { if ($output->getVerbosity() > OutputInterface::VERBOSITY_NORMAL) { diff --git a/core/Command/User/Add.php b/core/Command/User/Add.php index 440bced4c2e..35a4dca5cc1 100644 --- a/core/Command/User/Add.php +++ b/core/Command/User/Add.php @@ -39,6 +39,7 @@ class Add extends Command { parent::__construct(); } + #[\Override] protected function configure(): void { $this ->setName('user:add') @@ -80,6 +81,7 @@ class Add extends Command { ); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $uid = $input->getArgument('uid'); if ($this->userManager->userExists($uid)) { diff --git a/core/Command/User/AuthTokens/Add.php b/core/Command/User/AuthTokens/Add.php index e7bf9a59a2a..bbfd7f38cea 100644 --- a/core/Command/User/AuthTokens/Add.php +++ b/core/Command/User/AuthTokens/Add.php @@ -32,6 +32,7 @@ class Add extends Command { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('user:auth-tokens:add') @@ -57,6 +58,7 @@ class Add extends Command { ; } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $username = $input->getArgument('user'); $password = null; diff --git a/core/Command/User/AuthTokens/Delete.php b/core/Command/User/AuthTokens/Delete.php index 2047d2eae2a..2c7a958d9a7 100644 --- a/core/Command/User/AuthTokens/Delete.php +++ b/core/Command/User/AuthTokens/Delete.php @@ -23,6 +23,7 @@ class Delete extends Base { parent::__construct(); } + #[\Override] protected function configure(): void { $this ->setName('user:auth-tokens:delete') @@ -45,6 +46,7 @@ class Delete extends Base { ); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $uid = $input->getArgument('uid'); $id = (int)$input->getArgument('id'); diff --git a/core/Command/User/AuthTokens/ListCommand.php b/core/Command/User/AuthTokens/ListCommand.php index b36aa717505..7b26090735f 100644 --- a/core/Command/User/AuthTokens/ListCommand.php +++ b/core/Command/User/AuthTokens/ListCommand.php @@ -22,6 +22,7 @@ class ListCommand extends Base { parent::__construct(); } + #[\Override] protected function configure(): void { parent::configure(); @@ -35,6 +36,7 @@ class ListCommand extends Base { ); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $user = $this->userManager->get($input->getArgument('user')); diff --git a/core/Command/User/ClearGeneratedAvatarCacheCommand.php b/core/Command/User/ClearGeneratedAvatarCacheCommand.php index 515b3a913b7..ff9073dcf4b 100644 --- a/core/Command/User/ClearGeneratedAvatarCacheCommand.php +++ b/core/Command/User/ClearGeneratedAvatarCacheCommand.php @@ -20,12 +20,14 @@ class ClearGeneratedAvatarCacheCommand extends Base { parent::__construct(); } + #[\Override] protected function configure(): void { $this ->setDescription('clear avatar cache') ->setName('user:clear-avatar-cache'); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $output->writeln('Clearing avatar cache has started'); $this->avatarManager->clearCachedAvatars(); diff --git a/core/Command/User/Delete.php b/core/Command/User/Delete.php index c5d0578f5f8..c8cc5beb98a 100644 --- a/core/Command/User/Delete.php +++ b/core/Command/User/Delete.php @@ -22,6 +22,7 @@ class Delete extends Base { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('user:delete') @@ -33,6 +34,7 @@ class Delete extends Base { ); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $user = $this->userManager->get($input->getArgument('uid')); if (is_null($user)) { @@ -54,6 +56,7 @@ class Delete extends Base { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeArgumentValues($argumentName, CompletionContext $context) { if ($argumentName === 'uid') { return array_map(static fn (IUser $user) => $user->getUID(), $this->userManager->search($context->getCurrentWord())); diff --git a/core/Command/User/Disable.php b/core/Command/User/Disable.php index 71d7d3087c4..c13cbb4a4e5 100644 --- a/core/Command/User/Disable.php +++ b/core/Command/User/Disable.php @@ -22,6 +22,7 @@ class Disable extends Base { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('user:disable') @@ -33,6 +34,7 @@ class Disable extends Base { ); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $user = $this->userManager->get($input->getArgument('uid')); if (is_null($user)) { @@ -50,6 +52,7 @@ class Disable extends Base { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeArgumentValues($argumentName, CompletionContext $context) { if ($argumentName === 'uid') { return array_map( diff --git a/core/Command/User/Enable.php b/core/Command/User/Enable.php index 7edd1849886..be6888ac65b 100644 --- a/core/Command/User/Enable.php +++ b/core/Command/User/Enable.php @@ -22,6 +22,7 @@ class Enable extends Base { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('user:enable') @@ -33,6 +34,7 @@ class Enable extends Base { ); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $user = $this->userManager->get($input->getArgument('uid')); if (is_null($user)) { @@ -50,6 +52,7 @@ class Enable extends Base { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeArgumentValues($argumentName, CompletionContext $context) { if ($argumentName === 'uid') { return array_map( diff --git a/core/Command/User/Info.php b/core/Command/User/Info.php index 4be0caefae3..f9c7600800f 100644 --- a/core/Command/User/Info.php +++ b/core/Command/User/Info.php @@ -27,6 +27,7 @@ class Info extends Base { parent::__construct(); } + #[\Override] protected function configure(): void { $this ->setName('user:info') @@ -44,6 +45,7 @@ class Info extends Base { ); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $user = $this->userManager->get($input->getArgument('user')); if (is_null($user)) { @@ -105,6 +107,7 @@ class Info extends Base { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeArgumentValues($argumentName, CompletionContext $context) { if ($argumentName === 'user') { return array_map(static fn (IUser $user) => $user->getUID(), $this->userManager->searchDisplayName($context->getCurrentWord())); diff --git a/core/Command/User/Keys/Verify.php b/core/Command/User/Keys/Verify.php index 053a51049e8..6113eaedad5 100644 --- a/core/Command/User/Keys/Verify.php +++ b/core/Command/User/Keys/Verify.php @@ -26,6 +26,7 @@ class Verify extends Command { parent::__construct(); } + #[\Override] protected function configure(): void { $this ->setName('user:keys:verify') @@ -49,6 +50,7 @@ class Verify extends Command { * @param OutputInterface $output * @return int */ + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $userId = $input->getArgument('user-id'); diff --git a/core/Command/User/LastSeen.php b/core/Command/User/LastSeen.php index 514396f9f52..fdbbe13915e 100644 --- a/core/Command/User/LastSeen.php +++ b/core/Command/User/LastSeen.php @@ -23,6 +23,7 @@ class LastSeen extends Base { parent::__construct(); } + #[\Override] protected function configure(): void { $this ->setName('user:lastseen') @@ -41,6 +42,7 @@ class LastSeen extends Base { ; } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $singleUserId = $input->getArgument('uid'); @@ -86,6 +88,7 @@ class LastSeen extends Base { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeArgumentValues($argumentName, CompletionContext $context) { if ($argumentName === 'uid') { return array_map(static fn (IUser $user) => $user->getUID(), $this->userManager->searchDisplayName($context->getCurrentWord())); diff --git a/core/Command/User/ListCommand.php b/core/Command/User/ListCommand.php index ec2d94e101a..bbd835e0f3c 100644 --- a/core/Command/User/ListCommand.php +++ b/core/Command/User/ListCommand.php @@ -22,6 +22,7 @@ class ListCommand extends Base { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('user:list') @@ -57,6 +58,7 @@ class ListCommand extends Base { ); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $limit = (int)$input->getOption('limit'); $offset = (int)$input->getOption('offset'); diff --git a/core/Command/User/Profile.php b/core/Command/User/Profile.php index b12dc697cb3..e4ec87c5f02 100644 --- a/core/Command/User/Profile.php +++ b/core/Command/User/Profile.php @@ -28,6 +28,7 @@ class Profile extends Base { parent::__construct(); } + #[\Override] protected function configure() { parent::configure(); $this @@ -125,6 +126,7 @@ class Profile extends Base { return $user; } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { try { $user = $this->checkInput($input); @@ -213,6 +215,7 @@ class Profile extends Base { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeArgumentValues($argumentName, CompletionContext $context): array { if ($argumentName === 'uid') { return array_map(static fn (IUser $user) => $user->getUID(), $this->userManager->searchDisplayName($context->getCurrentWord())); diff --git a/core/Command/User/Report.php b/core/Command/User/Report.php index c0f054adb00..c8d6b5bcb50 100644 --- a/core/Command/User/Report.php +++ b/core/Command/User/Report.php @@ -28,6 +28,7 @@ class Report extends Command { parent::__construct(); } + #[\Override] protected function configure(): void { $this ->setName('user:report') @@ -41,6 +42,7 @@ class Report extends Command { ; } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $table = new Table($output); $table->setHeaders(['Account Report', '']); diff --git a/core/Command/User/ResetPassword.php b/core/Command/User/ResetPassword.php index cdda5df1c18..59b4b40c0f9 100644 --- a/core/Command/User/ResetPassword.php +++ b/core/Command/User/ResetPassword.php @@ -28,6 +28,7 @@ class ResetPassword extends Base { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('user:resetpassword') @@ -52,6 +53,7 @@ class ResetPassword extends Base { ; } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $username = $input->getArgument('user'); @@ -136,6 +138,7 @@ class ResetPassword extends Base { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeArgumentValues($argumentName, CompletionContext $context) { if ($argumentName === 'user') { return array_map(static fn (IUser $user) => $user->getUID(), $this->userManager->searchDisplayName($context->getCurrentWord())); diff --git a/core/Command/User/Setting.php b/core/Command/User/Setting.php index 7fc5aab1dc7..17b11fa0838 100644 --- a/core/Command/User/Setting.php +++ b/core/Command/User/Setting.php @@ -25,6 +25,7 @@ class Setting extends Base { parent::__construct(); } + #[\Override] protected function configure() { parent::configure(); $this @@ -131,6 +132,7 @@ class Setting extends Base { } } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { try { $this->checkInput($input); @@ -244,6 +246,7 @@ class Setting extends Base { * @param CompletionContext $context * @return string[] */ + #[\Override] public function completeArgumentValues($argumentName, CompletionContext $context) { if ($argumentName === 'uid') { return array_map(static fn (IUser $user) => $user->getUID(), $this->userManager->search($context->getCurrentWord())); diff --git a/core/Command/User/SyncAccountDataCommand.php b/core/Command/User/SyncAccountDataCommand.php index c353df6fe9f..1cbbca7fc20 100644 --- a/core/Command/User/SyncAccountDataCommand.php +++ b/core/Command/User/SyncAccountDataCommand.php @@ -24,6 +24,7 @@ class SyncAccountDataCommand extends Base { parent::__construct(); } + #[\Override] protected function configure() { $this ->setName('user:sync-account-data') @@ -43,6 +44,7 @@ class SyncAccountDataCommand extends Base { ); } + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $users = $this->userManager->searchDisplayName('', (int)$input->getOption('limit'), (int)$input->getOption('offset')); diff --git a/core/Command/User/Welcome.php b/core/Command/User/Welcome.php index 65637759689..75a4c550015 100644 --- a/core/Command/User/Welcome.php +++ b/core/Command/User/Welcome.php @@ -30,6 +30,7 @@ class Welcome extends Base { /** * @return void */ + #[\Override] protected function configure() { $this ->setName('user:welcome') @@ -53,6 +54,7 @@ class Welcome extends Base { * @param OutputInterface $output * @return int */ + #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $userId = $input->getArgument('user'); // check if user exists diff --git a/core/Data/LoginFlowV2Credentials.php b/core/Data/LoginFlowV2Credentials.php index 0997b2cbe06..211d6a23696 100644 --- a/core/Data/LoginFlowV2Credentials.php +++ b/core/Data/LoginFlowV2Credentials.php @@ -37,6 +37,7 @@ class LoginFlowV2Credentials implements \JsonSerializable { return $this->appPassword; } + #[\Override] public function jsonSerialize(): array { return [ 'server' => $this->server, diff --git a/core/Db/ProfileConfig.php b/core/Db/ProfileConfig.php index c61b3921a9f..125e5ac205f 100644 --- a/core/Db/ProfileConfig.php +++ b/core/Db/ProfileConfig.php @@ -98,6 +98,7 @@ class ProfileConfig extends Entity implements JsonSerializable { $this->setVisibilityMap($visibilityMap); } + #[\Override] public function jsonSerialize(): array { return [ 'userId' => $this->userId, diff --git a/core/Listener/AddMissingIndicesListener.php b/core/Listener/AddMissingIndicesListener.php index f1d93218a41..f91bad7998b 100644 --- a/core/Listener/AddMissingIndicesListener.php +++ b/core/Listener/AddMissingIndicesListener.php @@ -23,6 +23,7 @@ class AddMissingIndicesListener implements IEventListener { ) { } + #[\Override] public function handle(Event $event): void { if (!($event instanceof AddMissingIndicesEvent)) { return; diff --git a/core/Listener/AddMissingPrimaryKeyListener.php b/core/Listener/AddMissingPrimaryKeyListener.php index 1cd6951c9a1..98b6542b4d7 100644 --- a/core/Listener/AddMissingPrimaryKeyListener.php +++ b/core/Listener/AddMissingPrimaryKeyListener.php @@ -18,6 +18,7 @@ use OCP\EventDispatcher\IEventListener; */ class AddMissingPrimaryKeyListener implements IEventListener { + #[\Override] public function handle(Event $event): void { if (!($event instanceof AddMissingPrimaryKeyEvent)) { return; diff --git a/core/Listener/BeforeMessageLoggedEventListener.php b/core/Listener/BeforeMessageLoggedEventListener.php index 9010f7755eb..b203094ca1c 100644 --- a/core/Listener/BeforeMessageLoggedEventListener.php +++ b/core/Listener/BeforeMessageLoggedEventListener.php @@ -26,6 +26,7 @@ class BeforeMessageLoggedEventListener implements IEventListener { ) { } + #[\Override] public function handle(Event $event): void { if (!$event instanceof BeforeMessageLoggedEvent) { return; diff --git a/core/Listener/BeforeTemplateRenderedListener.php b/core/Listener/BeforeTemplateRenderedListener.php index 714083bf424..949d58eea55 100644 --- a/core/Listener/BeforeTemplateRenderedListener.php +++ b/core/Listener/BeforeTemplateRenderedListener.php @@ -23,6 +23,7 @@ class BeforeTemplateRenderedListener implements IEventListener { ) { } + #[\Override] public function handle(Event $event): void { if (!($event instanceof BeforeTemplateRenderedEvent || $event instanceof BeforeLoginTemplateRenderedEvent)) { return; diff --git a/core/Listener/PasswordUpdatedListener.php b/core/Listener/PasswordUpdatedListener.php index 4830c767442..6d9e815cd44 100644 --- a/core/Listener/PasswordUpdatedListener.php +++ b/core/Listener/PasswordUpdatedListener.php @@ -24,6 +24,7 @@ class PasswordUpdatedListener implements IEventListener { } + #[\Override] public function handle(Event $event): void { if ($event instanceof PasswordUpdatedEvent) { $this->verificationToken->delete('', $event->getUser(), 'lostpassword'); diff --git a/core/Middleware/TwoFactorMiddleware.php b/core/Middleware/TwoFactorMiddleware.php index ffbcc2ce3da..e2ea5296a04 100644 --- a/core/Middleware/TwoFactorMiddleware.php +++ b/core/Middleware/TwoFactorMiddleware.php @@ -45,6 +45,7 @@ class TwoFactorMiddleware extends Middleware { * @param Controller $controller * @param string $methodName */ + #[\Override] public function beforeController($controller, $methodName) { if ($this->reflector->hasAnnotationOrAttribute('NoTwoFactorRequired', NoTwoFactorRequired::class)) { // Route handler explicitly marked to work without finished 2FA are @@ -118,6 +119,7 @@ class TwoFactorMiddleware extends Middleware { } } + #[\Override] public function afterException($controller, $methodName, Exception $exception) { if ($exception instanceof TwoFactorAuthRequiredException) { $params = [ diff --git a/core/Migrations/Version13000Date20170705121758.php b/core/Migrations/Version13000Date20170705121758.php index 17262cf0743..effc0e7fc25 100644 --- a/core/Migrations/Version13000Date20170705121758.php +++ b/core/Migrations/Version13000Date20170705121758.php @@ -19,6 +19,7 @@ class Version13000Date20170705121758 extends SimpleMigrationStep { * @return null|ISchemaWrapper * @since 13.0.0 */ + #[\Override] public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version13000Date20170718121200.php b/core/Migrations/Version13000Date20170718121200.php index 933cd49f784..2de0c2b9ba0 100644 --- a/core/Migrations/Version13000Date20170718121200.php +++ b/core/Migrations/Version13000Date20170718121200.php @@ -18,6 +18,7 @@ class Version13000Date20170718121200 extends SimpleMigrationStep { ) { } + #[\Override] public function preSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); @@ -43,6 +44,7 @@ class Version13000Date20170718121200 extends SimpleMigrationStep { * @return null|ISchemaWrapper * @since 13.0.0 */ + #[\Override] public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); @@ -1000,6 +1002,7 @@ class Version13000Date20170718121200 extends SimpleMigrationStep { return $schema; } + #[\Override] public function postSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version13000Date20170814074715.php b/core/Migrations/Version13000Date20170814074715.php index 6e7ca19fc3c..beb492ac557 100644 --- a/core/Migrations/Version13000Date20170814074715.php +++ b/core/Migrations/Version13000Date20170814074715.php @@ -17,6 +17,7 @@ class Version13000Date20170814074715 extends SimpleMigrationStep { * @param array $options * @since 13.0.0 */ + #[\Override] public function preSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) { } @@ -27,6 +28,7 @@ class Version13000Date20170814074715 extends SimpleMigrationStep { * @return null|ISchemaWrapper * @since 13.0.0 */ + #[\Override] public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); @@ -55,6 +57,7 @@ class Version13000Date20170814074715 extends SimpleMigrationStep { * @param array $options * @since 13.0.0 */ + #[\Override] public function postSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) { } } diff --git a/core/Migrations/Version13000Date20170919121250.php b/core/Migrations/Version13000Date20170919121250.php index b3e9541d605..104c3739c43 100644 --- a/core/Migrations/Version13000Date20170919121250.php +++ b/core/Migrations/Version13000Date20170919121250.php @@ -20,6 +20,7 @@ class Version13000Date20170919121250 extends SimpleMigrationStep { * @param array $options * @since 13.0.0 */ + #[\Override] public function preSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) { } @@ -30,6 +31,7 @@ class Version13000Date20170919121250 extends SimpleMigrationStep { * @return null|ISchemaWrapper * @since 13.0.0 */ + #[\Override] public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); @@ -110,6 +112,7 @@ class Version13000Date20170919121250 extends SimpleMigrationStep { * @param array $options * @since 13.0.0 */ + #[\Override] public function postSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) { } } diff --git a/core/Migrations/Version13000Date20170926101637.php b/core/Migrations/Version13000Date20170926101637.php index 61bb690be08..4c14168c87a 100644 --- a/core/Migrations/Version13000Date20170926101637.php +++ b/core/Migrations/Version13000Date20170926101637.php @@ -19,6 +19,7 @@ class Version13000Date20170926101637 extends BigIntMigration { * ['table1' => ['column1', 'column2'], ...] * @since 13.0.0 */ + #[\Override] protected function getColumnsByTable() { return [ 'admin_settings' => ['id'], diff --git a/core/Migrations/Version14000Date20180129121024.php b/core/Migrations/Version14000Date20180129121024.php index c16d95ed71b..cc9b19de588 100644 --- a/core/Migrations/Version14000Date20180129121024.php +++ b/core/Migrations/Version14000Date20180129121024.php @@ -14,10 +14,12 @@ use OCP\Migration\SimpleMigrationStep; * Delete the admin|personal sections and settings tables */ class Version14000Date20180129121024 extends SimpleMigrationStep { + #[\Override] public function name(): string { return 'Drop obsolete settings tables'; } + #[\Override] public function description(): string { return 'Drops the following obsolete tables: "admin_sections", "admin_settings", "personal_sections" and "personal_settings"'; } @@ -29,6 +31,7 @@ class Version14000Date20180129121024 extends SimpleMigrationStep { * @return null|ISchemaWrapper * @since 13.0.0 */ + #[\Override] public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version14000Date20180404140050.php b/core/Migrations/Version14000Date20180404140050.php index 6f477f7fcdc..b512af080d9 100644 --- a/core/Migrations/Version14000Date20180404140050.php +++ b/core/Migrations/Version14000Date20180404140050.php @@ -22,10 +22,12 @@ class Version14000Date20180404140050 extends SimpleMigrationStep { ) { } + #[\Override] public function name(): string { return 'Add lowercase user id column to users table'; } + #[\Override] public function description(): string { return 'Adds "uid_lower" column to the users table and fills the column to allow indexed case-insensitive searches'; } @@ -36,6 +38,7 @@ class Version14000Date20180404140050 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); @@ -57,6 +60,7 @@ class Version14000Date20180404140050 extends SimpleMigrationStep { * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` * @param array $options */ + #[\Override] public function postSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) { $qb = $this->connection->getQueryBuilder(); diff --git a/core/Migrations/Version14000Date20180516101403.php b/core/Migrations/Version14000Date20180516101403.php index a71673a9674..d4ddf083f39 100644 --- a/core/Migrations/Version14000Date20180516101403.php +++ b/core/Migrations/Version14000Date20180516101403.php @@ -17,6 +17,7 @@ class Version14000Date20180516101403 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version14000Date20180518120534.php b/core/Migrations/Version14000Date20180518120534.php index 850862070ab..b7d65cd3f25 100644 --- a/core/Migrations/Version14000Date20180518120534.php +++ b/core/Migrations/Version14000Date20180518120534.php @@ -13,6 +13,7 @@ use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; class Version14000Date20180518120534 extends SimpleMigrationStep { + #[\Override] public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version14000Date20180522074438.php b/core/Migrations/Version14000Date20180522074438.php index e605d674daa..4e90d9fbc0d 100644 --- a/core/Migrations/Version14000Date20180522074438.php +++ b/core/Migrations/Version14000Date20180522074438.php @@ -14,6 +14,7 @@ use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; class Version14000Date20180522074438 extends SimpleMigrationStep { + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ISchemaWrapper { $schema = $schemaClosure(); diff --git a/core/Migrations/Version14000Date20180710092004.php b/core/Migrations/Version14000Date20180710092004.php index dffaef0fe0c..81fc3b61988 100644 --- a/core/Migrations/Version14000Date20180710092004.php +++ b/core/Migrations/Version14000Date20180710092004.php @@ -14,6 +14,7 @@ use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; class Version14000Date20180710092004 extends SimpleMigrationStep { + #[\Override] public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version14000Date20180712153140.php b/core/Migrations/Version14000Date20180712153140.php index b1a295ea2f6..89d50bdc338 100644 --- a/core/Migrations/Version14000Date20180712153140.php +++ b/core/Migrations/Version14000Date20180712153140.php @@ -16,6 +16,7 @@ use OCP\Migration\SimpleMigrationStep; * Class Version14000Date20180712153140 */ class Version14000Date20180712153140 extends SimpleMigrationStep { + #[\Override] public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version15000Date20180926101451.php b/core/Migrations/Version15000Date20180926101451.php index 6e254a3f840..be2cc70ad6c 100644 --- a/core/Migrations/Version15000Date20180926101451.php +++ b/core/Migrations/Version15000Date20180926101451.php @@ -20,6 +20,7 @@ class Version15000Date20180926101451 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version15000Date20181015062942.php b/core/Migrations/Version15000Date20181015062942.php index 83fc9a61ade..ddde2a2ca84 100644 --- a/core/Migrations/Version15000Date20181015062942.php +++ b/core/Migrations/Version15000Date20181015062942.php @@ -20,6 +20,7 @@ class Version15000Date20181015062942 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version15000Date20181029084625.php b/core/Migrations/Version15000Date20181029084625.php index 06c307d00d2..65a45bb7bdb 100644 --- a/core/Migrations/Version15000Date20181029084625.php +++ b/core/Migrations/Version15000Date20181029084625.php @@ -20,6 +20,7 @@ class Version15000Date20181029084625 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version16000Date20190207141427.php b/core/Migrations/Version16000Date20190207141427.php index 3e94748062b..291eb56ecce 100644 --- a/core/Migrations/Version16000Date20190207141427.php +++ b/core/Migrations/Version16000Date20190207141427.php @@ -21,6 +21,7 @@ class Version16000Date20190207141427 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version16000Date20190212081545.php b/core/Migrations/Version16000Date20190212081545.php index bb45f411bcd..f9c077e1470 100644 --- a/core/Migrations/Version16000Date20190212081545.php +++ b/core/Migrations/Version16000Date20190212081545.php @@ -22,6 +22,7 @@ class Version16000Date20190212081545 extends SimpleMigrationStep { * * @return ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version16000Date20190427105638.php b/core/Migrations/Version16000Date20190427105638.php index 98a81e1a2ff..9e98cee0d07 100644 --- a/core/Migrations/Version16000Date20190427105638.php +++ b/core/Migrations/Version16000Date20190427105638.php @@ -25,6 +25,7 @@ class Version16000Date20190427105638 extends SimpleMigrationStep { * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` * @param array $options */ + #[\Override] public function preSchemaChange(IOutput $output, Closure $schemaClosure, array $options) { $this->connection ->getQueryBuilder() @@ -39,6 +40,7 @@ class Version16000Date20190427105638 extends SimpleMigrationStep { * @return null|ISchemaWrapper * @throws \Doctrine\DBAL\Schema\SchemaException */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version16000Date20190428150708.php b/core/Migrations/Version16000Date20190428150708.php index 1dcc108a0d7..95c9bb0b690 100644 --- a/core/Migrations/Version16000Date20190428150708.php +++ b/core/Migrations/Version16000Date20190428150708.php @@ -22,6 +22,7 @@ class Version16000Date20190428150708 extends SimpleMigrationStep { * @return null|ISchemaWrapper * @throws \Doctrine\DBAL\Schema\SchemaException */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version17000Date20190514105811.php b/core/Migrations/Version17000Date20190514105811.php index b603e85c8f6..e15619e57f3 100644 --- a/core/Migrations/Version17000Date20190514105811.php +++ b/core/Migrations/Version17000Date20190514105811.php @@ -21,6 +21,7 @@ class Version17000Date20190514105811 extends SimpleMigrationStep { * @param array $options * @return ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version18000Date20190920085628.php b/core/Migrations/Version18000Date20190920085628.php index ed48792d694..e07ce3fbfb9 100644 --- a/core/Migrations/Version18000Date20190920085628.php +++ b/core/Migrations/Version18000Date20190920085628.php @@ -27,6 +27,7 @@ class Version18000Date20190920085628 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); @@ -51,6 +52,7 @@ class Version18000Date20190920085628 extends SimpleMigrationStep { * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` * @param array $options */ + #[\Override] public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) { $query = $this->connection->getQueryBuilder(); $query->update('groups') diff --git a/core/Migrations/Version18000Date20191014105105.php b/core/Migrations/Version18000Date20191014105105.php index adfd65a4dc2..bdc28fa4261 100644 --- a/core/Migrations/Version18000Date20191014105105.php +++ b/core/Migrations/Version18000Date20191014105105.php @@ -27,6 +27,7 @@ class Version18000Date20191014105105 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version18000Date20191204114856.php b/core/Migrations/Version18000Date20191204114856.php index fca1a9c43b8..aafaf95c15f 100644 --- a/core/Migrations/Version18000Date20191204114856.php +++ b/core/Migrations/Version18000Date20191204114856.php @@ -27,6 +27,7 @@ class Version18000Date20191204114856 extends SimpleMigrationStep { * @return null|ISchemaWrapper * @throws \Doctrine\DBAL\Schema\SchemaException */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version19000Date20200211083441.php b/core/Migrations/Version19000Date20200211083441.php index 2f8b46ad772..f4995e333f7 100644 --- a/core/Migrations/Version19000Date20200211083441.php +++ b/core/Migrations/Version19000Date20200211083441.php @@ -14,6 +14,7 @@ use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; class Version19000Date20200211083441 extends SimpleMigrationStep { + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version20000Date20201109081915.php b/core/Migrations/Version20000Date20201109081915.php index 285eaa124fc..88948caea89 100644 --- a/core/Migrations/Version20000Date20201109081915.php +++ b/core/Migrations/Version20000Date20201109081915.php @@ -20,6 +20,7 @@ class Version20000Date20201109081915 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version20000Date20201109081918.php b/core/Migrations/Version20000Date20201109081918.php index 6ae20c11035..1f5679f7741 100644 --- a/core/Migrations/Version20000Date20201109081918.php +++ b/core/Migrations/Version20000Date20201109081918.php @@ -27,6 +27,7 @@ class Version20000Date20201109081918 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); @@ -62,6 +63,7 @@ class Version20000Date20201109081918 extends SimpleMigrationStep { * * @since 13.0.0 */ + #[\Override] public function postSchemaChange(IOutput $output, \Closure $schemaClosure, array $options): void { if (!$this->connection->tableExists('credentials')) { return; diff --git a/core/Migrations/Version20000Date20201109081919.php b/core/Migrations/Version20000Date20201109081919.php index c283490e26b..c625c607905 100644 --- a/core/Migrations/Version20000Date20201109081919.php +++ b/core/Migrations/Version20000Date20201109081919.php @@ -20,6 +20,7 @@ class Version20000Date20201109081919 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version20000Date20201111081915.php b/core/Migrations/Version20000Date20201111081915.php index af2965a12ed..a879563cebc 100644 --- a/core/Migrations/Version20000Date20201111081915.php +++ b/core/Migrations/Version20000Date20201111081915.php @@ -20,6 +20,7 @@ class Version20000Date20201111081915 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version21000Date20201120141228.php b/core/Migrations/Version21000Date20201120141228.php index feba7c469bb..1bba2f769a2 100644 --- a/core/Migrations/Version21000Date20201120141228.php +++ b/core/Migrations/Version21000Date20201120141228.php @@ -14,6 +14,7 @@ use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; class Version21000Date20201120141228 extends SimpleMigrationStep { + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version21000Date20201202095923.php b/core/Migrations/Version21000Date20201202095923.php index a96bdd5a1fc..eb3418031e2 100644 --- a/core/Migrations/Version21000Date20201202095923.php +++ b/core/Migrations/Version21000Date20201202095923.php @@ -21,6 +21,7 @@ class Version21000Date20201202095923 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version21000Date20210119195004.php b/core/Migrations/Version21000Date20210119195004.php index ec136e4e8b2..951af95a7fc 100644 --- a/core/Migrations/Version21000Date20210119195004.php +++ b/core/Migrations/Version21000Date20210119195004.php @@ -23,6 +23,7 @@ class Version21000Date20210119195004 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version21000Date20210309185126.php b/core/Migrations/Version21000Date20210309185126.php index e03e0a24b3e..696b50514b7 100644 --- a/core/Migrations/Version21000Date20210309185126.php +++ b/core/Migrations/Version21000Date20210309185126.php @@ -21,6 +21,7 @@ class Version21000Date20210309185126 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version21000Date20210309185127.php b/core/Migrations/Version21000Date20210309185127.php index 35efc1e5ab7..ea9bb493c0d 100644 --- a/core/Migrations/Version21000Date20210309185127.php +++ b/core/Migrations/Version21000Date20210309185127.php @@ -20,6 +20,7 @@ class Version21000Date20210309185127 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version22000Date20210216080825.php b/core/Migrations/Version22000Date20210216080825.php index c8bfe38f2bc..353e0037e3c 100644 --- a/core/Migrations/Version22000Date20210216080825.php +++ b/core/Migrations/Version22000Date20210216080825.php @@ -23,6 +23,7 @@ class Version22000Date20210216080825 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version23000Date20210721100600.php b/core/Migrations/Version23000Date20210721100600.php index a611c0c4b36..853b36d77ec 100644 --- a/core/Migrations/Version23000Date20210721100600.php +++ b/core/Migrations/Version23000Date20210721100600.php @@ -18,6 +18,7 @@ class Version23000Date20210721100600 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version23000Date20210906132259.php b/core/Migrations/Version23000Date20210906132259.php index 422b96fa397..a80331591d1 100644 --- a/core/Migrations/Version23000Date20210906132259.php +++ b/core/Migrations/Version23000Date20210906132259.php @@ -20,6 +20,7 @@ class Version23000Date20210906132259 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** * Table was missing a primary key diff --git a/core/Migrations/Version23000Date20210930122352.php b/core/Migrations/Version23000Date20210930122352.php index 1e1df825429..9f64a5c5162 100644 --- a/core/Migrations/Version23000Date20210930122352.php +++ b/core/Migrations/Version23000Date20210930122352.php @@ -24,6 +24,7 @@ class Version23000Date20210930122352 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version23000Date20211203110726.php b/core/Migrations/Version23000Date20211203110726.php index c91645ddeb3..e98cb6818fc 100644 --- a/core/Migrations/Version23000Date20211203110726.php +++ b/core/Migrations/Version23000Date20211203110726.php @@ -23,6 +23,7 @@ class Version23000Date20211203110726 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version23000Date20211213203940.php b/core/Migrations/Version23000Date20211213203940.php index f31f13a14d7..08471f1ade0 100644 --- a/core/Migrations/Version23000Date20211213203940.php +++ b/core/Migrations/Version23000Date20211213203940.php @@ -16,6 +16,7 @@ class Version23000Date20211213203940 extends BigIntMigration { * @return array Returns an array with the following structure * ['table1' => ['column1', 'column2'], ...] */ + #[\Override] protected function getColumnsByTable() { return [ 'profile_config' => ['id'], diff --git a/core/Migrations/Version24000Date20211210141942.php b/core/Migrations/Version24000Date20211210141942.php index 50b1d89557e..becd4b14692 100644 --- a/core/Migrations/Version24000Date20211210141942.php +++ b/core/Migrations/Version24000Date20211210141942.php @@ -30,6 +30,7 @@ class Version24000Date20211210141942 extends SimpleMigrationStep { * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` * @param array $options */ + #[\Override] public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options): void { $update = $this->connection->getQueryBuilder(); diff --git a/core/Migrations/Version24000Date20211213081506.php b/core/Migrations/Version24000Date20211213081506.php index ad46d1a8890..66acd0de6b2 100644 --- a/core/Migrations/Version24000Date20211213081506.php +++ b/core/Migrations/Version24000Date20211213081506.php @@ -20,6 +20,7 @@ class Version24000Date20211213081506 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version24000Date20211213081604.php b/core/Migrations/Version24000Date20211213081604.php index 3e557817d33..5961dd82b81 100644 --- a/core/Migrations/Version24000Date20211213081604.php +++ b/core/Migrations/Version24000Date20211213081604.php @@ -21,6 +21,7 @@ class Version24000Date20211213081604 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version24000Date20211222112246.php b/core/Migrations/Version24000Date20211222112246.php index 2bc3e1a3fca..debf0968ec8 100644 --- a/core/Migrations/Version24000Date20211222112246.php +++ b/core/Migrations/Version24000Date20211222112246.php @@ -24,6 +24,7 @@ class Version24000Date20211222112246 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version24000Date20211230140012.php b/core/Migrations/Version24000Date20211230140012.php index cda9a6d5530..a14b45f022c 100644 --- a/core/Migrations/Version24000Date20211230140012.php +++ b/core/Migrations/Version24000Date20211230140012.php @@ -21,6 +21,7 @@ class Version24000Date20211230140012 extends SimpleMigrationStep { ) { } + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); @@ -37,6 +38,7 @@ class Version24000Date20211230140012 extends SimpleMigrationStep { return null; } + #[\Override] public function postSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) { $update = $this->connection->getQueryBuilder(); diff --git a/core/Migrations/Version24000Date20220131153041.php b/core/Migrations/Version24000Date20220131153041.php index f1dc6af776d..ca1c7b14b02 100644 --- a/core/Migrations/Version24000Date20220131153041.php +++ b/core/Migrations/Version24000Date20220131153041.php @@ -21,6 +21,7 @@ class Version24000Date20220131153041 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version24000Date20220202150027.php b/core/Migrations/Version24000Date20220202150027.php index 4533d34380a..9983a55403c 100644 --- a/core/Migrations/Version24000Date20220202150027.php +++ b/core/Migrations/Version24000Date20220202150027.php @@ -23,6 +23,7 @@ class Version24000Date20220202150027 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version24000Date20220404230027.php b/core/Migrations/Version24000Date20220404230027.php index df24ec29e6c..d9111872da1 100644 --- a/core/Migrations/Version24000Date20220404230027.php +++ b/core/Migrations/Version24000Date20220404230027.php @@ -24,6 +24,7 @@ class Version24000Date20220404230027 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { // /** @var ISchemaWrapper $schema */ // $schema = $schemaClosure(); diff --git a/core/Migrations/Version24000Date20220425072957.php b/core/Migrations/Version24000Date20220425072957.php index 5737249fa22..c75ce10bdae 100644 --- a/core/Migrations/Version24000Date20220425072957.php +++ b/core/Migrations/Version24000Date20220425072957.php @@ -21,6 +21,7 @@ class Version24000Date20220425072957 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version25000Date20220515204012.php b/core/Migrations/Version25000Date20220515204012.php index 7f7c6b6cee2..f0868393f23 100644 --- a/core/Migrations/Version25000Date20220515204012.php +++ b/core/Migrations/Version25000Date20220515204012.php @@ -14,6 +14,7 @@ use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; class Version25000Date20220515204012 extends SimpleMigrationStep { + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version25000Date20220602190540.php b/core/Migrations/Version25000Date20220602190540.php index 999a0c50e60..a698d77b592 100644 --- a/core/Migrations/Version25000Date20220602190540.php +++ b/core/Migrations/Version25000Date20220602190540.php @@ -22,6 +22,7 @@ class Version25000Date20220602190540 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version25000Date20220905140840.php b/core/Migrations/Version25000Date20220905140840.php index 29d881c4777..a0e4e004061 100644 --- a/core/Migrations/Version25000Date20220905140840.php +++ b/core/Migrations/Version25000Date20220905140840.php @@ -22,6 +22,7 @@ class Version25000Date20220905140840 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version25000Date20221007010957.php b/core/Migrations/Version25000Date20221007010957.php index dbd7f68ed34..a6d92b7124b 100644 --- a/core/Migrations/Version25000Date20221007010957.php +++ b/core/Migrations/Version25000Date20221007010957.php @@ -31,6 +31,7 @@ class Version25000Date20221007010957 extends SimpleMigrationStep { * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` * @param array $options */ + #[\Override] public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options): void { $cleanUpQuery = $this->connection->getQueryBuilder(); $cleanUpQuery->delete('preferences') diff --git a/core/Migrations/Version27000Date20220613163520.php b/core/Migrations/Version27000Date20220613163520.php index 4a5601b6cd5..50cc713895f 100644 --- a/core/Migrations/Version27000Date20220613163520.php +++ b/core/Migrations/Version27000Date20220613163520.php @@ -15,10 +15,12 @@ use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; class Version27000Date20220613163520 extends SimpleMigrationStep { + #[\Override] public function name(): string { return 'Add mountpoint path to mounts table unique index'; } + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version27000Date20230309104325.php b/core/Migrations/Version27000Date20230309104325.php index a15f9228211..af43916b65d 100644 --- a/core/Migrations/Version27000Date20230309104325.php +++ b/core/Migrations/Version27000Date20230309104325.php @@ -32,6 +32,7 @@ class Version27000Date20230309104325 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { // /** @var ISchemaWrapper $schema */ // $schema = $schemaClosure(); @@ -56,6 +57,7 @@ class Version27000Date20230309104325 extends SimpleMigrationStep { * @param array $options * @return void */ + #[\Override] public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) { /** @var ISchemaWrapper $schema */ // $schema = $schemaClosure(); diff --git a/core/Migrations/Version27000Date20230309104802.php b/core/Migrations/Version27000Date20230309104802.php index d5c8577fcf4..7c84dfab0d2 100644 --- a/core/Migrations/Version27000Date20230309104802.php +++ b/core/Migrations/Version27000Date20230309104802.php @@ -25,6 +25,7 @@ class Version27000Date20230309104802 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { // /** @var ISchemaWrapper $schema */ // $schema = $schemaClosure(); diff --git a/core/Migrations/Version28000Date20230616104802.php b/core/Migrations/Version28000Date20230616104802.php index 05acf8183ba..5cf7608df13 100644 --- a/core/Migrations/Version28000Date20230616104802.php +++ b/core/Migrations/Version28000Date20230616104802.php @@ -25,6 +25,7 @@ class Version28000Date20230616104802 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version28000Date20230728104802.php b/core/Migrations/Version28000Date20230728104802.php index e9dadcfd836..05312f17fb1 100644 --- a/core/Migrations/Version28000Date20230728104802.php +++ b/core/Migrations/Version28000Date20230728104802.php @@ -25,6 +25,7 @@ class Version28000Date20230728104802 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version28000Date20230803221055.php b/core/Migrations/Version28000Date20230803221055.php index 60b9fa4ed3d..28d32506719 100644 --- a/core/Migrations/Version28000Date20230803221055.php +++ b/core/Migrations/Version28000Date20230803221055.php @@ -24,6 +24,7 @@ class Version28000Date20230803221055 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version28000Date20230906104802.php b/core/Migrations/Version28000Date20230906104802.php index 9eec3ad8da1..4eeb39a6ae8 100644 --- a/core/Migrations/Version28000Date20230906104802.php +++ b/core/Migrations/Version28000Date20230906104802.php @@ -25,6 +25,7 @@ class Version28000Date20230906104802 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version28000Date20231004103301.php b/core/Migrations/Version28000Date20231004103301.php index e1cd619f749..9e778365689 100644 --- a/core/Migrations/Version28000Date20231004103301.php +++ b/core/Migrations/Version28000Date20231004103301.php @@ -16,6 +16,7 @@ use OCP\Migration\SimpleMigrationStep; // Create new tables for the Metadata API (files_metadata and files_metadata_index). class Version28000Date20231004103301 extends SimpleMigrationStep { + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version28000Date20231103104802.php b/core/Migrations/Version28000Date20231103104802.php index 238c792991d..a5e78d8419b 100644 --- a/core/Migrations/Version28000Date20231103104802.php +++ b/core/Migrations/Version28000Date20231103104802.php @@ -25,6 +25,7 @@ class Version28000Date20231103104802 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version28000Date20231126110901.php b/core/Migrations/Version28000Date20231126110901.php index 95984df61bb..6a5f014a3fd 100644 --- a/core/Migrations/Version28000Date20231126110901.php +++ b/core/Migrations/Version28000Date20231126110901.php @@ -17,6 +17,7 @@ use OCP\Migration\SimpleMigrationStep; * Create new fields for type and lazy loading in appconfig for the new IAppConfig API. */ class Version28000Date20231126110901 extends SimpleMigrationStep { + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { return null; diff --git a/core/Migrations/Version28000Date20240828142927.php b/core/Migrations/Version28000Date20240828142927.php index 30382e778d3..baa35ab995e 100644 --- a/core/Migrations/Version28000Date20240828142927.php +++ b/core/Migrations/Version28000Date20240828142927.php @@ -29,6 +29,7 @@ class Version28000Date20240828142927 extends SimpleMigrationStep { ) { } + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); @@ -43,6 +44,7 @@ class Version28000Date20240828142927 extends SimpleMigrationStep { return $schema; } + #[\Override] public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options): void { $chunkSize = 1000; $offset = 0; diff --git a/core/Migrations/Version29000Date20231126110901.php b/core/Migrations/Version29000Date20231126110901.php index cbed14bf2f5..11afec44d25 100644 --- a/core/Migrations/Version29000Date20231126110901.php +++ b/core/Migrations/Version29000Date20231126110901.php @@ -18,6 +18,7 @@ use OCP\Migration\SimpleMigrationStep; * Create new fields for type and lazy loading in appconfig for the new IAppConfig API. */ class Version29000Date20231126110901 extends SimpleMigrationStep { + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version29000Date20240124132201.php b/core/Migrations/Version29000Date20240124132201.php index a3166435704..64a18f5398a 100644 --- a/core/Migrations/Version29000Date20240124132201.php +++ b/core/Migrations/Version29000Date20240124132201.php @@ -18,6 +18,7 @@ use OCP\Migration\SimpleMigrationStep; * Create new column for type and remove previous lazy column in appconfig (will be recreated by Version29000Date20240124132202) for the new IAppConfig API. */ class Version29000Date20240124132201 extends SimpleMigrationStep { + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version29000Date20240124132202.php b/core/Migrations/Version29000Date20240124132202.php index 3246adf21a7..65adb15e74f 100644 --- a/core/Migrations/Version29000Date20240124132202.php +++ b/core/Migrations/Version29000Date20240124132202.php @@ -18,6 +18,7 @@ use OCP\Migration\SimpleMigrationStep; * Create new column and index for lazy loading in appconfig for the new IAppConfig API. */ class Version29000Date20240124132202 extends SimpleMigrationStep { + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version30000Date20240429122720.php b/core/Migrations/Version30000Date20240429122720.php index eeefc8dd10c..8a2f4aa586b 100644 --- a/core/Migrations/Version30000Date20240429122720.php +++ b/core/Migrations/Version30000Date20240429122720.php @@ -33,6 +33,7 @@ class Version30000Date20240429122720 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version30000Date20240708160048.php b/core/Migrations/Version30000Date20240708160048.php index 83edd84e56a..c1d9b84d112 100644 --- a/core/Migrations/Version30000Date20240708160048.php +++ b/core/Migrations/Version30000Date20240708160048.php @@ -30,6 +30,7 @@ class Version30000Date20240708160048 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version30000Date20240717111406.php b/core/Migrations/Version30000Date20240717111406.php index 558ac432387..c57e9caa330 100644 --- a/core/Migrations/Version30000Date20240717111406.php +++ b/core/Migrations/Version30000Date20240717111406.php @@ -29,6 +29,7 @@ class Version30000Date20240717111406 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version30000Date20240814180800.php b/core/Migrations/Version30000Date20240814180800.php index 199af8cc0aa..d81da356965 100644 --- a/core/Migrations/Version30000Date20240814180800.php +++ b/core/Migrations/Version30000Date20240814180800.php @@ -14,6 +14,7 @@ use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; class Version30000Date20240814180800 extends SimpleMigrationStep { + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version30000Date20240815080800.php b/core/Migrations/Version30000Date20240815080800.php index 5212467ece0..18c1a143443 100644 --- a/core/Migrations/Version30000Date20240815080800.php +++ b/core/Migrations/Version30000Date20240815080800.php @@ -19,6 +19,7 @@ use OCP\Migration\SimpleMigrationStep; #[AddColumn(table: 'webauthn', name: 'user_verification', type: ColumnType::BOOLEAN)] class Version30000Date20240815080800 extends SimpleMigrationStep { + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version31000Date20240101084401.php b/core/Migrations/Version31000Date20240101084401.php index 60792dcac21..223b78b6056 100644 --- a/core/Migrations/Version31000Date20240101084401.php +++ b/core/Migrations/Version31000Date20240101084401.php @@ -40,10 +40,12 @@ use OCP\Migration\SimpleMigrationStep; description: 'to search on key and provider' )] class Version31000Date20240101084401 extends SimpleMigrationStep { + #[\Override] public function description(): string { return "creating new table 'sec_signatory' to store remote signatories"; } + #[\Override] public function name(): string { return 'create sec_signatory'; } @@ -54,6 +56,7 @@ class Version31000Date20240101084401 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version31000Date20240814184402.php b/core/Migrations/Version31000Date20240814184402.php index 14b32a704be..4302a785029 100644 --- a/core/Migrations/Version31000Date20240814184402.php +++ b/core/Migrations/Version31000Date20240814184402.php @@ -30,6 +30,7 @@ use OCP\Migration\SimpleMigrationStep; #[AddIndex(table: 'preferences', type: IndexType::INDEX, description: 'new index including user+lazy')] #[AddIndex(table: 'preferences', type: IndexType::INDEX, description: 'new index including app/key and indexed')] class Version31000Date20240814184402 extends SimpleMigrationStep { + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version31000Date20250213102442.php b/core/Migrations/Version31000Date20250213102442.php index d267e867129..f35ce498ddf 100644 --- a/core/Migrations/Version31000Date20250213102442.php +++ b/core/Migrations/Version31000Date20250213102442.php @@ -21,6 +21,7 @@ use OCP\Migration\SimpleMigrationStep; */ #[DropIndex(table: 'filecache', type: IndexType::INDEX, description: 'remove index fs_id_storage_size (concurrent with PRIMARY KEY)')] class Version31000Date20250213102442 extends SimpleMigrationStep { + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version32000Date20250806110519.php b/core/Migrations/Version32000Date20250806110519.php index c498a1cc820..ca3b993c507 100644 --- a/core/Migrations/Version32000Date20250806110519.php +++ b/core/Migrations/Version32000Date20250806110519.php @@ -28,6 +28,7 @@ class Version32000Date20250806110519 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version33000Date20251013110519.php b/core/Migrations/Version33000Date20251013110519.php index c43979170ea..78ab693e2b9 100644 --- a/core/Migrations/Version33000Date20251013110519.php +++ b/core/Migrations/Version33000Date20251013110519.php @@ -28,6 +28,7 @@ class Version33000Date20251013110519 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version33000Date20251106131209.php b/core/Migrations/Version33000Date20251106131209.php index 9fab7d6d3c0..5d26abfedd2 100644 --- a/core/Migrations/Version33000Date20251106131209.php +++ b/core/Migrations/Version33000Date20251106131209.php @@ -22,6 +22,7 @@ class Version33000Date20251106131209 extends SimpleMigrationStep { ) { } + #[\Override] public function preSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) { $qb = $this->connection->getQueryBuilder(); $qb->update('share') diff --git a/core/Migrations/Version33000Date20251126152410.php b/core/Migrations/Version33000Date20251126152410.php index 96d590409db..2962bffc8cc 100644 --- a/core/Migrations/Version33000Date20251126152410.php +++ b/core/Migrations/Version33000Date20251126152410.php @@ -25,6 +25,7 @@ class Version33000Date20251126152410 extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version33000Date20260126120000.php b/core/Migrations/Version33000Date20260126120000.php index 3b3c4c7cd95..ef04b175a74 100644 --- a/core/Migrations/Version33000Date20260126120000.php +++ b/core/Migrations/Version33000Date20260126120000.php @@ -12,6 +12,7 @@ use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; class Version33000Date20260126120000 extends SimpleMigrationStep { + #[\Override] public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Notification/CoreNotifier.php b/core/Notification/CoreNotifier.php index 83a86513e03..c4ee339c766 100644 --- a/core/Notification/CoreNotifier.php +++ b/core/Notification/CoreNotifier.php @@ -30,6 +30,7 @@ class CoreNotifier implements INotifier { * @return string * @since 17.0.0 */ + #[\Override] public function getID(): string { return 'core'; } @@ -40,10 +41,12 @@ class CoreNotifier implements INotifier { * @return string * @since 17.0.0 */ + #[\Override] public function getName(): string { return $this->factory->get('core')->t('Nextcloud Server'); } + #[\Override] public function prepare(INotification $notification, string $languageCode): INotification { if ($notification->getApp() !== 'core') { throw new UnknownNotificationException();