VersionCommand::handle()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
namespace Spinen\Version\Commands;
4
5
use Illuminate\Console\Command;
6
use Spinen\Version\Version;
7
8
/**
9
 * Class VersionCommand
10
 *
11
 * @package Spinen\Version\Commands
12
 */
13
class VersionCommand extends Command
14
{
15
    /**
16
     * The name and signature of the console command.
17
     *
18
     * @var string
19
     */
20
    protected $signature = 'version';
21
22
    /**
23
     * The console command description.
24
     *
25
     * @var string
26
     */
27
    protected $description = 'Display version of the application.';
28
29
    /**
30
     * The Version instance
31
     *
32
     * @var Version
33
     */
34
    protected $version;
35
36
    /**
37
     * Create a new command instance.
38
     *
39
     * @param Version $version
40
     */
41 7
    public function __construct(Version $version)
42
    {
43 7
        parent::__construct();
44
45 7
        $this->version = $version;
46 7
    }
47
48
    /**
49
     * Execute the console command.
50
     *
51
     * @return void
52
     */
53 1
    public function handle()
54
    {
55 1
        $this->info($this->version->version);
56 1
    }
57
}
58