Total Complexity | 5 |
Total Lines | 48 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
7 | class Line |
||
8 | { |
||
9 | /** |
||
10 | * Erase from the current cursor position (inclusive) to the end of the line |
||
11 | * |
||
12 | * @return string |
||
13 | */ |
||
14 | public static function eraseFromCursor(): string |
||
15 | { |
||
16 | return ESC . '[0K'; |
||
17 | } |
||
18 | |||
19 | /** |
||
20 | * Erase from the beginning of the line up to the current cursor position (inclusive) |
||
21 | * |
||
22 | * @return string |
||
23 | */ |
||
24 | public static function eraseToCursor(): string |
||
25 | { |
||
26 | return ESC . '[1K'; |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * Erase from the beginning of the line up to the current cursor position (inclusive) |
||
31 | * |
||
32 | * @return string |
||
33 | */ |
||
34 | public static function erase(): string |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * @param int $num |
||
41 | * @return string |
||
42 | */ |
||
43 | public static function insert(int $num = 1): string |
||
46 | } |
||
47 | |||
48 | /** |
||
49 | * @param int $num |
||
50 | * @return string |
||
51 | */ |
||
52 | public static function delete(int $num = 1): string |
||
57 |