From 3791635143f7db06c5c05d9dbc867b8f486189cf Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Wed, 29 Jan 2025 09:55:42 -0500 Subject: [PATCH 1/2] Fix coding style in Console\Storage --- src/Console/Storage.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Console/Storage.php b/src/Console/Storage.php index d556e74322..572f10cc88 100644 --- a/src/Console/Storage.php +++ b/src/Console/Storage.php @@ -42,17 +42,17 @@ console storage - manage storage backend and stored data Synopsis bin/console storage [-h|--help|-?] [-v] Show this help - + bin/console storage list List available storage backends - + bin/console storage clear Remove the contact avatar cache data - + bin/console storage set Set current storage backend name storage backend to use. see "list". - + bin/console storage move [table] [-n 5000] Move stored data to current storage backend. table one of "photo" or "attach". default to both @@ -96,7 +96,7 @@ HELP; protected function doList() { - $rowfmt = ' %-3s | %-20s'; + $rowfmt = ' %-3s | %-20s'; $current = $this->storageManager->getBackend(); $this->out(sprintf($rowfmt, 'Sel', 'Name')); $this->out('-----------------------'); @@ -104,7 +104,7 @@ HELP; foreach ($this->storageManager->listBackends() as $name) { $issel = ' '; if ($current && $current::getName() == $name) { - $issel = '*'; + $issel = '*'; $isregisterd = true; }; $this->out(sprintf($rowfmt, $issel, $name)); @@ -176,7 +176,7 @@ HELP; } $current = $this->storageManager->getBackend(); - $total = 0; + $total = 0; if (is_null($current)) { throw new StorageException(sprintf("Cannot move to legacy storage. Please select a storage backend.")); From 13214843d89a048fb16cf430f5f2f3fca6ebf57f Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Wed, 29 Jan 2025 09:56:06 -0500 Subject: [PATCH 2/2] Add expected final return in Console\Storage->doMove - Address https://github.com/friendica/friendica/issues/14646#issuecomment-2621372228 --- src/Console/Storage.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Console/Storage.php b/src/Console/Storage.php index 572f10cc88..58d20d06b2 100644 --- a/src/Console/Storage.php +++ b/src/Console/Storage.php @@ -192,5 +192,7 @@ HELP; } while ($moved); $this->out(sprintf(date('[Y-m-d H:i:s] ') . 'Moved %d files total', $total)); + + return 0; } }