Total Complexity | 14 |
Total Lines | 51 |
Duplicated Lines | 0 % |
Coverage | 80% |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
13 | class Terminal extends AbstractColorSupportingTerminal implements TerminalInterface |
||
14 | { |
||
15 | |||
16 | /** {@inheritdoc} */ |
||
17 | 2 | public function width(bool $recheck = false): int |
|
18 | { |
||
19 | 2 | if (null !== static::$width && true !== $recheck) { |
|
20 | 2 | return static::$width; |
|
21 | } |
||
22 | return |
||
23 | 2 | static::$width = $this->getWidth(); |
|
24 | } |
||
25 | |||
26 | |||
27 | /** {@inheritdoc} */ |
||
28 | 2 | public function height(bool $recheck = false): int |
|
29 | { |
||
30 | 2 | if (null !== static::$height && true !== $recheck) { |
|
31 | 2 | return static::$height; |
|
32 | } |
||
33 | return |
||
34 | 2 | static::$height = $this->getHeight(); |
|
35 | } |
||
36 | |||
37 | /** {@inheritdoc} */ |
||
38 | 8 | public function supports256Color(bool $recheck = false): bool |
|
39 | { |
||
40 | 8 | if (null !== static::$supports256Color && true !== $recheck) { |
|
41 | 8 | return static::$supports256Color; |
|
42 | } |
||
43 | return |
||
44 | 1 | static::$supports256Color = $this->has256ColorSupport(); |
|
45 | } |
||
46 | |||
47 | /** {@inheritdoc} */ |
||
48 | 8 | public function supportsColor(bool $recheck = false): bool |
|
55 | } |
||
56 | |||
57 | /** {@inheritdoc} */ |
||
58 | public function setTitle(string $title): string |
||
64 | } |
||
65 | } |
||
66 |