| Total Complexity | 3 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types = 1); |
||
| 7 | class Option extends Modifier |
||
| 8 | { |
||
| 9 | public CONST UNDERLINE = 'underline'; |
||
| 10 | |||
| 11 | public CONST BLINK = 'blink'; |
||
| 12 | |||
| 13 | public CONST REVERSE = 'reverse'; |
||
| 14 | |||
| 15 | public CONST HIDDEN = 'hidden'; |
||
| 16 | |||
| 17 | public static $options = [ |
||
| 18 | self::UNDERLINE => '4', |
||
| 19 | self::BLINK => '5', |
||
| 20 | self::REVERSE => '7', |
||
| 21 | self::HIDDEN => '8', |
||
| 22 | ]; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Returns specific symbol for output modification in console |
||
| 26 | * |
||
| 27 | * @param string $option |
||
| 28 | * |
||
| 29 | * @return string|null |
||
| 30 | */ |
||
| 31 | public static function getSymbol(string $option): ?string |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Method validates whether ot not color is valid |
||
| 42 | * |
||
| 43 | * @param string $option |
||
| 44 | * |
||
| 45 | * @return bool |
||
| 46 | */ |
||
| 47 | public static function isValid(string $option): bool |
||
| 52 | } |
||
| 53 | } |