Passed
Push — master ( 122326...34fd24 )
by Aurimas
14:24
created

Application::getDefinition()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 7
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
3
namespace Thruster\Tool\ProjectGenerator\Console;
4
5
use Symfony\Component\Console\Application as BaseApplication;
6
use Symfony\Component\Console\Input\InputInterface;
7
use Thruster\Tool\ProjectGenerator\Console\Command\CreateRepoCommand;
8
use Thruster\Tool\ProjectGenerator\Console\Command\EnableCICommand;
9
use Thruster\Tool\ProjectGenerator\Console\Command\GenerateCommand;
10
11
/**
12
 * Class Application
13
 *
14
 * @package Thruster\Tool\ProjectGenerator
15
 * @author  Aurimas Niekis <[email protected]>
16
 */
17
class Application extends BaseApplication
18
{
19
    /**
20
     * @inheritDoc
21
     */
22
    public function __construct()
23
    {
24
        error_reporting(-1);
25
26
        parent::__construct('Thruster Project Generator', '1.0');
27
28
        $this->add(new GenerateCommand());
29
        $this->add(new CreateRepoCommand());
30
        $this->add(new EnableCICommand());
31
32
        $this->setDefaultCommand('main');
33
    }
34
35
    /**
36
     * @inheritDoc
37
     */
38
    public function getLongVersion()
39
    {
40
        $version = parent::getLongVersion() .
41
            ' by <comment>Aurimas Niekis</comment>';
42
43
        return $version;
44
    }
45
46
}
47