]> git.mxchange.org Git - friendica.git/blobdiff - src/Console/Addon.php
New table "post-counts" to precalculate the counts
[friendica.git] / src / Console / Addon.php
index c1d434bbeb730445ed135bd4cb537f26acc8b0fa..aa47d41a2411ba30c8e245a5886445e2b80c82a5 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2021, Friendica
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -55,9 +55,9 @@ class Addon extends \Asika\SimpleConsole\Console
                $help = <<<HELP
 console user - Modify addon settings per console commands.
 Usage
-       bin/console addon list all [-s|--start=0] [-c|--count=50] [-h|--help|-?] [-v]
-       bin/console addon list enabled [-s|--start=0] [-c|--count=50] [-h|--help|-?] [-v]
-       bin/console addon list disabled [-s|--start=0] [-c|--count=50] [-h|--help|-?] [-v]
+       bin/console addon list all [-h|--help|-?] [-v]
+       bin/console addon list enabled [-h|--help|-?] [-v]
+       bin/console addon list disabled [-h|--help|-?] [-v]
        bin/console addon enable <addonname> [-h|--help|-?] [-v]
        bin/console addon disable <addonname> [-h|--help|-?] [-v]
 
@@ -82,7 +82,7 @@ HELP;
                AddonCore::loadAddons();
        }
 
-       protected function doExecute()
+       protected function doExecute(): int
        {
                if ($this->getOption('v')) {
                        $this->out('Class: ' . __CLASS__);
@@ -116,15 +116,12 @@ HELP;
        /**
         * Lists plugins
         *
-        * @return int Return code of this command
-        *
+        * @return int|bool Return code of this command, false on error (?)
         * @throws \Exception
         */
        private function list()
        {
                $subCmd = $this->getArgument(1);
-               $start = $this->getOption(['s', 'start'], 0);
-               $count = $this->getOption(['c', 'count'], Pager::ITEMS_PER_PAGE);
 
                $table = new Console_Table();
                switch ($subCmd) {
@@ -167,10 +164,9 @@ HELP;
         * Enables an addon
         *
         * @return int Return code of this command
-        *
         * @throws \Exception
         */
-       private function enable()
+       private function enable(): int
        {
                $addonname = $this->getArgument(1);
 
@@ -192,10 +188,9 @@ HELP;
         * Disables an addon
         *
         * @return int Return code of this command
-        *
         * @throws \Exception
         */
-       private function disable()
+       private function disable(): int
        {
                $addonname = $this->getArgument(1);