Total Complexity | 3 |
Total Lines | 57 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php declare(strict_types = 1); |
||
7 | class Background extends Modifier |
||
8 | { |
||
9 | public const BLACK = 'black'; |
||
10 | |||
11 | public const RED = 'red'; |
||
12 | |||
13 | public const GREEN = 'green'; |
||
14 | |||
15 | public const YELLOW = 'yellow'; |
||
16 | |||
17 | public const BLUE = 'blue'; |
||
18 | |||
19 | public const MAGENTA = 'magenta'; |
||
20 | |||
21 | public const CYAN = 'cyan'; |
||
22 | |||
23 | public const LIGHT_GRAY = 'light_gray'; |
||
24 | |||
25 | public static $background_colors = [ |
||
26 | self::BLACK => '40', |
||
27 | self::RED => '41', |
||
28 | self::GREEN => '42', |
||
29 | self::YELLOW => '43', |
||
30 | self::BLUE => '44', |
||
31 | self::MAGENTA => '45', |
||
32 | self::CYAN => '46', |
||
33 | self::LIGHT_GRAY => '47', |
||
34 | ]; |
||
35 | |||
36 | /** |
||
37 | * Returns specific symbol for output modification in console |
||
38 | * |
||
39 | * @param string $color |
||
40 | * |
||
41 | * @return string|null |
||
42 | */ |
||
43 | public static function getSymbol(string $color): ?string |
||
50 | } |
||
51 | |||
52 | /** |
||
53 | * Method validates whether ot not color is valid |
||
54 | * |
||
55 | * @param string $color |
||
56 | * |
||
57 | * @return bool |
||
58 | */ |
||
59 | public static function isValid(string $color): bool |
||
64 | } |
||
65 | } |