Passed
Push — master ( 270226...e22eb7 )
by James
06:04 queued 11s
created

ShowVersion   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A handle() 0 6 1
A __construct() 0 3 1
1
<?php
2
3
namespace App\Console\Commands;
4
5
use Illuminate\Console\Command;
6
7
class ShowVersion extends Command
8
{
9
    /**
10
     * The console command description.
11
     *
12
     * @var string
13
     */
14
    protected $description = 'Echoes the current version and some debug info.';
15
    /**
16
     * The name and signature of the console command.
17
     *
18
     * @var string
19
     */
20
    protected $signature = 'csv:version';
21
22
    /**
23
     * Create a new command instance.
24
     *
25
     * @return void
26
     */
27
    public function __construct()
28
    {
29
        parent::__construct();
30
    }
31
32
    /**
33
     * Execute the console command.
34
     *
35
     * @return int
36
     */
37
    public function handle(): int
38
    {
39
        $this->line(sprintf('Firefly III CSV importer v%s', config('csv_importer.version')));
40
        $this->line(sprintf('PHP: %s %s %s', PHP_SAPI, PHP_VERSION, PHP_OS));
41
42
        return 0;
43
    }
44
}
45