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