8000 [Console] fix abstract Output class that fasly claims to support gues… · richsage/symfony@9dcc9fa · GitHub
[go: up one dir, main page]

Skip to content

Commit 9dcc9fa

Browse files
committed
[Console] fix abstract Output class that fasly claims to support guessing of decorated variable.
Also we don't need to typecast to boolean as its already done by the formatter and its his responsibility
1 parent 2628d88 commit 9dcc9fa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Symfony/Component/Console/Output/Output.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,16 @@ abstract class Output implements OutputInterface
3636
* Constructor.
3737
*
3838
* @param integer $verbosity The verbosity level (self::VERBOSITY_QUIET, self::VERBOSITY_NORMAL, self::VERBOSITY_VERBOSE)
39-
* @param Boolean $decorated Whether to decorate messages or not (null for auto-guessing)
39+
* @param Boolean $decorated Whether to decorate messages or not
4040
* @param OutputFormatterInterface $formatter Output formatter instance
4141
*
4242
* @api
4343
*/
44-
public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatterInterface $formatter = null)
44+
public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = false, OutputFormatterInterface $formatter = null)
4545
{
4646
$this->verbosity = null === $verbosity ? self::VERBOSITY_NORMAL : $verbosity;
4747
$this->formatter = null === $formatter ? new OutputFormatter() : $formatter;
48-
$this->formatter->setDecorated((Boolean) $decorated);
48+
$this->formatter->setDecorated($decorated);
4949
}
5050

5151
/**
@@ -81,7 +81,7 @@ public function getFormatter()
8181
*/
8282
public function setDecorated($decorated)
8383
{
84-
$this->formatter->setDecorated((Boolean) $decorated);
84+
$this->formatter->setDecorated($decorated);
8585
}
8686

8787
/**

0 commit comments

Comments
 (0)
0