diff options
author | Vitor Mattos <vitor@php.rio> | 2023-03-02 23:31:47 -0300 |
---|---|---|
committer | Vitor Mattos <vitor@php.rio> | 2023-03-02 23:31:47 -0300 |
commit | ff6a7eb4e50eb76d2f88291119a0100756c6d456 (patch) | |
tree | 966637cdb3ed5d4d58274d0b95fcf097cabbf19e /lib/Command | |
parent | 011c87940d03fc03030aa167240c1abeed3c3fe4 (diff) |
Removed unused option
Signed-off-by: Vitor Mattos <vitor@php.rio>
Diffstat (limited to 'lib/Command')
-rw-r--r-- | lib/Command/Developer/UpdateDocs.php | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/lib/Command/Developer/UpdateDocs.php b/lib/Command/Developer/UpdateDocs.php index 9c9d7c225..b63fd5aba 100644 --- a/lib/Command/Developer/UpdateDocs.php +++ b/lib/Command/Developer/UpdateDocs.php @@ -35,7 +35,6 @@ use Symfony\Component\Console\Output\OutputInterface; class UpdateDocs extends Base { private IConfig $config; private IAppManager $appManager; - private array $sections = []; public function __construct(IConfig $config) { $this->config = $config; @@ -51,11 +50,6 @@ class UpdateDocs extends Base { $this ->setName('talk:developer:update-docs') ->setDescription('Update documentation of commands') - ->addArgument( - 'name', - InputArgument::OPTIONAL, - "The name of command to update. When have this argument, don't will upate the documentation, only will print the markdown output." - ) ; } @@ -63,27 +57,15 @@ class UpdateDocs extends Base { $this->appManager = \OC::$server->get(IAppManager::class); $info = $this->appManager->getAppInfo('spreed'); - $commandName = $input->getArgument('name'); - $documentation = ''; + $documentation = "# Talk occ commands\n\n"; foreach ($info['commands'] as $namespace) { $command = $this->getCommand($namespace); - if ($commandName && $commandName !== $command->getName()) { - continue; - } - $this->sections['documentation'][] = $this->getDocumentation($command); + $documentation .= $this->getDocumentation($command) . "\n"; } - if ($commandName) { - $output->writeln(implode("\n", $this->sections['documentation'])); - } else { - $documentation = - "# Talk occ commands\n\n" . - implode("\n", $this->sections['documentation']); - - $handle = fopen(__DIR__ . '/../../../docs/occ.md', 'w'); - fwrite($handle, $documentation); - fclose($handle); - } + $handle = fopen(__DIR__ . '/../../../docs/occ.md', 'w'); + fwrite($handle, $documentation); + fclose($handle); return 0; } |