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 CSV importer |
8
|
|
|
* (https://github.com/firefly-iii/csv-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
|
|
|
/** |
29
|
|
|
* Class ShowVersion |
30
|
|
|
*/ |
31
|
|
|
class ShowVersion extends Command |
32
|
|
|
{ |
33
|
|
|
/** |
34
|
|
|
* The console command description. |
35
|
|
|
* |
36
|
|
|
* @var string |
37
|
|
|
*/ |
38
|
|
|
protected $description = 'Echoes the current version and some debug info.'; |
39
|
|
|
/** |
40
|
|
|
* The name and signature of the console command. |
41
|
|
|
* |
42
|
|
|
* @var string |
43
|
|
|
*/ |
44
|
|
|
protected $signature = 'csv:version'; |
45
|
|
|
|
46
|
|
|
/** |
47
|
|
|
* Execute the console command. |
48
|
|
|
* |
49
|
|
|
* @return int |
50
|
|
|
*/ |
51
|
|
|
public function handle(): int |
52
|
|
|
{ |
53
|
|
|
$this->line(sprintf('Firefly III CSV importer v%s', config('csv_importer.version'))); |
54
|
|
|
$this->line(sprintf('PHP: %s %s %s', PHP_SAPI, PHP_VERSION, PHP_OS)); |
55
|
|
|
|
56
|
|
|
return 0; |
57
|
|
|
} |
58
|
|
|
} |
59
|
|
|
|