Themes   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 12
dl 0
loc 25
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A none() 0 3 1
A prepareThemes() 0 3 1
1
<?php declare(strict_types=1);
2
3
namespace AlecRabbit\ConsoleColour;
4
5
use AlecRabbit\ConsoleColour\Contracts\Color;
6
use AlecRabbit\ConsoleColour\Contracts\Effect;
7
use AlecRabbit\ConsoleColour\Core\AbstractThemes;
8
use AlecRabbit\ConsoleColour\Themes\Contracts\ActionsThemes;
9
use AlecRabbit\ConsoleColour\Themes\Contracts\ColorsThemes;
10
use AlecRabbit\ConsoleColour\Themes\Contracts\EffectsThemes;
11
12
/**
13
 * @method debug(string $text)
14
 * @method comment(string $text)
15
 * @method info(string $text)
16
 * @method error(string $text)
17
 * @method warning(string $text)
18
 * @method yellow(string $text)
19
 * @method green(string $text)
20
 * @method red(string $text)
21
 * @method cyan(string $text)
22
 * @method magenta(string $text)
23
 * @method black(string $text)
24
 * @method blue(string $text)
25
 * @method lightGray(string $text)
26
 * @method darkGray(string $text)
27
 * @method lightRed(string $text)
28
 * @method lightGreen(string $text)
29
 * @method lightYellow(string $text)
30
 * @method lightBlue(string $text)
31
 * @method lightMagenta(string $text)
32
 * @method lightCyan(string $text)
33
 * @method white(string $text)
34
 * @method italic(string $text)
35
 * @method bold(string $text)
36
 * @method dark(string $text)
37
 * @method crossed(string $text)
38
 * @method darkItalic(string $text)
39
 * @method whiteBold(string $text)
40
 * @method underlined(string $text)
41
 * @method underlinedBold(string $text)
42
 * @method underlinedItalic(string $text)
43
 */
44
class Themes extends AbstractThemes implements EffectsThemes, ActionsThemes, ColorsThemes
45
{
46
    public const DARK_ITALIC = 'darkItalic';
47
    public const WHITE_BOLD = 'whiteBold';
48
    public const UNDERLINED_BOLD = 'underlinedBold';
49
    public const UNDERLINED_ITALIC = 'underlinedItalic';
50
51
    public const THEMES = [
52
        self::DARK_ITALIC => [Effect::DARK, Effect::ITALIC],
53
        self::WHITE_BOLD => [Color::WHITE, Effect::BOLD],
54
        self::UNDERLINED_BOLD => [Effect::UNDERLINE, Effect::BOLD],
55
        self::UNDERLINED_ITALIC => [Effect::UNDERLINE, Effect::ITALIC],
56
    ];
57
58 1
    public function none(string $text):string
59
    {
60 1
        return $text;
61
    }
62
63
    /**
64
     * @return array
65
     */
66 7
    protected function prepareThemes(): array
67
    {
68 7
        return \array_merge(static::ACTIONS, static::COLORS, static::EFFECTS, static::THEMES);
69
    }
70
}
71