Total Complexity | 11 |
Total Lines | 42 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
11 | class Terminal extends AbstractTerminal implements TerminalInterface |
||
12 | { |
||
13 | |||
14 | /** {@inheritdoc} */ |
||
15 | public function width(bool $recheck = false): int |
||
16 | { |
||
17 | if (null !== static::$width && true !== $recheck) { |
||
18 | return static::$width; |
||
19 | } |
||
20 | return |
||
21 | static::$width = $this->getWidth(); |
||
22 | } |
||
23 | |||
24 | |||
25 | /** {@inheritdoc} */ |
||
26 | public function height(bool $recheck = false): int |
||
27 | { |
||
28 | if (null !== static::$height && true !== $recheck) { |
||
29 | return static::$height; |
||
30 | } |
||
31 | return |
||
32 | static::$height = $this->getHeight(); |
||
33 | } |
||
34 | |||
35 | 2 | /** {@inheritdoc} */ |
|
36 | public function supports256Color(bool $recheck = false): bool |
||
37 | 2 | { |
|
38 | 2 | if (null !== static::$supports256Color && true !== $recheck) { |
|
39 | return static::$supports256Color; |
||
40 | } |
||
41 | 2 | return |
|
42 | static::$supports256Color = $this->check256ColorSupport(); |
||
43 | } |
||
44 | |||
45 | /** {@inheritdoc} */ |
||
46 | public function supportsColor(): bool |
||
53 | 2 | } |
|
54 | } |
||
55 |