update patch 1
This commit is contained in:
+2
-2
@@ -27,7 +27,7 @@ class TrimmedBufferOutput extends Output
|
||||
public function __construct(int $maxLength, ?int $verbosity = self::VERBOSITY_NORMAL, bool $decorated = false, ?OutputFormatterInterface $formatter = null)
|
||||
{
|
||||
if ($maxLength <= 0) {
|
||||
throw new InvalidArgumentException(sprintf('"%s()" expects a strictly positive maxLength. Got %d.', __METHOD__, $maxLength));
|
||||
throw new InvalidArgumentException(\sprintf('"%s()" expects a strictly positive maxLength. Got %d.', __METHOD__, $maxLength));
|
||||
}
|
||||
|
||||
parent::__construct($verbosity, $decorated, $formatter);
|
||||
@@ -53,6 +53,6 @@ class TrimmedBufferOutput extends Output
|
||||
$this->buffer .= \PHP_EOL;
|
||||
}
|
||||
|
||||
$this->buffer = substr($this->buffer, 0 - $this->maxLength);
|
||||
$this->buffer = substr($this->buffer, -$this->maxLength);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user