ShowVersion   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A handle() 0 6 1
A __construct() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
/**
5
 * ShowVersion.php
6
 * Copyright (c) 2020 [email protected].
7
 *
8
 * This file is part of the Firefly III bunq importer
9
 * (https://github.com/firefly-iii/bunq-importer).
10
 *
11
 * This program is free software: you can redistribute it and/or modify
12
 * it under the terms of the GNU Affero General Public License as
13
 * published by the Free Software Foundation, either version 3 of the
14
 * License, or (at your option) any later version.
15
 *
16
 * This program is distributed in the hope that it will be useful,
17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
 * GNU Affero General Public License for more details.
20
 *
21
 * You should have received a copy of the GNU Affero General Public License
22
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
23
 */
24
25
namespace App\Console\Commands;
26
27
use Illuminate\Console\Command;
28
29
class ShowVersion extends Command
30
{
31
    /**
32
     * The console command description.
33
     *
34
     * @var string
35
     */
36
    protected $description = 'Echoes the current version and some debug info.';
37
    /**
38
     * The name and signature of the console command.
39
     *
40
     * @var string
41
     */
42
    protected $signature = 'bunq:version';
43
44
    /**
45
     * Create a new command instance.
46
     *
47
     * @return void
48
     */
49
    public function __construct()
50
    {
51
        parent::__construct();
52
    }
53
54
    /**
55
     * Execute the console command.
56
     *
57
     * @return int
58
     */
59
    public function handle(): int
60
    {
61
        $this->line(sprintf('Firefly III bunq importer v%s', config('bunq.version')));
62
        $this->line(sprintf('PHP: %s %s %s', PHP_SAPI, PHP_VERSION, PHP_OS));
63
64
        return 0;
65
    }
66
}
67