mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-19 13:17:50 +09:00
Update dependencies
This commit is contained in:
35
vendor/symfony/console/Cursor.php
vendored
35
vendor/symfony/console/Cursor.php
vendored
@@ -18,7 +18,8 @@ use Symfony\Component\Console\Output\OutputInterface;
|
||||
*/
|
||||
final class Cursor
|
||||
{
|
||||
private $output;
|
||||
private OutputInterface $output;
|
||||
/** @var resource */
|
||||
private $input;
|
||||
|
||||
/**
|
||||
@@ -33,7 +34,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 +44,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 +54,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 +64,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 +74,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 +84,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 +94,7 @@ final class Cursor
|
||||
/**
|
||||
* @return $this
|
||||
*/
|
||||
public function savePosition(): self
|
||||
public function savePosition(): static
|
||||
{
|
||||
$this->output->write("\x1b7");
|
||||
|
||||
@@ -103,7 +104,7 @@ final class Cursor
|
||||
/**
|
||||
* @return $this
|
||||
*/
|
||||
public function restorePosition(): self
|
||||
public function restorePosition(): static
|
||||
{
|
||||
$this->output->write("\x1b8");
|
||||
|
||||
@@ -113,7 +114,7 @@ final class Cursor
|
||||
/**
|
||||
* @return $this
|
||||
*/
|
||||
public function hide(): self
|
||||
public function hide(): static
|
||||
{
|
||||
$this->output->write("\x1b[?25l");
|
||||
|
||||
@@ -123,7 +124,7 @@ final class Cursor
|
||||
/**
|
||||
* @return $this
|
||||
*/
|
||||
public function show(): self
|
||||
public function show(): static
|
||||
{
|
||||
$this->output->write("\x1b[?25h\x1b[?0c");
|
||||
|
||||
@@ -135,7 +136,7 @@ final class Cursor
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function clearLine(): self
|
||||
public function clearLine(): static
|
||||
{
|
||||
$this->output->write("\x1b[2K");
|
||||
|
||||
@@ -157,7 +158,7 @@ final class Cursor
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function clearOutput(): self
|
||||
public function clearOutput(): static
|
||||
{
|
||||
$this->output->write("\x1b[0J");
|
||||
|
||||
@@ -169,7 +170,7 @@ final class Cursor
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function clearScreen(): self
|
||||
public function clearScreen(): static
|
||||
{
|
||||
$this->output->write("\x1b[2J");
|
||||
|
||||
@@ -183,11 +184,7 @@ final class Cursor
|
||||
{
|
||||
static $isTtySupported;
|
||||
|
||||
if (null === $isTtySupported && \function_exists('proc_open')) {
|
||||
$isTtySupported = (bool) @proc_open('echo 1 >/dev/null', [['file', '/dev/tty', 'r'], ['file', '/dev/tty', 'w'], ['file', '/dev/tty', 'w']], $pipes);
|
||||
}
|
||||
|
||||
if (!$isTtySupported) {
|
||||
if (!$isTtySupported ??= '/' === \DIRECTORY_SEPARATOR && stream_isatty(\STDOUT)) {
|
||||
return [1, 1];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user