VersionCommand   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 17
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setupSubCommands() 0 3 1
A init() 0 4 1
A execute() 0 4 1
1
<?php namespace Tarsana\Command\Commands;
2
3
use Tarsana\Command\SubCommand;
4
5
class VersionCommand extends SubCommand {
6
7
    protected function init()
8
    {
9
        $this->name('Version')
10
             ->description('Shows the version.');
11
    }
12
13
    protected function setupSubCommands()
14
    {
15
        return $this;
16
    }
17
18
    protected function execute()
19
    {
20
        $command = $this->parent();
21
        $this->console()->line("<info>{$command->name()}</info> version <info>{$command->version()}</info>");
22
    }
23
}
24