Skip to content

Commit 940b788

Browse files
committed
[Console] use inheritdoc for Output classes
1 parent bd61b92 commit 940b788

File tree

3 files changed

+22
-52
lines changed

3 files changed

+22
-52
lines changed

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,32 +54,44 @@ public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = nu
5454
$this->stderr = new StreamOutput(fopen('php://stderr', 'w'), $verbosity, $decorated, $formatter);
5555
}
5656

57+
/**
58+
* {@inheritdoc}
59+
*/
5760
public function setDecorated($decorated)
5861
{
5962
parent::setDecorated($decorated);
6063
$this->stderr->setDecorated($decorated);
6164
}
6265

66+
/**
67+
* {@inheritdoc}
68+
*/
6369
public function setFormatter(OutputFormatterInterface $formatter)
6470
{
6571
parent::setFormatter($formatter);
6672
$this->stderr->setFormatter($formatter);
6773
}
6874

75+
/**
76+
* {@inheritdoc}
77+
*/
6978
public function setVerbosity($level)
7079
{
7180
parent::setVerbosity($level);
7281
$this->stderr->setVerbosity($level);
7382
}
7483

7584
/**
76-
* @return OutputInterface
85+
* {@inheritdoc}
7786
*/
7887
public function getErrorOutput()
7988
{
8089
return $this->stderr;
8190
}
8291

92+
/**
93+
* {@inheritdoc}
94+
*/
8395
public function setErrorOutput(OutputInterface $error)
8496
{
8597
$this->stderr = $error;

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

Lines changed: 8 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -51,100 +51,63 @@ public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = fa
5151
}
5252

5353
/**
54-
* Sets output formatter.
55-
*
56-
* @param OutputFormatterInterface $formatter
57-
*
58-
* @api
54+
* {@inheritdoc}
5955
*/
6056
public function setFormatter(OutputFormatterInterface $formatter)
6157
{
6258
$this->formatter = $formatter;
6359
}
6460

6561
/**
66-
* Returns current output formatter instance.
67-
*
68-
* @return OutputFormatterInterface
69-
*
70-
* @api
62+
* {@inheritdoc}
7163
*/
7264
public function getFormatter()
7365
{
7466
return $this->formatter;
7567
}
7668

7769
/**
78-
* Sets the decorated flag.
79-
*
80-
* @param Boolean $decorated Whether to decorate the messages or not
81-
*
82-
* @api
70+
* {@inheritdoc}
8371
*/
8472
public function setDecorated($decorated)
8573
{
8674
$this->formatter->setDecorated($decorated);
8775
}
8876

8977
/**
90-
* Gets the decorated flag.
91-
*
92-
* @return Boolean true if the output will decorate messages, false otherwise
93-
*
94-
* @api
78+
* {@inheritdoc}
9579
*/
9680
public function isDecorated()
9781
{
9882
return $this->formatter->isDecorated();
9983
}
10084

10185
/**
102-
* Sets the verbosity of the output.
103-
*
104-
* @param integer $level The level of verbosity
105-
*
106-
* @api
86+
* {@inheritdoc}
10787
*/
10888
public function setVerbosity($level)
10989
{
11090
$this->verbosity = (int) $level;
11191
}
11292

11393
/**
114-
* Gets the current verbosity of the output.
115-
*
116-
* @return integer The current level of verbosity
117-
*
118-
* @api
94+
* {@inheritdoc}
11995
*/
12096
public function getVerbosity()
12197
{
12298
return $this->verbosity;
12399
}
124100

125101
/**
126-
* Writes a message to the output and adds a newline at the end.
127-
*
128-
* @param string|array $messages The message as an array of lines or a single string
129-
* @param integer $type The type of output
130-
*
131-
* @api
102+
* {@inheritdoc}
132103
*/
133104
public function writeln($messages, $type = self::OUTPUT_NORMAL)
134105
{
135106
$this->write($messages, true, $type);
136107
}
137108

138109
/**
139-
* Writes a message to the output.
140-
*
141-
* @param string|array $messages The message as an array of lines or a single string
142-
* @param Boolean $newline Whether to add a newline
143-
* @param integer $type The type of output
144-
*
145-
* @throws \InvalidArgumentException When unknown output type is given
146-
*
147-
* @api
110+
* {@inheritdoc}
148111
*/
149112
public function write($messages, $newline = false, $type = self::OUTPUT_NORMAL)
150113
{

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,7 @@ public function getStream()
7070
}
7171

7272
/**
73-
* Writes a message to the output.
74-
*
75-
* @param string $message A message to write to the output
76-
* @param Boolean $newline Whether to add a newline or not
77-
*
78-
* @throws \RuntimeException When unable to write output (should never happen)
73+
* {@inheritdoc}
7974
*/
8075
protected function doWrite($message, $newline)
8176
{

0 commit comments

Comments
 (0)