@param InputInterface  $input
@param OutputInterface $output

@return void
18427
protected function execute(InputInterface $input, OutputInterface $output)
  {
    $searchDir = ModulusCLI::$appdir . 'storage' . DIRECTORY_SEPARATOR . 'logs' . DIRECTORY_SEPARATOR;

    $logs = glob($searchDir . '*.log');

    if (count($logs) < 1) {
      return $output->writeln('Nothing to remove');
    }

    foreach($logs as $log) {
      try {
        Filesystem::delete($log);
      } catch (\Exception $e) {
        return $output->writeln($e->getMessage());
      }
    }

    return $output->writeln('<info>Cleared logs</info>');
  }
391571
protected function execute(InputInterface $input, OutputInterface $output)
    {
        parent::execute($input, $output);

        $info = $this
            ->getSession()
            ->getInspector()
            ->getSchemaRelations($this->fetchSchemaOid()
        );
        $this->formatOutput($output, $info);
    }
632971
private function setInputAndOutput(InputInterface $input, OutputInterface $output)
    {
        if (is_null($this->assistant)) {
            $this->assistant = new CommandAssistant();
            $this->assistant->setQuestionHelper($this->getQuestionHelper());
            $this->assistant->setKernel($this->getApplication()->getKernel());
        }
        $this->assistant->setOutput($output);
        $this->assistant->setInput($input);
    }
284393
public function execute(InputInterface $input, OutputInterface $output)
    {
        /** @var QuestionHelper $helper */
        $helper = $this->getHelper('question');

        $copyrightYear = date('Y');
        $packageName = 'Unknown';
        $packageOwner = 'Contributors';
        $packageOwnerEmail = '';

        if ($input->hasOption('name')) {
            $packageName = $input->getOption('name');
        } else {
            $packageName = $helper->ask($input, $output, new Question(
                'What is the package name? '
            ));
        }

        if ($input->hasOption('owner')) {
            $packageOwner = $input->getOption('owner');
        } else {
            $packageOwner = $helper->ask($input, $output, new Question(
                'Who is the package owner? '
            ));
        }

        if ($input->hasOption('email')) {
            $packageOwnerEmail = $input->getOption('email');
        } else {
            $packageOwnerEmail = $helper->ask($input, $output, new Question(
                'What is the contact email of the owner? (Optional) ',
                ''
            ));
        }

        $template = file_get_contents(
            __DIR__ . '/../../../../resources/project/formatter.yml'
        );

        $template = str_replace('<year>', $copyrightYear, $template);
        $template = str_replace('<owner>', $packageOwner, $template);
        $template = str_replace('<package>', $packageName, $template);
        $template = str_replace('<email>', $packageOwnerEmail, $template);

        $filesystem = new Filesystem();

        if ($filesystem->exists('.formatter.yml')) {
            if ($helper->ask($input, $output, new ConfirmationQuestion(
                '.formatter.yml already exists. Overwrite? (y/N) ',
                false
            ))) {
                $filesystem->dumpFile('.formatter.yml', $template);
                $output->writeln('Wrote .formatter.yml');
            }
        } else {
            $filesystem->dumpFile('.formatter.yml', $template);
            $output->writeln('Wrote .formatter.yml');
        }

        if (!$filesystem->exists('.editorconfig')) {
            $filesystem->dumpFile(
                '.editorconfig',
                file_get_contents(
                    __DIR__ . '/../../../../resources/project/editorconfig'
                )
            );
            $output->writeln('Wrote .editorconfig');
        }

        return 0;
    }
105744
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->Selftest($input, $output);
        $this->Ping($input, $output);
        $this->Connect($input, $output);
    }
32411
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->init($input, $output);

        $this->force_prompt();
                
        $this->publish_packages($this->get_packages());
        
        // Feedback how many files were copied.
        if (\count($this->copied)) {
            $this->output->writeln(
                \sprintf(
                    "\n<info>Published %d %s successfully:\n%s</info>",
                    \count($this->copied),
                    _n('file', 'files', \count($this->copied)),
                    \implode($this->copied, "\n")
                )
            );
            exit;
        }
        
        $this->output->writeln("\n<info>Nothing needed to be published</info>");
    }
1062771
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $cmd        = $input->getArgument('cmd');
        $process    = $input->getArgument('server');

        $server = new Server(
            Config::get('name'),
            $process
        );

        $server->$cmd();
    }
940065
public function run(InputInterface $input, OutputInterface $output)
    {
        $this->setInput($input);
        $this->setOutput($output);

        return parent::run($input, $output);
    }
489985
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $finder     = new Finder();
        $filesystem = new Filesystem();
        $filesystem->remove($finder->directories()->in($this->getLanguageBasePath()));
    }
1090741
protected function execute(InputInterface $input, OutputInterface $output)
    {
        parent::execute($input, $output);
        $info = $this
            ->getSession()
            ->getInspector()
            ->getSchemas()
            ;
        $this->formatOutput($output, $info);
    }
455101
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->env = $input->getOption('env');
        $this->registry = $this->getContainer()->get('doctrine');
        $this->output = $output;

        $this->runCrons();
    }
94359
protected function execute(InputInterface $input, OutputInterface $output)
    {
        /** @var CronService $cronService */
        $cronService = $this->getContainer()->get(CronService::class);
        /** @var CronInterface[] $cronsDue */
        $cronsDue = [];

        /** @var CronInterface[] $crons */
        $crons = $cronService->getCrons();
        foreach ($crons as $cron) {
            if ($cron->isDue()) {
                $cronsDue[] = $cron;
            }
        }

        foreach ($cronsDue as $cron) {
            if (!$cronService->isQueued($cron->getAlias())) {
                $cronService->addQueued($cron->getAlias());
            }
        }

        $cronService->runQueued($input, $output);
    }
24071
protected function execute(InputInterface $input, OutputInterface $output) : void
    {
        $io     = $this->getIO($input, $output);
        $config = $this->getConfig($input->getOption('configuration'));

        $configurator = new Creator($io, $config);
        $configurator->force($input->getOption('force'))
                     ->extend($input->getOption('extend'))
                     ->advanced($input->getOption('advanced'))
                     ->run();
    }
626709
protected function execute(InputInterface $input, OutputInterface $output) : void
    {

        $io     = $this->getIO($input, $output);
        $config = $this->getConfig($input->getOption('configuration'), true);
        $repo   = new Repository(dirname($input->getOption('git-directory')));

        $installer = new Installer($io, $config, $repo);
        $installer->setForce($input->getOption('force'))
                  ->setHook((string) $input->getArgument('hook'));

        $installer->run();
    }
761302
public function execute(InputInterface $input, OutputInterface $output)
    {
        $runner = $this->commandDefinition->getRunner();
        $runner();
    }
294624
public function run(InputInterface $input, OutputInterface $output): int
    {
        return $this->console->run($input, $output);
    }
729692
protected function execute(InputInterface $input, OutputInterface $output): void
    {
        $output->writeln([
            '----------------',
            'Service DTO generator',
            '----------------',
            ''
        ]);

        $helper      = $this->getHelper('question');
        $questionSet = $this->createQuestionSet();

        $serviceDTOName = $helper->ask($input, $output, $questionSet['serviceDTOName']);
        $serviceDTOType = $helper->ask($input, $output, $questionSet['serviceDTOType']);
        $moduleName     = $helper->ask($input, $output, $questionSet['moduleName']);

        do {
            $propertyNames[] = $helper->ask($input, $output, $questionSet['propertyName']);
            $propertyTypes[] = $helper->ask($input, $output, $questionSet['propertyType']);
        } while ($helper->ask($input, $output, $questionSet['continue']));

        $properties = array_combine($propertyNames, $propertyTypes);

        $configuration    = $this->appConfiguration->getConfiguration();
        $serviceNamespace = $configuration['framework']['root_namespace'] . 'Application\Service';

        $serviceDTOData = [
            'namespace'  => $serviceNamespace,
            'class'      => $serviceDTOName,
            'type'       => $serviceDTOType,
            'module'     => $moduleName,
            'properties' => $properties
        ];

        (new ServiceDTOGenerator($serviceDTOData))->generate();

        $output->writeln('Service ' . strtolower($serviceDTOType) . ' generated successfully!');
    }