Screen   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 4
c 1
b 0
f 0
dl 0
loc 30
ccs 6
cts 6
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A eraseFromCursor() 0 3 1
A eraseToCursor() 0 3 1
A clear() 0 3 1
1
<?php declare(strict_types=1);
2
3
namespace AlecRabbit\Cli\Tools;
4
5
use const AlecRabbit\CSI;
6
7
class Screen
8
{
9
    /**
10
     * Clears screen
11
     *
12
     * @return string
13
     */
14 1
    public static function clear(): string
15
    {
16 1
        return CSI . '2J';
17
    }
18
19
    /**
20
     * Clears screen
21
     *
22
     * @return string
23
     */
24 1
    public static function eraseToCursor(): string
25
    {
26 1
        return CSI . '1J';
27
    }
28
29
    /**
30
     * Clears screen
31
     *
32
     * @return string
33
     */
34 1
    public static function eraseFromCursor(): string
35
    {
36 1
        return CSI . '0J';
37
    }
38
}
39