| Total Complexity | 3 |
| Total Lines | 20 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | final class Ansi8Color extends AAnsiColor |
||
| 14 | { |
||
| 15 | /** @var array<string,int>|null */ |
||
| 16 | protected static ?array $colors = null; |
||
| 17 | |||
| 18 | /** @return array<string,int> */ |
||
| 19 | protected static function getColors(): array |
||
| 20 | { |
||
| 21 | if (self::$colors === null) { |
||
| 22 | self::$colors = array_flip(self::COLORS); |
||
|
|
|||
| 23 | } |
||
| 24 | return self::$colors; |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @throws InvalidArgumentException |
||
| 29 | */ |
||
| 30 | protected static function assertIndex(int $index): void |
||
| 33 | } |
||
| 34 | } |
||
| 35 |