fix:更新已知bug,优化代码

This commit is contained in:
Ying
2022-11-28 19:11:12 +08:00
parent f6aee95cfc
commit 9445b206a2
1378 changed files with 53759 additions and 20789 deletions

View File

@@ -33,7 +33,7 @@ final class Cursor
/**
* @return $this
*/
public function moveUp(int $lines = 1): self
public function moveUp(int $lines = 1): static
{
$this->output->write(sprintf("\x1b[%dA", $lines));
@@ -43,7 +43,7 @@ final class Cursor
/**
* @return $this
*/
public function moveDown(int $lines = 1): self
public function moveDown(int $lines = 1): static
{
$this->output->write(sprintf("\x1b[%dB", $lines));
@@ -53,7 +53,7 @@ final class Cursor
/**
* @return $this
*/
public function moveRight(int $columns = 1): self
public function moveRight(int $columns = 1): static
{
$this->output->write(sprintf("\x1b[%dC", $columns));
@@ -63,7 +63,7 @@ final class Cursor
/**
* @return $this
*/
public function moveLeft(int $columns = 1): self
public function moveLeft(int $columns = 1): static
{
$this->output->write(sprintf("\x1b[%dD", $columns));
@@ -73,7 +73,7 @@ final class Cursor
/**
* @return $this
*/
public function moveToColumn(int $column): self
public function moveToColumn(int $column): static
{
$this->output->write(sprintf("\x1b[%dG", $column));
@@ -83,7 +83,7 @@ final class Cursor
/**
* @return $this
*/
public function moveToPosition(int $column, int $row): self
public function moveToPosition(int $column, int $row): static
{
$this->output->write(sprintf("\x1b[%d;%dH", $row + 1, $column));
@@ -93,7 +93,7 @@ final class Cursor
/**
* @return $this
*/
public function savePosition(): self
public function savePosition(): static
{
$this->output->write("\x1b7");
@@ -103,7 +103,7 @@ final class Cursor
/**
* @return $this
*/
public function restorePosition(): self
public function restorePosition(): static
{
$this->output->write("\x1b8");
@@ -113,7 +113,7 @@ final class Cursor
/**
* @return $this
*/
public function hide(): self
public function hide(): static
{
$this->output->write("\x1b[?25l");
@@ -123,7 +123,7 @@ final class Cursor
/**
* @return $this
*/
public function show(): self
public function show(): static
{
$this->output->write("\x1b[?25h\x1b[?0c");
@@ -135,7 +135,7 @@ final class Cursor
*
* @return $this
*/
public function clearLine(): self
public function clearLine(): static
{
$this->output->write("\x1b[2K");
@@ -157,7 +157,7 @@ final class Cursor
*
* @return $this
*/
public function clearOutput(): self
public function clearOutput(): static
{
$this->output->write("\x1b[0J");
@@ -169,7 +169,7 @@ final class Cursor
*
* @return $this
*/
public function clearScreen(): self
public function clearScreen(): static
{
$this->output->write("\x1b[2J");