[BugFix][Console] Fix type hint for output formatter

This commit is contained in:
Dariusz Górecki 2011-12-17 22:48:01 +01:00
parent 108cd50ac9
commit e417153e49
2 changed files with 4 additions and 4 deletions

View File

@ -11,7 +11,7 @@
namespace Symfony\Component\Console\Output;
use Symfony\Component\Console\Formatter\OutputFormatter;
use Symfony\Component\Console\Formatter\OutputFormatterInterface;
/**
* ConsoleOutput is the default class for all CLI output. It uses STDOUT.
@ -40,7 +40,7 @@ class ConsoleOutput extends StreamOutput
*
* @api
*/
public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatter $formatter = null)
public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatterInterface $formatter = null)
{
parent::__construct(fopen('php://stdout', 'w'), $verbosity, $decorated, $formatter);
}

View File

@ -11,7 +11,7 @@
namespace Symfony\Component\Console\Output;
use Symfony\Component\Console\Formatter\OutputFormatter;
use Symfony\Component\Console\Formatter\OutputFormatterInterface;
/**
* StreamOutput writes the output to a given stream.
@ -45,7 +45,7 @@ class StreamOutput extends Output
*
* @api
*/
public function __construct($stream, $verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatter $formatter = null)
public function __construct($stream, $verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatterInterface $formatter = null)
{
if (!is_resource($stream) || 'stream' !== get_resource_type($stream)) {
throw new \InvalidArgumentException('The StreamOutput class needs a stream as its first argument.');