From 940b7888ac16b3d1a60904c2c478c7c54a624367 Mon Sep 17 00:00:00 2001 From: Tobias Schultze Date: Tue, 14 May 2013 18:52:49 +0200 Subject: [PATCH] [Console] use inheritdoc for Output classes --- .../Console/Output/ConsoleOutput.php | 14 ++++- .../Component/Console/Output/Output.php | 53 +++---------------- .../Component/Console/Output/StreamOutput.php | 7 +-- 3 files changed, 22 insertions(+), 52 deletions(-) diff --git a/src/Symfony/Component/Console/Output/ConsoleOutput.php b/src/Symfony/Component/Console/Output/ConsoleOutput.php index adea35f77e..6dad744606 100644 --- a/src/Symfony/Component/Console/Output/ConsoleOutput.php +++ b/src/Symfony/Component/Console/Output/ConsoleOutput.php @@ -54,18 +54,27 @@ class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface $this->stderr = new StreamOutput(fopen('php://stderr', 'w'), $verbosity, $decorated, $formatter); } + /** + * {@inheritdoc} + */ public function setDecorated($decorated) { parent::setDecorated($decorated); $this->stderr->setDecorated($decorated); } + /** + * {@inheritdoc} + */ public function setFormatter(OutputFormatterInterface $formatter) { parent::setFormatter($formatter); $this->stderr->setFormatter($formatter); } + /** + * {@inheritdoc} + */ public function setVerbosity($level) { parent::setVerbosity($level); @@ -73,13 +82,16 @@ class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface } /** - * @return OutputInterface + * {@inheritdoc} */ public function getErrorOutput() { return $this->stderr; } + /** + * {@inheritdoc} + */ public function setErrorOutput(OutputInterface $error) { $this->stderr = $error; diff --git a/src/Symfony/Component/Console/Output/Output.php b/src/Symfony/Component/Console/Output/Output.php index 89b68a2792..0daedc3eaf 100644 --- a/src/Symfony/Component/Console/Output/Output.php +++ b/src/Symfony/Component/Console/Output/Output.php @@ -51,11 +51,7 @@ abstract class Output implements OutputInterface } /** - * Sets output formatter. - * - * @param OutputFormatterInterface $formatter - * - * @api + * {@inheritdoc} */ public function setFormatter(OutputFormatterInterface $formatter) { @@ -63,11 +59,7 @@ abstract class Output implements OutputInterface } /** - * Returns current output formatter instance. - * - * @return OutputFormatterInterface - * - * @api + * {@inheritdoc} */ public function getFormatter() { @@ -75,11 +67,7 @@ abstract class Output implements OutputInterface } /** - * Sets the decorated flag. - * - * @param Boolean $decorated Whether to decorate the messages or not - * - * @api + * {@inheritdoc} */ public function setDecorated($decorated) { @@ -87,11 +75,7 @@ abstract class Output implements OutputInterface } /** - * Gets the decorated flag. - * - * @return Boolean true if the output will decorate messages, false otherwise - * - * @api + * {@inheritdoc} */ public function isDecorated() { @@ -99,11 +83,7 @@ abstract class Output implements OutputInterface } /** - * Sets the verbosity of the output. - * - * @param integer $level The level of verbosity - * - * @api + * {@inheritdoc} */ public function setVerbosity($level) { @@ -111,11 +91,7 @@ abstract class Output implements OutputInterface } /** - * Gets the current verbosity of the output. - * - * @return integer The current level of verbosity - * - * @api + * {@inheritdoc} */ public function getVerbosity() { @@ -123,12 +99,7 @@ abstract class Output implements OutputInterface } /** - * Writes a message to the output and adds a newline at the end. - * - * @param string|array $messages The message as an array of lines or a single string - * @param integer $type The type of output - * - * @api + * {@inheritdoc} */ public function writeln($messages, $type = self::OUTPUT_NORMAL) { @@ -136,15 +107,7 @@ abstract class Output implements OutputInterface } /** - * Writes a message to the output. - * - * @param string|array $messages The message as an array of lines or a single string - * @param Boolean $newline Whether to add a newline - * @param integer $type The type of output - * - * @throws \InvalidArgumentException When unknown output type is given - * - * @api + * {@inheritdoc} */ public function write($messages, $newline = false, $type = self::OUTPUT_NORMAL) { diff --git a/src/Symfony/Component/Console/Output/StreamOutput.php b/src/Symfony/Component/Console/Output/StreamOutput.php index 674bdad571..09a5ca38b6 100644 --- a/src/Symfony/Component/Console/Output/StreamOutput.php +++ b/src/Symfony/Component/Console/Output/StreamOutput.php @@ -70,12 +70,7 @@ class StreamOutput extends Output } /** - * Writes a message to the output. - * - * @param string $message A message to write to the output - * @param Boolean $newline Whether to add a newline or not - * - * @throws \RuntimeException When unable to write output (should never happen) + * {@inheritdoc} */ protected function doWrite($message, $newline) {