summaryrefslogtreecommitdiffstats
path: root/core/Command/Maintenance
diff options
context:
space:
mode:
Diffstat (limited to 'core/Command/Maintenance')
-rw-r--r--core/Command/Maintenance/DataFingerprint.php3
-rw-r--r--core/Command/Maintenance/Install.php2
-rw-r--r--core/Command/Maintenance/Mimetype/UpdateDB.php3
-rw-r--r--core/Command/Maintenance/Mimetype/UpdateJS.php3
-rw-r--r--core/Command/Maintenance/Mode.php3
-rw-r--r--core/Command/Maintenance/Repair.php3
-rw-r--r--core/Command/Maintenance/UpdateHtaccess.php2
-rw-r--r--core/Command/Maintenance/UpdateTheme.php3
8 files changed, 14 insertions, 8 deletions
diff --git a/core/Command/Maintenance/DataFingerprint.php b/core/Command/Maintenance/DataFingerprint.php
index 18c54819a1d..4b513ffd40a 100644
--- a/core/Command/Maintenance/DataFingerprint.php
+++ b/core/Command/Maintenance/DataFingerprint.php
@@ -48,7 +48,8 @@ class DataFingerprint extends Command {
->setDescription('update the systems data-fingerprint after a backup is restored');
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$this->config->setSystemValue('data-fingerprint', md5($this->timeFactory->getTime()));
+ return 0;
}
}
diff --git a/core/Command/Maintenance/Install.php b/core/Command/Maintenance/Install.php
index f726699d037..9cca77bb9c0 100644
--- a/core/Command/Maintenance/Install.php
+++ b/core/Command/Maintenance/Install.php
@@ -73,7 +73,7 @@ class Install extends Command {
->addOption('data-dir', null, InputOption::VALUE_REQUIRED, 'Path to data directory', \OC::$SERVERROOT."/data");
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
// validate the environment
$server = \OC::$server;
diff --git a/core/Command/Maintenance/Mimetype/UpdateDB.php b/core/Command/Maintenance/Mimetype/UpdateDB.php
index 80ea06433b2..ddca668dd1e 100644
--- a/core/Command/Maintenance/Mimetype/UpdateDB.php
+++ b/core/Command/Maintenance/Mimetype/UpdateDB.php
@@ -63,7 +63,7 @@ class UpdateDB extends Command {
;
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$mappings = $this->mimetypeDetector->getAllMappings();
$totalFilecacheUpdates = 0;
@@ -95,5 +95,6 @@ class UpdateDB extends Command {
$output->writeln('Added '.$totalNewMimetypes.' new mimetypes');
$output->writeln('Updated '.$totalFilecacheUpdates.' filecache rows');
+ return 0;
}
}
diff --git a/core/Command/Maintenance/Mimetype/UpdateJS.php b/core/Command/Maintenance/Mimetype/UpdateJS.php
index fd5f17ef7bb..bc1ab7de790 100644
--- a/core/Command/Maintenance/Mimetype/UpdateJS.php
+++ b/core/Command/Maintenance/Mimetype/UpdateJS.php
@@ -48,7 +48,7 @@ class UpdateJS extends Command {
->setDescription('Update mimetypelist.js');
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
// Fetch all the aliases
$aliases = $this->mimetypeDetector->getAllAliases();
@@ -57,5 +57,6 @@ class UpdateJS extends Command {
file_put_contents(\OC::$SERVERROOT.'/core/js/mimetypelist.js', $generatedMimetypeFile->generateFile($aliases));
$output->writeln('<info>mimetypelist.js is updated');
+ return 0;
}
}
diff --git a/core/Command/Maintenance/Mode.php b/core/Command/Maintenance/Mode.php
index e78d7827fde..4a2f64981ec 100644
--- a/core/Command/Maintenance/Mode.php
+++ b/core/Command/Maintenance/Mode.php
@@ -61,7 +61,7 @@ class Mode extends Command {
);
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$maintenanceMode = $this->config->getSystemValueBool('maintenance');
if ($input->getOption('on')) {
if ($maintenanceMode === false) {
@@ -84,5 +84,6 @@ class Mode extends Command {
$output->writeln('Maintenance mode is currently disabled');
}
}
+ return 0;
}
}
diff --git a/core/Command/Maintenance/Repair.php b/core/Command/Maintenance/Repair.php
index df5ce068b4e..b61bd6e3486 100644
--- a/core/Command/Maintenance/Repair.php
+++ b/core/Command/Maintenance/Repair.php
@@ -79,7 +79,7 @@ class Repair extends Command {
'Use this option when you want to include resource and load expensive tasks');
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$repairSteps = $this->repair::getRepairSteps();
if ($input->getOption('include-expensive')) {
@@ -126,6 +126,7 @@ class Repair extends Command {
$this->repair->run();
$this->config->setSystemValue('maintenance', $maintenanceMode);
+ return 0;
}
public function handleRepairFeedBack($event) {
diff --git a/core/Command/Maintenance/UpdateHtaccess.php b/core/Command/Maintenance/UpdateHtaccess.php
index 7f143536bfa..b06127d712f 100644
--- a/core/Command/Maintenance/UpdateHtaccess.php
+++ b/core/Command/Maintenance/UpdateHtaccess.php
@@ -36,7 +36,7 @@ class UpdateHtaccess extends Command {
->setDescription('Updates the .htaccess file');
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
if (\OC\Setup::updateHtaccess()) {
$output->writeln('.htaccess has been updated');
return 0;
diff --git a/core/Command/Maintenance/UpdateTheme.php b/core/Command/Maintenance/UpdateTheme.php
index ce13215e05e..b055f1a0c7f 100644
--- a/core/Command/Maintenance/UpdateTheme.php
+++ b/core/Command/Maintenance/UpdateTheme.php
@@ -54,7 +54,7 @@ class UpdateTheme extends UpdateJS {
->setDescription('Apply custom theme changes');
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
// run mimetypelist.js update since themes might change mimetype icons
parent::execute($input, $output);
@@ -62,5 +62,6 @@ class UpdateTheme extends UpdateJS {
$c = $this->cacheFactory->createDistributed('imagePath');
$c->clear('');
$output->writeln('<info>Image cache cleared</info>');
+ return 0;
}
}