| 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 | 2 | public function width(bool $recheck = false): int |
|
| 16 | { |
||
| 17 | 2 | if (null !== static::$width && true !== $recheck) { |
|
| 18 | 2 | return static::$width; |
|
| 19 | } |
||
| 20 | return |
||
| 21 | 2 | static::$width = $this->getWidth(); |
|
| 22 | } |
||
| 23 | |||
| 24 | |||
| 25 | /** {@inheritdoc} */ |
||
| 26 | 2 | public function height(bool $recheck = false): int |
|
| 27 | { |
||
| 28 | 2 | if (null !== static::$height && true !== $recheck) { |
|
| 29 | 2 | return static::$height; |
|
| 30 | } |
||
| 31 | return |
||
| 32 | 2 | static::$height = $this->getHeight(); |
|
| 33 | } |
||
| 34 | |||
| 35 | /** {@inheritdoc} */ |
||
| 36 | 75 | public function supports256Color(bool $recheck = false): bool |
|
| 37 | { |
||
| 38 | 75 | if (null !== static::$supports256Color && true !== $recheck) { |
|
| 39 | 74 | return static::$supports256Color; |
|
| 40 | } |
||
| 41 | return |
||
| 42 | 1 | static::$supports256Color = $this->check256ColorSupport(); |
|
| 43 | } |
||
| 44 | |||
| 45 | /** {@inheritdoc} */ |
||
| 46 | 75 | public function supportsColor(): bool |
|
| 53 | } |
||
| 54 | } |
||
| 55 |