[Console] fixed some CS

This commit is contained in:
Fabien Potencier 2012-05-15 17:04:12 +02:00
parent 09c80a8817
commit 90c26a48cd
11 changed files with 41 additions and 27 deletions

View File

@ -187,6 +187,8 @@ class Command
* @param InputInterface $input An InputInterface instance
* @param OutputInterface $output An OutputInterface instance
*
* @return integer The command exit code
*
* @see setCode()
* @see execute()
*

View File

@ -40,9 +40,9 @@ class OutputFormatter implements OutputFormatterInterface
{
$this->decorated = (Boolean) $decorated;
$this->setStyle('error', new OutputFormatterStyle('white', 'red'));
$this->setStyle('info', new OutputFormatterStyle('green'));
$this->setStyle('comment', new OutputFormatterStyle('yellow'));
$this->setStyle('error', new OutputFormatterStyle('white', 'red'));
$this->setStyle('info', new OutputFormatterStyle('green'));
$this->setStyle('comment', new OutputFormatterStyle('yellow'));
$this->setStyle('question', new OutputFormatterStyle('black', 'cyan'));
foreach ($styles as $name => $style) {
@ -90,9 +90,9 @@ class OutputFormatter implements OutputFormatterInterface
/**
* Checks if output formatter has style with specified name.
*
* @param string $name
* @param string $name
*
* @return Boolean
* @return Boolean
*
* @api
*/
@ -104,11 +104,11 @@ class OutputFormatter implements OutputFormatterInterface
/**
* Gets style options from style with specified name.
*
* @param string $name
* @param string $name
*
* @return OutputFormatterStyleInterface
* @return OutputFormatterStyleInterface
*
* @throws \InvalidArgumentException When style isn't defined
* @throws \InvalidArgumentException When style isn't defined
*
* @api
*/
@ -164,9 +164,9 @@ class OutputFormatter implements OutputFormatterInterface
/**
* Tries to create new style instance from string.
*
* @param string $string
* @param string $string
*
* @return Symfony\Component\Console\Format\FormatterStyle|Boolean false if string is not format string
* @return Symfony\Component\Console\Format\FormatterStyle|Boolean false if string is not format string
*/
private function createStyleFromString($string)
{

View File

@ -51,9 +51,9 @@ interface OutputFormatterInterface
/**
* Checks if output formatter has style with specified name.
*
* @param string $name
* @param string $name
*
* @return Boolean
* @return Boolean
*
* @api
*/
@ -62,9 +62,9 @@ interface OutputFormatterInterface
/**
* Gets style options from style with specified name.
*
* @param string $name
* @param string $name
*
* @return OutputFormatterStyleInterface
* @return OutputFormatterStyleInterface
*
* @api
*/

View File

@ -55,9 +55,9 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface
/**
* Initializes output formatter style.
*
* @param string $foreground style foreground color name
* @param string $background style background color name
* @param array $options style options
* @param string $foreground The style foreground color name
* @param string $background The style background color name
* @param array $options The style options
*
* @api
*/
@ -77,7 +77,7 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface
/**
* Sets style foreground color.
*
* @param string $color color name
* @param string $color The color name
*
* @throws \InvalidArgumentException When the color name isn't defined
*
@ -105,7 +105,7 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface
/**
* Sets style background color.
*
* @param string $color color name
* @param string $color The color name
*
* @throws \InvalidArgumentException When the color name isn't defined
*
@ -133,7 +133,7 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface
/**
* Sets some specific style option.
*
* @param string $option option name
* @param string $option The option name
*
* @throws \InvalidArgumentException When the option name isn't defined
*
@ -157,7 +157,7 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface
/**
* Unsets some specific style option.
*
* @param string $option option name
* @param string $option The option name
*
* @throws \InvalidArgumentException When the option name isn't defined
*
@ -181,7 +181,7 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface
/**
* Sets multiple style options at once.
*
* @param array $options
* @param array $options
*/
public function setOptions(array $options)
{

View File

@ -23,7 +23,7 @@ interface OutputFormatterStyleInterface
/**
* Sets style foreground color.
*
* @param string $color color name
* @param string $color The color name
*
* @api
*/
@ -32,7 +32,7 @@ interface OutputFormatterStyleInterface
/**
* Sets style background color.
*
* @param string $color color name
* @param string $color The color name
*
* @api
*/
@ -41,7 +41,7 @@ interface OutputFormatterStyleInterface
/**
* Sets some specific style option.
*
* @param string $option option name
* @param string $option The option name
*
* @api
*/
@ -50,14 +50,14 @@ interface OutputFormatterStyleInterface
/**
* Unsets some specific style option.
*
* @param string $option option name
* @param string $option Theoption name
*/
function unsetOption($option);
/**
* Sets multiple style options at once.
*
* @param array $options
* @param array $options
*/
function setOptions(array $options);

View File

@ -121,6 +121,8 @@ class DialogHelper extends Helper
/**
* Returns the helper's canonical name.
*
* @return string The helper name
*/
public function getName()
{

View File

@ -24,6 +24,8 @@ class FormatterHelper extends Helper
* @param string $section The section name
* @param string $message The message
* @param string $style The style to apply to the section
*
* @return string The format section
*/
public function formatSection($section, $message, $style = 'info')
{

View File

@ -47,6 +47,8 @@ class StringInput extends ArgvInput
*
* @param string $input The input to tokenize
*
* @return array An array of tokens
*
* @throws \InvalidArgumentException When unable to parse input (should never happen)
*/
private function tokenize($input)

View File

@ -85,6 +85,8 @@ class Shell
*
* @param string $text The last segment of the entered text
* @param integer $position The current position
*
* @return array An array of possibilities for the entered text
*/
private function autocompleter($text, $position)
{

View File

@ -16,6 +16,8 @@ use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Output\StreamOutput;
/**
* Eases the testing of console applications.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class ApplicationTester

View File

@ -16,6 +16,8 @@ use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Output\StreamOutput;
/**
* Eases the testing of console commands.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class CommandTester