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

Console   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 5
Bugs 0 Features 0
Metric Value
wmc 6
c 5
b 0
f 0
lcom 1
cbo 1
dl 0
loc 36
ccs 13
cts 13
cp 1
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A get() 0 7 2
A styled() 0 3 1
A open() 0 4 1
A close() 0 4 1
A reset() 0 3 1
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
}