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