setName('organization-folders:remove-resource') ->setDescription('Remove a resource') ->addArgument('id', InputArgument::REQUIRED, 'Id of the resource'); } protected function execute(InputInterface $input, OutputInterface $output): int { $id = (int)$input->getArgument('id'); try { $this->resourceService->deleteById($id); $output->writeln("done"); return 0; } catch (Exception $e) { $output->writeln("Exception \"{$e->getMessage()}\" at {$e->getFile()} line {$e->getLine()}"); return 1; } } }