Skip to content

Commit bd61b92

Browse files
committed
[Console] fix phpdoc of Output classes (esp. regarding the new verbosities)
also add missing information
1 parent 9dcc9fa commit bd61b92

File tree

5 files changed

+31
-22
lines changed

5 files changed

+31
-22
lines changed

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,9 @@ class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface
3636
/**
3737
* Constructor.
3838
*
39-
* @param integer $verbosity The verbosity level (self::VERBOSITY_QUIET, self::VERBOSITY_NORMAL,
40-
* self::VERBOSITY_VERBOSE)
41-
* @param Boolean $decorated Whether to decorate messages or not (null for auto-guessing)
42-
* @param OutputFormatterInterface $formatter Output formatter instance
39+
* @param integer $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface)
40+
* @param Boolean|null $decorated Whether to decorate messages (null for auto-guessing)
41+
* @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter)
4342
*
4443
* @api
4544
*/

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,16 @@
2222
interface ConsoleOutputInterface extends OutputInterface
2323
{
2424
/**
25+
* Gets the OutputInterface for errors.
26+
*
2527
* @return OutputInterface
2628
*/
2729
public function getErrorOutput();
2830

31+
/**
32+
* Sets the OutputInterface used for errors.
33+
*
34+
* @param OutputInterface $error
35+
*/
2936
public function setErrorOutput(OutputInterface $error);
3037
}

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

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@
1717
/**
1818
* Base class for output classes.
1919
*
20-
* There are three levels of verbosity:
20+
* There are five levels of verbosity:
2121
*
22-
* * normal: no option passed (normal output - information)
23-
* * verbose: -v (more output - debug)
22+
* * normal: no option passed (normal output)
23+
* * verbose: -v (more output)
24+
* * very verbose: -vv (highly extended output)
25+
* * debug: -vvv (all debug output)
2426
* * quiet: -q (no output)
2527
*
2628
* @author Fabien Potencier <fabien@symfony.com>
@@ -35,9 +37,9 @@ abstract class Output implements OutputInterface
3537
/**
3638
* Constructor.
3739
*
38-
* @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
40-
* @param OutputFormatterInterface $formatter Output formatter instance
40+
* @param integer $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface)
41+
* @param Boolean $decorated Whether to decorate messages
42+
* @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter)
4143
*
4244
* @api
4345
*/
@@ -137,7 +139,7 @@ public function writeln($messages, $type = self::OUTPUT_NORMAL)
137139
* Writes a message to the output.
138140
*
139141
* @param string|array $messages The message as an array of lines or a single string
140-
* @param Boolean $newline Whether to add a newline or not
142+
* @param Boolean $newline Whether to add a newline
141143
* @param integer $type The type of output
142144
*
143145
* @throws \InvalidArgumentException When unknown output type is given

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

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ interface OutputInterface
3636
* Writes a message to the output.
3737
*
3838
* @param string|array $messages The message as an array of lines or a single string
39-
* @param Boolean $newline Whether to add a newline or not
40-
* @param integer $type The type of output (0: normal, 1: raw, 2: plain)
39+
* @param Boolean $newline Whether to add a newline
40+
* @param integer $type The type of output (one of the OUTPUT constants)
4141
*
4242
* @throws \InvalidArgumentException When unknown output type is given
4343
*
@@ -49,7 +49,9 @@ public function write($messages, $newline = false, $type = self::OUTPUT_NORMAL);
4949
* Writes a message to the output and adds a newline at the end.
5050
*
5151
* @param string|array $messages The message as an array of lines of a single string
52-
* @param integer $type The type of output (0: normal, 1: raw, 2: plain)
52+
* @param integer $type The type of output (one of the OUTPUT constants)
53+
*
54+
* @throws \InvalidArgumentException When unknown output type is given
5355
*
5456
* @api
5557
*/
@@ -58,7 +60,7 @@ public function writeln($messages, $type = self::OUTPUT_NORMAL);
5860
/**
5961
* Sets the verbosity of the output.
6062
*
61-
* @param integer $level The level of verbosity
63+
* @param integer $level The level of verbosity (one of the VERBOSITY constants)
6264
*
6365
* @api
6466
*/
@@ -67,7 +69,7 @@ public function setVerbosity($level);
6769
/**
6870
* Gets the current verbosity of the output.
6971
*
70-
* @return integer The current level of verbosity
72+
* @return integer The current level of verbosity (one of the VERBOSITY constants)
7173
*
7274
* @api
7375
*/
@@ -76,7 +78,7 @@ public function getVerbosity();
7678
/**
7779
* Sets the decorated flag.
7880
*
79-
* @param Boolean $decorated Whether to decorate the messages or not
81+
* @param Boolean $decorated Whether to decorate the messages
8082
*
8183
* @api
8284
*/

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,10 @@ class StreamOutput extends Output
3535
/**
3636
* Constructor.
3737
*
38-
* @param mixed $stream A stream resource
39-
* @param integer $verbosity The verbosity level (self::VERBOSITY_QUIET, self::VERBOSITY_NORMAL,
40-
* self::VERBOSITY_VERBOSE)
41-
* @param Boolean $decorated Whether to decorate messages or not (null for auto-guessing)
42-
* @param OutputFormatterInterface $formatter Output formatter instance
38+
* @param mixed $stream A stream resource
39+
* @param integer $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface)
40+
* @param Boolean|null $decorated Whether to decorate messages (null for auto-guessing)
41+
* @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter)
4342
*
4443
* @throws \InvalidArgumentException When first argument is not a real stream
4544
*

0 commit comments

Comments
 (0)