package and depencies

This commit is contained in:
RafficMohammed
2023-01-08 02:57:24 +05:30
parent d5332eb421
commit 1d54b8bc7f
4309 changed files with 193331 additions and 172289 deletions

View File

@@ -24,104 +24,65 @@ use Symfony\Component\Console\Formatter\OutputFormatterInterface;
*/
class NullOutput implements OutputInterface
{
private $formatter;
private NullOutputFormatter $formatter;
/**
* {@inheritdoc}
*/
public function setFormatter(OutputFormatterInterface $formatter)
{
// do nothing
}
/**
* {@inheritdoc}
*/
public function getFormatter()
public function getFormatter(): OutputFormatterInterface
{
if ($this->formatter) {
return $this->formatter;
}
// to comply with the interface we must return a OutputFormatterInterface
return $this->formatter = new NullOutputFormatter();
return $this->formatter ??= new NullOutputFormatter();
}
/**
* {@inheritdoc}
*/
public function setDecorated(bool $decorated)
{
// do nothing
}
/**
* {@inheritdoc}
*/
public function isDecorated()
public function isDecorated(): bool
{
return false;
}
/**
* {@inheritdoc}
*/
public function setVerbosity(int $level)
{
// do nothing
}
/**
* {@inheritdoc}
*/
public function getVerbosity()
public function getVerbosity(): int
{
return self::VERBOSITY_QUIET;
}
/**
* {@inheritdoc}
*/
public function isQuiet()
public function isQuiet(): bool
{
return true;
}
/**
* {@inheritdoc}
*/
public function isVerbose()
public function isVerbose(): bool
{
return false;
}
/**
* {@inheritdoc}
*/
public function isVeryVerbose()
public function isVeryVerbose(): bool
{
return false;
}
/**
* {@inheritdoc}
*/
public function isDebug()
public function isDebug(): bool
{
return false;
}
/**
* {@inheritdoc}
*/
public function writeln($messages, int $options = self::OUTPUT_NORMAL)
public function writeln(string|iterable $messages, int $options = self::OUTPUT_NORMAL)
{
// do nothing
}
/**
* {@inheritdoc}
*/
public function write($messages, bool $newline = false, int $options = self::OUTPUT_NORMAL)
public function write(string|iterable $messages, bool $newline = false, int $options = self::OUTPUT_NORMAL)
{
// do nothing
}