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

Console::close()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

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