[Console] use inheritdoc for Output classes
This commit is contained in:
parent
bd61b925a1
commit
940b7888ac
@ -54,18 +54,27 @@ class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface
|
|||||||
$this->stderr = new StreamOutput(fopen('php://stderr', 'w'), $verbosity, $decorated, $formatter);
|
$this->stderr = new StreamOutput(fopen('php://stderr', 'w'), $verbosity, $decorated, $formatter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
public function setDecorated($decorated)
|
public function setDecorated($decorated)
|
||||||
{
|
{
|
||||||
parent::setDecorated($decorated);
|
parent::setDecorated($decorated);
|
||||||
$this->stderr->setDecorated($decorated);
|
$this->stderr->setDecorated($decorated);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
public function setFormatter(OutputFormatterInterface $formatter)
|
public function setFormatter(OutputFormatterInterface $formatter)
|
||||||
{
|
{
|
||||||
parent::setFormatter($formatter);
|
parent::setFormatter($formatter);
|
||||||
$this->stderr->setFormatter($formatter);
|
$this->stderr->setFormatter($formatter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
public function setVerbosity($level)
|
public function setVerbosity($level)
|
||||||
{
|
{
|
||||||
parent::setVerbosity($level);
|
parent::setVerbosity($level);
|
||||||
@ -73,13 +82,16 @@ class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return OutputInterface
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function getErrorOutput()
|
public function getErrorOutput()
|
||||||
{
|
{
|
||||||
return $this->stderr;
|
return $this->stderr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
public function setErrorOutput(OutputInterface $error)
|
public function setErrorOutput(OutputInterface $error)
|
||||||
{
|
{
|
||||||
$this->stderr = $error;
|
$this->stderr = $error;
|
||||||
|
@ -51,11 +51,7 @@ abstract class Output implements OutputInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets output formatter.
|
* {@inheritdoc}
|
||||||
*
|
|
||||||
* @param OutputFormatterInterface $formatter
|
|
||||||
*
|
|
||||||
* @api
|
|
||||||
*/
|
*/
|
||||||
public function setFormatter(OutputFormatterInterface $formatter)
|
public function setFormatter(OutputFormatterInterface $formatter)
|
||||||
{
|
{
|
||||||
@ -63,11 +59,7 @@ abstract class Output implements OutputInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns current output formatter instance.
|
* {@inheritdoc}
|
||||||
*
|
|
||||||
* @return OutputFormatterInterface
|
|
||||||
*
|
|
||||||
* @api
|
|
||||||
*/
|
*/
|
||||||
public function getFormatter()
|
public function getFormatter()
|
||||||
{
|
{
|
||||||
@ -75,11 +67,7 @@ abstract class Output implements OutputInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the decorated flag.
|
* {@inheritdoc}
|
||||||
*
|
|
||||||
* @param Boolean $decorated Whether to decorate the messages or not
|
|
||||||
*
|
|
||||||
* @api
|
|
||||||
*/
|
*/
|
||||||
public function setDecorated($decorated)
|
public function setDecorated($decorated)
|
||||||
{
|
{
|
||||||
@ -87,11 +75,7 @@ abstract class Output implements OutputInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the decorated flag.
|
* {@inheritdoc}
|
||||||
*
|
|
||||||
* @return Boolean true if the output will decorate messages, false otherwise
|
|
||||||
*
|
|
||||||
* @api
|
|
||||||
*/
|
*/
|
||||||
public function isDecorated()
|
public function isDecorated()
|
||||||
{
|
{
|
||||||
@ -99,11 +83,7 @@ abstract class Output implements OutputInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the verbosity of the output.
|
* {@inheritdoc}
|
||||||
*
|
|
||||||
* @param integer $level The level of verbosity
|
|
||||||
*
|
|
||||||
* @api
|
|
||||||
*/
|
*/
|
||||||
public function setVerbosity($level)
|
public function setVerbosity($level)
|
||||||
{
|
{
|
||||||
@ -111,11 +91,7 @@ abstract class Output implements OutputInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the current verbosity of the output.
|
* {@inheritdoc}
|
||||||
*
|
|
||||||
* @return integer The current level of verbosity
|
|
||||||
*
|
|
||||||
* @api
|
|
||||||
*/
|
*/
|
||||||
public function getVerbosity()
|
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.
|
* {@inheritdoc}
|
||||||
*
|
|
||||||
* @param string|array $messages The message as an array of lines or a single string
|
|
||||||
* @param integer $type The type of output
|
|
||||||
*
|
|
||||||
* @api
|
|
||||||
*/
|
*/
|
||||||
public function writeln($messages, $type = self::OUTPUT_NORMAL)
|
public function writeln($messages, $type = self::OUTPUT_NORMAL)
|
||||||
{
|
{
|
||||||
@ -136,15 +107,7 @@ abstract class Output implements OutputInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Writes a message to the output.
|
* {@inheritdoc}
|
||||||
*
|
|
||||||
* @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
|
|
||||||
*/
|
*/
|
||||||
public function write($messages, $newline = false, $type = self::OUTPUT_NORMAL)
|
public function write($messages, $newline = false, $type = self::OUTPUT_NORMAL)
|
||||||
{
|
{
|
||||||
|
@ -70,12 +70,7 @@ class StreamOutput extends Output
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Writes a message to the output.
|
* {@inheritdoc}
|
||||||
*
|
|
||||||
* @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)
|
|
||||||
*/
|
*/
|
||||||
protected function doWrite($message, $newline)
|
protected function doWrite($message, $newline)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user