Test Failed
Pull Request — master (#448)
by
unknown
05:18
created

VersionCommand::configure()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 0
cts 7
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
/*
3
 * This file is part of the Magallanes package.
4
 *
5
 * (c) Andrés Montañez <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Mage\Command\BuiltIn;
12
13
use Mage\Mage;
14
use Symfony\Component\Console\Input\InputInterface;
15
use Symfony\Component\Console\Output\OutputInterface;
16
use Mage\Command\AbstractCommand;
17
18
/**
19
 * Version Command, return the current version of Magallanes
20
 *
21
 * @author Andrés Montañez <[email protected]>
22
 */
23
class VersionCommand extends AbstractCommand
24
{
25
    /**
26
     * Configure the Command
27
     */
28
    protected function configure()
29
    {
30
        $this
31
            ->setName('version')
32
            ->setDescription('Get the version of Magallanes')
33
        ;
34
    }
35
36
    /**
37
     * Executes the Command
38
     *
39
     * @param InputInterface $input
40
     * @param OutputInterface $output
41
     * @return int
42
     */
43
    protected function execute(InputInterface $input, OutputInterface $output)
44
    {
45
        $output->writeln(sprintf('Magallanes v%s [%s]', Mage::VERSION, Mage::CODENAME));
46
47
        return 0;
48
    }
49
}
50