Total Complexity | 12 |
Total Lines | 45 |
Duplicated Lines | 0 % |
Coverage | 89.47% |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
17 | class Terminal extends AbstractXTermTerminal implements StaticTerminalInterface |
||
18 | { |
||
19 | |||
20 | /** {@inheritdoc} */ |
||
21 | 1 | public static function setTitle(string $title): string |
|
22 | { |
||
23 | return |
||
24 | 1 | static::isXterm()? "\033]0;{$title}\007" : ''; |
|
25 | } |
||
26 | |||
27 | /** {@inheritdoc} */ |
||
28 | 6 | public static function width(bool $recheck = false): int |
|
29 | { |
||
30 | 6 | if (null !== static::$width && true !== $recheck) { |
|
31 | 6 | return static::$width; |
|
32 | } |
||
33 | return |
||
34 | 2 | static::$width = static::getWidth(); |
|
35 | } |
||
36 | |||
37 | /** {@inheritdoc} */ |
||
38 | 6 | public static function height(bool $recheck = false): int |
|
39 | { |
||
40 | 6 | if (null !== static::$height && true !== $recheck) { |
|
41 | 6 | return static::$height; |
|
42 | } |
||
43 | return |
||
44 | 2 | static::$height = static::getHeight(); |
|
45 | } |
||
46 | |||
47 | /** {@inheritdoc} */ |
||
48 | 5 | public static function colorSupport($stream = null): int |
|
62 | } |
||
63 | } |
||
64 |