Application   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 3
dl 0
loc 25
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A getLongVersion() 0 10 2
1
<?php
2
3
namespace Yoghi\Bundle\MaddaBundle\Console;
4
5
/*
6
 * This file is part of the MADDA project.
7
 *
8
 * (c) Stefano Tamagnini <>
9
 *
10
 * This source file is subject to the GPLv3 license that is bundled
11
 * with this source code in the file LICENSE.
12
 */
13
14
use Symfony\Component\Console\Application as BaseApplication;
15
use Yoghi\Bundle\MaddaBundle\Command\CheckSecurityCommand;
16
use Yoghi\Bundle\MaddaBundle\Command\GenerateModelCommand;
17
18
/**
19
 * @author Stefano Tamagnini <>
20
 */
21
class Application extends BaseApplication
22
{
23
    const VERSION = '1.0.0-DEV';
24
25
    /**
26
     * Constructor.
27
     */
28
    public function __construct()
29
    {
30
        error_reporting(-1);
31
        parent::__construct('Madda', self::VERSION);
32
        $this->add(new CheckSecurityCommand());
33
        $this->add(new GenerateModelCommand());
34
    }
35
    public function getLongVersion()
36
    {
37
        $version = parent::getLongVersion().' by <comment>Stefano Tamagnini</comment>';
38
        $commit = '@git-commit@';
39
        if ('@'.'git-commit@' !== $commit) {
40
            $version .= ' ('.substr($commit, 0, 7).')';
41
        }
42
43
        return $version;
44
    }
45
}
46