Application   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 27
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 11 1
A getLongVersion() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Thruster\Tool\ProjectGenerator\Console;
6
7
use Symfony\Component\Console\Application as BaseApplication;
8
use Thruster\Tool\ProjectGenerator\Console\Command\CreateRepoCommand;
9
use Thruster\Tool\ProjectGenerator\Console\Command\EnableCICommand;
10
use Thruster\Tool\ProjectGenerator\Console\Command\GenerateCommand;
11
12
/**
13
 * Class Application.
14
 *
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