[Console] Removed previously introduced BC break.

This commit is contained in:
Jean-François Simon 2012-03-16 14:00:53 +01:00
parent 90a2a6e556
commit 2a908711cd
2 changed files with 6 additions and 34 deletions

View File

@ -29,13 +29,6 @@ interface OutputFormatterStyleInterface
*/
function setForeground($color = null);
/**
* Gets style foreground color.
*
* @return string|null
*/
function getForeground();
/**
* Sets style background color.
*
@ -45,13 +38,6 @@ interface OutputFormatterStyleInterface
*/
function setBackground($color = null);
/**
* Gets style background color.
*
* @return string|null
*/
function getBackground();
/**
* Sets some specific style option.
*
@ -75,20 +61,6 @@ interface OutputFormatterStyleInterface
*/
function setOptions(array $options);
/**
* Gets specific style options.
*
* @return array
*/
function getOptions();
/**
* Gets terminal colorization sequence.
*
* @return string
*/
function getTerminalSequence();
/**
* Applies the style to a given text.
*

View File

@ -52,9 +52,9 @@ class OutputFormatterStyleStack
/**
* Pushes a style in the stack.
*
* @param OutputFormatterStyleInterface $style
* @param OutputFormatterStyle $style
*/
public function pushStyle(OutputFormatterStyleInterface $style)
public function pushStyle(OutputFormatterStyle $style)
{
$foreground = $style->getForeground();
if (null !== $foreground) {
@ -77,11 +77,11 @@ class OutputFormatterStyleStack
/**
* Pops a style from the stack.
*
* @param OutputFormatterStyleInterface $style
* @param OutputFormatterStyle $style
*
* @throws \InvalidArgumentException When style tags incorrectly nested
*/
public function popStyle(OutputFormatterStyleInterface $style)
public function popStyle(OutputFormatterStyle $style)
{
$this->popArrayCode($this->foregrounds, $style->getForeground());
$this->popArrayCode($this->backgrounds, $style->getBackground());
@ -115,8 +115,8 @@ class OutputFormatterStyleStack
/**
* Pops a color from a stack.
*
* @param array $stack An array of color names
* @param int $color A color name
* @param array $stack An array of color names
* @param string $color A color name
*
* @throws \InvalidArgumentException When poped color is not the expected one
*/