Ensure deletion of a country.

@param InputInterface  $input  The input interface
@param OutputInterface $output The output interface

@return $this Self object
165310
protected function deleteCountry(
        InputInterface $input,
        OutputInterface $output,
        $countryCode
    ) {
        $noInteraction = $input->getOption('no-interaction');
        $country = $this
            ->locationDirector
            ->findOneBy([
                'code' => $countryCode,
            ]);

        if ($country instanceof LocationInterface) {
            if (
                !$noInteraction &&
                !$this->confirmRemoval(
                    $input,
                    $output,
                    $countryCode,
                    $output
                )
            ) {
                return $this;
            }

            $this->dropCountry($country, $output);
        } else {
            $this
                ->printMessage(
                    $output,
                    'Geo',
                    'Country ' . $countryCode . ' not found in your database'
                );
        }

        return $this;
    }
105744
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->Selftest($input, $output);
        $this->Ping($input, $output);
        $this->Connect($input, $output);
    }
670106
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->clear($this->_config->get('cache'), $output);
        $this->clear($this->_config->get('session_location'), $output);
    }
489985
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $finder     = new Finder();
        $filesystem = new Filesystem();
        $filesystem->remove($finder->directories()->in($this->getLanguageBasePath()));
    }
1194065
public function execute(InputInterface $input, OutputInterface $output)
    {
        $host = $input->getArgument('host');

        $remove = $this->hostFile->remove($host);

        $output->writeLn("$host was removed from file.");
    }
922936
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $inputFile = $input->getArgument('input-file');
        $outputFile = $input->getArgument('output-file');

        if ($outputFile === null) {
            $outputFile = preg_replace('/\\.[^.]*$/', '.php', $inputFile);
        }

        $parserGenerator = new ParserGenerator(new PegFile());

        $output = "<?php\n\n" . $parserGenerator->createClass($inputFile);

        file_put_contents($outputFile, $output);
    }
45556
protected function executeDelete(InputInterface $input, OutputInterface $output)
    {
        $this->doIndexCleanup($input->getArgument('id'));
        $this->doIndexCommit();

        return 0;
    }
390096
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->initializeLicenser($input, $output);

        $sources = $input->getArgument('sources');

        $this->licenser->check($sources);
    }
506396
public function doMigrate(OutputInterface $output)
	{
		assert($this->_dispatcher);
		assert($this->_container);

		$this->_clearStatProperties();
		$call = self::$_call;

		$callPhpScript = function($event, $hash, $key, $script, $arguments) use ($call) {
			try
			{
				$errorReporting = error_reporting(E_ALL | E_STRICT);

				if (!$this->_evalCheckSyntax($script))
				{
					/** @noinspection PhpUndefinedMethodInspection */
					$message = sprintf(self::ERROR_WRONG_PHP_SYNTAX, $event->getMigrationName());
					/** @noinspection PhpUndefinedMethodInspection */
					throw new ErrorException($message, 0, E_PARSE, 'action N'.$event->getStep(), 0);
				}

				set_error_handler(function($severity, $message, $file = null, $line = null) {
					if (error_reporting() & $severity)
					{
						throw new ErrorException($message, 0, $severity, $file, $line);
					}
				}, E_ALL | E_STRICT);

				/** @var \Moro\Migration\Event\OnAskMigrationApply $event */
				$service = $this->_container->offsetGet($event->getServiceName());
				return $call($this->_container, $service, $arguments, trim($script), $hash, $this->getValidationKey().$key);
			}
			catch (Exception $exception)
			{
				/** @noinspection PhpUndefinedMethodInspection */
				$event->setException($exception);
				return -1;
			}
			finally
			{
				/** @noinspection PhpUndefinedVariableInspection */
				error_reporting($errorReporting);
				restore_error_handler();
			}
		};

		$this->_dispatcher->dispatch(self::EVENT_INIT_SERVICE, OnInitService::create()->setOutput($output));

		try
		{
			$this->notify(self::STATE_FIRED);

			$modulesAndFiles = $this->_findModulesAndMigrationFiles();
			$migrations      = $this->_parseMigrationFiles($modulesAndFiles);

			$this->notify(self::STATE_FIND_MIGRATIONS);

			$actions         = $this->_askMigrationList($modulesAndFiles, $migrations);
			$actions         = $this->_sortMigrationsList($actions);

			$this->notify(self::STATE_MIGRATIONS_ASKED);

			if (empty($this->_statErrors))
			{
				$actions[0] && $this->_askMigrationRollback($actions[0], $callPhpScript);
				$actions[1] && $this->_askMigrationsApply($actions[1], $modulesAndFiles, $callPhpScript);
			}

			$this->notify(self::STATE_COMPLETE);
		}
		catch (Exception $exception)
		{
			$this->_printError($exception);
			$this->notify(self::STATE_COMPLETE);
		}
		finally
		{
			$this->_stateMigrationName = null;
			$this->_state = self::STATE_INITIALIZED;

			$this->_dispatcher->dispatch(self::EVENT_FREE_SERVICE, OnFreeService::create());
		}
	}
705578
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->startCommand($output);

        $configurationIdentifier = $input->getArgument('identifier');
        $this
            ->configurationManager
            ->delete(
                $configurationIdentifier
            );

        $this->printMessage(
            $output,
            'Configuration',
            'Deleted configuration "' . $configurationIdentifier . '"'
        );

        $this->finishCommand($output);
    }
221302
protected function initialize(InputInterface $input, OutputInterface $output)
    {

        parent::initialize($input, $output);

        $translationMode = $input->getOption('mode');
        $validModes      = array(
            'reviewed',
            'translated',
            'default'
        );
        if (!in_array($translationMode, $validModes)) {
            throw new \InvalidArgumentException(
                sprintf(
                    'Invalid translation mode %s specified. Must be one of %s',
                    $translationMode,
                    implode(', ', $validModes)
                )
            );
        }
    }
107483
protected function execute(InputInterface $input, OutputInterface $output)
    {
        if (!$this->doRestore) {
            $output->writeln('<error>Restore is not available. Enable by setting dizda_cloud_backup.restore: true in config.yml.</error>');

            return self::RETURN_STATUS_NOT_AVAILABLE;
        }

        if (!$input->getOption('force')) {
            $output->writeln('<error>Run command with --force to execute.</error>');

            return self::RETURN_STATUS_MISSING_FORCE_FLAG;
        }

        $output->writeln('Restoring backup started');

        if ($this->restoreManager->execute()) {
            $output->writeln('Restoring backup completed');

            return self::RETURN_STATUS_SUCCESS;
        } else {
            $output->writeln('<error>Something went wrong</error>');

            return self::RETURN_STATUS_EXCEPTION_OCCURRED;
        }
    }
328086
public function removeInterface($interface) {
		if ($interface instanceof PhpInterface) {
			$name = $interface->getName();
			$qname = $interface->getQualifiedName();

			$this->removeUseStatement($qname);
		} else {
			$name = $interface;
		}

		$this->interfaces->remove($name);

		return $this;
	}
821227
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->output = new SymfonyOutput($output);

        $this->input = $input;

        if (method_exists($this, 'handle')) {
            $this->handle();
        }
    }
594086
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->input = $input;
        $this->output = $output;

        try {
            return $this->fire();
        } catch (DomainException $e) {
            return 1;
        } catch (Exception $e) {
            $this->error($e->getMessage());
            $this->error('Abort!');
        }

        return;
    }
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!");
        }
    }
563569
protected function initialize(InputInterface $input, OutputInterface $output)
    {
        parent::initialize($input, $output);

        Context::get('information-collector')->handleCommandInput($input);

        $this->getOutput()->writeBigTitle('Welcome to Release Management Tool');

        $this->executeActionListIfExist('prerequisites');
    }