From 00fcd63c04044f34ebdc2b7e7435b4a45d6f0682 Mon Sep 17 00:00:00 2001 From: Rob Bast Date: Thu, 30 Apr 2015 12:10:44 +0200 Subject: [PATCH] Remove redundant helper --- src/Composer/Command/Helper/DialogHelper.php | 36 -------------------- src/Composer/Console/Application.php | 12 ------- 2 files changed, 48 deletions(-) delete mode 100644 src/Composer/Command/Helper/DialogHelper.php diff --git a/src/Composer/Command/Helper/DialogHelper.php b/src/Composer/Command/Helper/DialogHelper.php deleted file mode 100644 index 6fb64f27e..000000000 --- a/src/Composer/Command/Helper/DialogHelper.php +++ /dev/null @@ -1,36 +0,0 @@ - - * Jordi Boggiano - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Composer\Command\Helper; - -use Symfony\Component\Console\Helper\DialogHelper as BaseDialogHelper; - -class DialogHelper extends BaseDialogHelper -{ - /** - * Build text for asking a question. For example: - * - * "Do you want to continue [yes]:" - * - * @param string $question The question you want to ask - * @param mixed $default Default value to add to message, if false no default will be shown - * @param string $sep Separation char for between message and user input - * - * @return string - */ - public function getQuestion($question, $default = null, $sep = ':') - { - return $default !== null ? - sprintf('%s [%s]%s ', $question, $default, $sep) : - sprintf('%s%s ', $question, $sep); - } -} diff --git a/src/Composer/Console/Application.php b/src/Composer/Console/Application.php index 2ccaec890..b2f9d5e7b 100644 --- a/src/Composer/Console/Application.php +++ b/src/Composer/Console/Application.php @@ -20,7 +20,6 @@ use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\ConsoleOutput; use Symfony\Component\Console\Formatter\OutputFormatter; use Composer\Command; -use Composer\Command\Helper\DialogHelper; use Composer\Composer; use Composer\Factory; use Composer\IO\IOInterface; @@ -321,15 +320,4 @@ class Application extends BaseApplication return $definition; } - - /** - * {@inheritDoc} - */ - protected function getDefaultHelperSet() - { - $helperSet = parent::getDefaultHelperSet(); - $helperSet->set(new DialogHelper()); - - return $helperSet; - } }