Permalink
Browse files

merged 2.0

  • Loading branch information...
2 parents 0e67dc7 + 575f32d commit 2e9b47fe58a76bd6997af158f1424ae4652c369b @fabpot fabpot committed May 18, 2012
View
@@ -839,7 +839,7 @@ protected function getTerminalWidth()
}
if (preg_match("{rows.(\d+);.columns.(\d+);}i", $this->getSttyColumns(), $match)) {
- return $match[1];
+ return $match[2];
}
}
@@ -855,7 +855,7 @@ protected function getTerminalHeight()
}
if (preg_match("{rows.(\d+);.columns.(\d+);}i", $this->getSttyColumns(), $match)) {
- return $match[2];
+ return $match[1];
}
}
View
@@ -200,6 +200,8 @@ protected function initialize(InputInterface $input, OutputInterface $output)
* @param InputInterface $input An InputInterface instance
* @param OutputInterface $output An OutputInterface instance
*
+ * @return integer The command exit code
+ *
* @see setCode()
* @see execute()
*
@@ -41,9 +41,9 @@ public function __construct($decorated = null, array $styles = array())
{
$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) {
@@ -93,9 +93,9 @@ public function setStyle($name, OutputFormatterStyleInterface $style)
/**
* Checks if output formatter has style with specified name.
*
- * @param string $name
+ * @param string $name
*
- * @return Boolean
+ * @return Boolean
*
* @api
*/
@@ -107,11 +107,11 @@ public function hasStyle($name)
/**
* 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
*/
@@ -181,9 +181,9 @@ private function replaceStyle($match)
/**
* Tries to create new style instance from string.
*
- * @param string $string
+ * @param string $string
*
- * @return OutputFormatterStyle|Boolean false if string is not format string
+ * @return OutputFormatterStyle|Boolean false if string is not format string
*/
private function createStyleFromString($string)
{
@@ -51,9 +51,9 @@ function setStyle($name, OutputFormatterStyleInterface $style);
/**
* Checks if output formatter has style with specified name.
*
- * @param string $name
+ * @param string $name
*
- * @return Boolean
+ * @return Boolean
*
* @api
*/
@@ -62,9 +62,9 @@ function hasStyle($name);
/**
* Gets style options from style with specified name.
*
- * @param string $name
+ * @param string $name
*
- * @return OutputFormatterStyleInterface
+ * @return OutputFormatterStyleInterface
*
* @api
*/
@@ -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 @@ public function __construct($foreground = null, $background = null, array $optio
/**
* 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 @@ public function setForeground($color = null)
/**
* 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 @@ public function setBackground($color = null)
/**
* 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 @@ public function setOption($option)
/**
* 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 @@ public function unsetOption($option)
/**
* Sets multiple style options at once.
*
- * @param array $options
+ * @param array $options
*/
public function setOptions(array $options)
{
@@ -23,7 +23,7 @@
/**
* Sets style foreground color.
*
- * @param string $color color name
+ * @param string $color The color name
*
* @api
*/
@@ -32,7 +32,7 @@ function setForeground($color = null);
/**
* Sets style background color.
*
- * @param string $color color name
+ * @param string $color The color name
*
* @api
*/
@@ -41,7 +41,7 @@ function setBackground($color = null);
/**
* Sets some specific style option.
*
- * @param string $option option name
+ * @param string $option The option name
*
* @api
*/
@@ -50,14 +50,14 @@ function setOption($option);
/**
* 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);
@@ -131,6 +131,8 @@ public function getInputStream()
/**
* Returns the helper's canonical name.
+ *
+ * @return string The helper name
*/
public function getName()
{
@@ -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')
{
@@ -47,6 +47,8 @@ public function __construct($input, InputDefinition $definition = null)
*
* @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
@@ -145,6 +145,7 @@ protected function getHeader()
* Tries to return autocompletion for the current entered text.
*
* @param string $text The last segment of the entered text
+ *
* @return Boolean|array A list of guessed strings or true
*/
private function autocompleter($text)
@@ -18,6 +18,8 @@
use Symfony\Component\Console\Output\StreamOutput;
/**
+ * Eases the testing of console applications.
+ *
* @author Fabien Potencier <fabien@symfony.com>
*/
class ApplicationTester
@@ -16,6 +16,8 @@
use Symfony\Component\Console\Output\StreamOutput;
/**
+ * Eases the testing of console commands.
+ *
* @author Fabien Potencier <fabien@symfony.com>
*/
class CommandTester

0 comments on commit 2e9b47f

Please sign in to comment.