Application::setup()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 2
Bugs 0 Features 2
Metric Value
c 2
b 0
f 2
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 9.4286
cc 1
eloc 3
nc 1
nop 0
crap 1
1
<?php
2
namespace MtGTutor\Console;
3
4
use MtGTutor\Console\Commands\ServerStatus;
5
use MtGTutor\Console\Commands\SetInfos;
6
use Symfony\Component\Console\Application as BaseApplication;
7
8
/**
9
 * Class Application
10
 * @package MtGTutor\Console
11
 */
12
class Application extends BaseApplication
13
{
14
    /**
15
     * @var string
16
     */
17
    const NAME = 'MtG-Tutor.de Helpers CLI';
18
19
    /**
20
     * @var string
21
     */
22
    const VERSION = '1.0';
23
24
    /**
25
     * Application constructor.
26
     */
27 24
    public function __construct()
28
    {
29
        $name =
30 24
            '        __  ___ __   ______      ______        __                     __    ' . PHP_EOL .
31 24
            '       /  |/  // /_ / ____/     /_  __/__  __ / /_ ____   _____  ____/ /___ ' . PHP_EOL .
32 24
            '      / /|_/ // __// / __ ______ / /  / / / // __// __ \ / ___/ / __  // _ \\' . PHP_EOL .
33 24
            '     / /  / // /_ / /_/ //_____// /  / /_/ // /_ / /_/ // /  _ / /_/ //  __/' . PHP_EOL .
34 24
            '    /_/  /_/ \__/ \____/       /_/   \__,_/ \__/ \____//_/  (_)\__,_/ \___/ ' . PHP_EOL .
35 24
            '                                                                            ' . PHP_EOL .
36 24
            '           __  __       __                            ______ __     ____' . PHP_EOL .
37 24
            '          / / / /___   / /____   ___   _____ _____   / ____// /    /  _/' . PHP_EOL .
38 24
            '         / /_/ // _ \ / // __ \ / _ \ / ___// ___/  / /    / /     / /  ' . PHP_EOL .
39 24
            '        / __  //  __// // /_/ //  __// /   (__  )  / /___ / /___ _/ /   ' . PHP_EOL .
40 24
            '       /_/ /_/ \___//_// .___/ \___//_/   /____/   \____//_____//___/   ' . PHP_EOL .
41 24
            '                      /_/                                               ' . PHP_EOL;
42
43 24
        parent::__construct($name . static::NAME, static::VERSION);
44 24
    }
45
46
    /**
47
     * Setup commands
48
     */
49 24
    public function setup()
50
    {
51 24
        $this->add(new ServerStatus());
52 24
        $this->add(new SetInfos());
53 24
    }
54
}
55