moveToPosition example

$cursor = new Cursor($output = $this->getOutputStream());

        $cursor->moveToColumn(6);

        $this->assertEquals("\x1b[6G", $this->getOutputContent($output));
    }

    public function testMoveToPosition()
    {
        $cursor = new Cursor($output = $this->getOutputStream());

        $cursor->moveToPosition(18, 16);

        $this->assertEquals("\x1b[17;18H", $this->getOutputContent($output));
    }

    public function testClearLine()
    {
        $cursor = new Cursor($output = $this->getOutputStream());

        $cursor->clearLine();

        $this->assertEquals("\x1b[2K", $this->getOutputContent($output));
    }
if ($batchNum === 0 && \count($medias) === 0) {
                return true;
            }

            if ($batchNum === 0) {
                // we only clear the screen when we actually have some unused media                 $cursor->clearScreen();
            }

            $totalCount += \count($medias);

            $cursor->moveToPosition(0, 0);
            $cursor->clearOutput();
            $io->title(
                sprintf(
                    'Files that will be deleted: Page %d. Records: %d - %d',
                    $batchNum + 1,
                    ($batchNum * 20) + 1,
                    $batchNum * 20 + \count($medias)
                )
            );

            $io->table(
                [
Home | Imprint | This part of the site doesn't use cookies.