diff --git a/lib/Command/FixEncryptedVersion.php b/lib/Command/FixEncryptedVersion.php
index a26d9b2b..d2ab95d4 100644
--- a/lib/Command/FixEncryptedVersion.php
+++ b/lib/Command/FixEncryptedVersion.php
@@ -77,7 +77,7 @@ protected function configure() {
* @param OutputInterface $output
* @return int
*/
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$user = $input->getArgument('user');
$pathToWalk = "/$user/files";
diff --git a/lib/Command/HSMDaemon.php b/lib/Command/HSMDaemon.php
index 54f6623d..6a4ec1b4 100644
--- a/lib/Command/HSMDaemon.php
+++ b/lib/Command/HSMDaemon.php
@@ -63,10 +63,10 @@ protected function configure() {
/**
* @param InputInterface $input
* @param OutputInterface $output
- * @return int|void
+ * @return int
* @throws \Exception
*/
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
/** @var string|null $hsmUrl */
$hsmUrl = $this->config->getAppValue('encryption', 'hsm.url');
if (\is_string($hsmUrl) && $hsmUrl !== '') {
@@ -79,6 +79,8 @@ protected function execute(InputInterface $input, OutputInterface $output) {
}
} else {
$output->writeln("hsm.url not set");
+ return 1;
}
+ return 0;
}
}
diff --git a/lib/Command/HSMDaemonDecrypt.php b/lib/Command/HSMDaemonDecrypt.php
index 7523af75..ce806054 100644
--- a/lib/Command/HSMDaemonDecrypt.php
+++ b/lib/Command/HSMDaemonDecrypt.php
@@ -105,10 +105,10 @@ protected function configure() {
/**
* @param InputInterface $input
* @param OutputInterface $output
- * @return int|void
+ * @return int
* @throws \Exception
*/
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$hsmUrl = $this->config->getAppValue('encryption', 'hsm.url');
if (!$hsmUrl || !\is_string($hsmUrl)) {
$output->writeln("hsm.url not set");
@@ -142,6 +142,7 @@ protected function execute(InputInterface $input, OutputInterface $output) {
$decryptedStr = $response->getBody();
$output->writeln("decrypted string (base64 encoded): '".\base64_encode($decryptedStr)."'");
+ return 0;
}
/**
diff --git a/lib/Command/MigrateKeys.php b/lib/Command/MigrateKeys.php
index 07551127..dac33517 100644
--- a/lib/Command/MigrateKeys.php
+++ b/lib/Command/MigrateKeys.php
@@ -83,9 +83,9 @@ protected function configure() {
/**
* @param InputInterface $input
* @param OutputInterface $output
- * @return int|void
+ * @return int
*/
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
// perform system reorganization
$migration = new Migration($this->config, $this->view, $this->connection, $this->logger);
@@ -127,5 +127,6 @@ protected function execute(InputInterface $input, OutputInterface $output) {
}
$migration->finalCleanUp();
+ return 0;
}
}
diff --git a/lib/Command/RecreateMasterKey.php b/lib/Command/RecreateMasterKey.php
index 275de08e..dff71f05 100644
--- a/lib/Command/RecreateMasterKey.php
+++ b/lib/Command/RecreateMasterKey.php
@@ -105,7 +105,7 @@ protected function configure() {
* @return int
* @throws \Exception
*/
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$yes = $input->getOption('yes');
if ($this->util->isMasterKeyEnabled()) {
$question = new ConfirmationQuestion(
@@ -164,7 +164,7 @@ protected function execute(InputInterface $input, OutputInterface $output) {
* We are reusing the encryptAll code but not the decryptAll. The reason being
* decryptAll finishes by encrypting. Which is not what we want. This will make
* things out of scope for this command. We want first the entire oC FS to be
- * decrypt. Then re-encrypt the entire oC FS with the new master key generated.
+ * decrypted. Then re-encrypt the entire oC FS with the new master key generated.
*/
$encryptAll->encryptAll($input, $output);