Passed
Push — master ( d2ad69...686350 )
by Kacper
02:44
created

Console::_color()   B

Complexity

Conditions 2
Paths 2

Size

Total Lines 24
Code Lines 20

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 24
ccs 0
cts 20
cp 0
rs 8.9713
cc 2
eloc 20
nc 2
nop 2
crap 6
1
<?php
2
/**
3
 * Highlighter
4
 *
5
 * Copyright (C) 2015, Some right reserved.
6
 *
7
 * @author Kacper "Kadet" Donat <[email protected]>
8
 *
9
 * Contact with author:
10
 * Xmpp: [email protected]
11
 * E-mail: [email protected]
12
 *
13
 * From Kadet with love.
14
 */
15
16
namespace Kadet\Highlighter\Utils;
17
18
19
class Console
20
{
21
    /**
22
     * @var ConsoleHelper
23
     */
24
    private static $_instance;
25
26
    /**
27
     * @return ConsoleHelper
28
     */
29 4
    public static function get() {
30 4
        if(!isset(self::$_instance)) {
31 1
            self::$_instance = new ConsoleHelper();
32 1
        }
33
34 4
        return self::$_instance;
35
    }
36
37 1
    public static function styled($style, $text) {
38 1
        return self::get()->styled($style, $text);
39
    }
40
41 2
    public static function open($style)
42
    {
43 2
        return self::get()->open($style);
44
    }
45
46 2
    public static function close()
47
    {
48 2
        return self::get()->close();
49
    }
50
51 2
    public static function reset() {
52 2
        return self::get()->reset();
53
    }
54
}