Check whether composer.json should be cleaned of author information

@param  InputInterface  $input
@param  OutputInterface $output
@return boolean
548596
protected function shouldRemoveComposerAuthorInformation( InputInterface $input, OutputInterface $output ) {
		$helper = $this->getHelper( 'question' );

		$question = new ConfirmationQuestion(
			'Would you like to remove author information from composer.json? <info>[y/N]</info> ',
			false
		);

		$install = $helper->ask( $input, $output, $question );
		$output->writeln( '' );

		return $install;
	}
1367468
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->output = $output;
        $aliasName = $input->getArgument('aliasName');
        $aliasClass = $input->getArgument('aliasClass');
        $this->alias($aliasName, $aliasClass);
    }
245482
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $path = $input->getArgument('path');
        $version = $input->getArgument('version');
        $package_name = $input->getArgument('name');
        if (!file_exists($path) && !is_file($input->getArgument('path'))) {
            self::error($output, "The specified path is missing or a directory");
        } else {
            if (json_decode(file_get_contents($path)) == null) {
                self::error($output, "The specified file is not a valid JSON file");
            } else {
                $packager = new Magazine($path, $version, $output, $package_name);
                $packager->package();
            }
        }
    }
324753
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->startCommand($output);
        $pluginHash = $input->getArgument('hash');
        $plugin = $this
            ->pluginRepository
            ->findOneBy([
                'hash' => $pluginHash,
            ]);

        if (!($plugin instanceof Plugin)) {
            $this->printMessageFail(
                $output,
                'Plugin',
                'Plugin with hash "' . $pluginHash . '" not found'
            );

            return null;
        }

        $plugin->disable();
        $this
            ->pluginObjectManager
            ->flush($plugin);

        $this->printMessage(
            $output,
            'Plugin',
            'Plugin with hash "' . $pluginHash . '" disabled'
        );

        $this->finishCommand($output);
    }
863939
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $persistence = $this->getPersistence();
        $output->writeln(sprintf(
            'Pulling translations in %s',
            $persistence->getDirectoryName()
        ));

        $gitOutput = $persistence->pullTranslations();
        $output->writeln($gitOutput);

        $output->writeln('Done.');
    }
1171135
protected function execute(InputInterface $input, OutputInterface $output)
  {
    $current  = ModulusCLI::$appdir . 'resources' . DIRECTORY_SEPARATOR . 'js';
    $package  = ModulusCLI::$appdir . 'package.json';
    $lock     = ModulusCLI::$appdir . 'package-lock.json';
    $backup   = ModulusCLI::$appdir . 'storage' . DIRECTORY_SEPARATOR . 'framework' . DIRECTORY_SEPARATOR . 'frontend' . DIRECTORY_SEPARATOR . $input->getArgument('backup');

    if (!is_dir($backup)) {
      return $output->writeln('This backup does not exist.');
    }

    if (!file_exists($backup . DIRECTORY_SEPARATOR . 'package.json') || !is_dir($backup . DIRECTORY_SEPARATOR . 'js')) {
      return $output->writeln('This backup is not complete.');
    }

    $helper = $this->getHelper('question');
    $question = new ChoiceQuestion(
      'Are you sure, you want to restore this backup?',
      array('yes' => 'y', 'no' => 'n')
    );

    $confirmed = $helper->ask($input, $output, $question) == 'yes' ? true : false;

    if ($confirmed) {
      if (is_dir($current)) {
        Filesystem::delete($current);
      }

      if (file_exists($package)) {
        Filesystem::delete($package);
      }

      if (file_exists($lock)) {
        Filesystem::delete($lock);
      }

      Filesystem::copy($backup . DIRECTORY_SEPARATOR . 'js', $current);
      Filesystem::copy($backup . DIRECTORY_SEPARATOR . 'package.json', $package);
      Filesystem::copy($backup . DIRECTORY_SEPARATOR . 'package-lock.json', $lock);

      return $output->writeln("<info>Successfully restored \"{$input->getArgument('backup')}\"</info>");
    }

    $output->writeln("Could not restore \"{$input->getArgument('backup')}\".");
  }
642598
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->modx = $this->console->loadMODX();
        $this->modx->cacheManager->refresh();
        $output->writeln('### Cache has been refreshed(cleared) ###');
    }
810489
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $io = new SymfonyStyle($input, $output);
        $context = Context::createDefaultContext();
        $plugins = $this->prepareExecution(self::LIFECYCLE_METHOD, $io, $input, $context);

        $keepUserData = (bool) $input->getOption('keep-user-data');

        $uninstalledPluginCount = 0;
        /** @var PluginEntity $plugin */
        foreach ($plugins as $plugin) {
            if ($plugin->getInstalledAt() === null) {
                $io->note(sprintf('Plugin "%s" is not installed. Skipping.', $plugin->getName()));

                continue;
            }

            $this->pluginLifecycleService->uninstallPlugin($plugin, $context, $keepUserData);
            ++$uninstalledPluginCount;

            $io->text(sprintf('Plugin "%s" has been uninstalled successfully.', $plugin->getName()));
        }

        if ($uninstalledPluginCount !== 0) {
            $io->success(sprintf('Uninstalled %d plugins.', $uninstalledPluginCount));
        }
    }
665111
protected function verifyArguments(InputInterface $input, OutputInterface $output)
    {
        $type       = $input->getArgument('type');
        $validTypes = $this->getValidTypes();
        if ($type === null) {
            // ask a question and default $type='all'
            $helper   = $this->getHelper('question');
            $question = new ConfirmationQuestion('Do you want to clear all cache? [N] ', false);

            if (!$helper->ask($input, $output, $question)) {
                return false;
            }

            $type = 'all';
        }

        if (!in_array($type, $validTypes)) {
            $output->writeln(
                sprintf(
                    '<error>Type "%s" does not exist. Valid type are: %s.</error>',
                    $type,
                    implode(', ', $validTypes)
                )
            );

            return false;
        }

        if ($type === 'provider' && !$input->hasArgument('service')) {
            $output->writeln(
                '<error>When using type "provider" you must specify a service id for that provider.</error>'
            );
            $output->writeln('<error>Usage: php app/console cache:flush provider cache.provider.acme</error>');

            return false;
        }

        return $type;
    }
584800
protected function execute(InputInterface $input, OutputInterface $output)
  {
    $results = Cache::flush();

    if ($results) return $output->writeln('<info>Cleared cache!</info>');

    return $output->writeln('Nothing to clear');
  }
342961
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->cacheService->system()->clear();
        $this->cacheService->user()->clear();
        $output->writeln('Done!');
        return null;
    }
906265
protected function updateProject(OutputInterface $output)
    {
        /** @var UpdateCommand $command */
        $command = $this->getApplication()->find('update');
        $arguments = [ 'command' => 'update' ];
        $requireInput = new ArrayInput($arguments);
        $returnCode = $command->run($requireInput, $output);

        // Flush modified composer object
        $this->resetComposer();
        return $returnCode;
    }
152039
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->purgeMissingFamilies($output);
        $this->purgeMissingAttributes($output);
    }
618691
private function cleanTables(InputInterface $input)
    {
        $aclOnly = true;
        if ($input->getOption('clean')) {
            $this->writeln('<info>Deleting current users and groups.</info>', OutputInterface::VERBOSITY_VERBOSE);

            if (OutputInterface::VERBOSITY_QUIET < $this->output->getVerbosity()) {
                $helper = $this->getHelper('question');
                $question = new ConfirmationQuestion('This will delete all existing users and groups, continue?', false, '/^(y)/i');

                if (!$helper->ask($input, $this->output, $question)) {
                    throw new \InvalidArgumentException('Aborted');
                }
            }

            $aclOnly = false;
        }

        $this->em->getConnection()->executeUpdate('SET FOREIGN_KEY_CHECKS=0');
        foreach ($this->tables as $table) {
            if ($aclOnly && 'acl' !== substr($table, 0, 3)) {
                continue;
            }

            $this->em->getConnection()->executeQuery(sprintf('TRUNCATE `%s`', $table));
            $this->writeln(sprintf(' - Table `%s` truncated - <info>OK</info>', $table), OutputInterface::VERBOSITY_VERY_VERBOSE);
        }
        $this->em->getConnection()->executeUpdate('SET FOREIGN_KEY_CHECKS=1');

        return $this;
    }
1026910
protected function execute(InputInterface $input, OutputInterface $output)
    {
        if (!$this->apiHelper->restore($this->getHelper('question'), $input, $output)) {
            return;
        }

        $bunqUser = $this->apiHelper->currentUser()->getBunqUser();

        /** @var Pointer $pointer */
        foreach ($bunqUser->getAlias() as $pointer) {
            $output->writeln(\sprintf('<info>%s</info>: %s', $pointer->getType(), $pointer->getValue()));
        }
    }
376279
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $name = $input->getArgument('name');

        $cpath = app_path().'/controllers/';
        $filename = $name.'.php';
        $filepath = $cpath.$filename;

        if (file_exists($filepath)) {
            unlink($filepath);
            $output->writeln("<info>Controller: $name was deleted</info>");

            shell_exec('composer dump-autoload -o');
        } else {
            $output->writeln("<error>Controller: $name doesn't exists!");
        }
    }
797697
public function execute(InputInterface $input, OutputInterface $output)
    {
        $io = new OutputStyle($input, $output);

        $composerPath = $this->getComposerPathFromInput($input);

        $ladder = new Ladder($composerPath);

        $packages = $ladder->getOutdatedPackages();

        $io->newLine();

        if (!count($packages)) {
            $io->write('All dependencies match the latest package versions <fg=green>:)</>');
            $io->newLine();

            return 1;
        }

        $outdated = [];
        $upgradable = [];

        foreach ($packages as $package) {
            if ($package->isUpgradable()) {
                $upgradable[$package->getName()] = $package;
            } else {
                $outdated[$package->getName()] = $package;
            }
        }

        if ($input->getOption('all')) {
            $upgradable = array_merge($upgradable, $outdated);
        }

        if (empty($upgradable)) {
            $io->warning('Nothing to install or update, did you forget the flag --all?');

            return 1;
        }

        foreach ($upgradable as $package) {
            $command = $input->getOption('global') ? 'composer global require' : 'composer require';

            $command .= sprintf(' %s=^%s', $package->getName(), $package->getLatestVersion());

            if ($package->getDevDependency()) {
                $command .= ' --dev';
            }

            $process = new Process($command, $composerPath, array_merge($_SERVER, $_ENV), null, null);

            $process->run(function ($type, $line) use ($io) {
                $io->write($line);
            });

            $io->newLine();
        }

        return 0;
    }