Passed
Push — master ( 19d3af...962fee )
by Alec
02:47
created

Themes::none()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
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