[Console] moved whole constructor definitions in one line

This commit is contained in:
ever.zet 2011-03-17 18:51:01 +02:00
parent 8b885a991c
commit aa084dbc45
3 changed files with 3 additions and 6 deletions

View File

@ -35,8 +35,7 @@ class ConsoleOutput extends StreamOutput
* @param Boolean $decorated Whether to decorate messages or not (null for auto-guessing) * @param Boolean $decorated Whether to decorate messages or not (null for auto-guessing)
* @param OutputFormatter $formatter Output formatter instance * @param OutputFormatter $formatter Output formatter instance
*/ */
public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = null, public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatter $formatter = null)
OutputFormatter $formatter = null)
{ {
parent::__construct(fopen('php://stdout', 'w'), $verbosity, $decorated, $formatter); parent::__construct(fopen('php://stdout', 'w'), $verbosity, $decorated, $formatter);
} }

View File

@ -45,8 +45,7 @@ abstract class Output implements OutputInterface
* @param Boolean $decorated Whether to decorate messages or not (null for auto-guessing) * @param Boolean $decorated Whether to decorate messages or not (null for auto-guessing)
* @param OutputFormatterInterface $formatter Output formatter instance * @param OutputFormatterInterface $formatter Output formatter instance
*/ */
public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = null, public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatterInterface $formatter = null)
OutputFormatterInterface $formatter = null)
{ {
if (null === $formatter) { if (null === $formatter) {
$formatter = new OutputFormatter(); $formatter = new OutputFormatter();

View File

@ -40,8 +40,7 @@ class StreamOutput extends Output
* *
* @throws \InvalidArgumentException When first argument is not a real stream * @throws \InvalidArgumentException When first argument is not a real stream
*/ */
public function __construct($stream, $verbosity = self::VERBOSITY_NORMAL, $decorated = null, public function __construct($stream, $verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatter $formatter = null)
OutputFormatter $formatter = null)
{ {
if (!is_resource($stream) || 'stream' !== get_resource_type($stream)) { if (!is_resource($stream) || 'stream' !== get_resource_type($stream)) {
throw new \InvalidArgumentException('The StreamOutput class needs a stream as its first argument.'); throw new \InvalidArgumentException('The StreamOutput class needs a stream as its first argument.');