Split a method
This commit is contained in:
parent
d00b5b5e08
commit
55fef914cc
@ -81,13 +81,17 @@ class Cursor
|
||||
/**
|
||||
* Clears all the output from the current line.
|
||||
*/
|
||||
public function clearLine(bool $fromCurrentPosition = false)
|
||||
public function clearLine()
|
||||
{
|
||||
if (true === $fromCurrentPosition) {
|
||||
$this->output->write("\x1b[K");
|
||||
} else {
|
||||
$this->output->write("\x1b[2K");
|
||||
}
|
||||
$this->output->write("\x1b[2K");
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears all the output from the current line after the current position.
|
||||
*/
|
||||
public function clearLineAfter()
|
||||
{
|
||||
$this->output->write("\x1b[K");
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user