1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Irfa\RajaOngkir\Console\Commands; |
4
|
|
|
|
5
|
|
|
use Illuminate\Console\Command; |
|
|
|
|
6
|
|
|
use Irfa\RajaOngkir\Ongkir\Ongkir as RajaOngkir; |
7
|
|
|
|
8
|
|
|
class ROInfoPackage extends Command |
9
|
|
|
{ |
10
|
|
|
/** |
11
|
|
|
* The name and signature of the console command. |
12
|
|
|
* |
13
|
|
|
* @var string |
14
|
|
|
*/ |
15
|
|
|
protected $signature = 'raja-ongkir {cmd}'; |
16
|
|
|
|
17
|
|
|
/** |
18
|
|
|
* The console command description. |
19
|
|
|
* |
20
|
|
|
* @var string |
21
|
|
|
*/ |
22
|
|
|
protected $description = 'Option'; |
23
|
|
|
|
24
|
|
|
/** |
25
|
|
|
* Create a new command instance. |
26
|
|
|
* |
27
|
|
|
* @return void |
28
|
|
|
*/ |
29
|
|
|
public function __construct() |
30
|
|
|
{ |
31
|
|
|
parent::__construct(); |
32
|
|
|
} |
33
|
|
|
|
34
|
|
|
/** |
35
|
|
|
* Execute the console command. |
36
|
|
|
* |
37
|
|
|
* @return mixed |
38
|
|
|
*/ |
39
|
|
|
public function handle() |
40
|
|
|
{ |
41
|
|
|
if($this->argument('cmd') == "version" || $this->argument('cmd') == "v" ){ |
42
|
|
|
$this->informasi(); |
43
|
|
|
} elseif($this->argument('cmd') == "key"){ |
44
|
|
|
$this->line('Api Key: '.config('irfa.rajaongkir.api_key')); |
|
|
|
|
45
|
|
|
} elseif($this->argument('cmd') == "type"){ |
46
|
|
|
$this->line('Account Type: '.config('irfa.rajaongkir.account_type')); |
47
|
|
|
} elseif($this->argument('cmd') == "info"){ |
48
|
|
|
$this->informasi(); |
49
|
|
|
$this->line('-------------------------------------------------------------------------------'); |
50
|
|
|
$this->line('Account Type: '.config('irfa.rajaongkir.account_type')); |
51
|
|
|
$this->line('Api Key: '.config('irfa.rajaongkir.api_key')); |
52
|
|
|
$this->line('Api Version: '.config('irfa.rajaongkir.api_version')); |
53
|
|
|
$this->line('Province Table: '.config('irfa.rajaongkir.province_table')); |
54
|
|
|
$this->line('City Table: '.config('irfa.rajaongkir.city_table')); |
55
|
|
|
$this->line('Subdistrict Table: '.config('irfa.rajaongkir.subdistrict_table')); |
56
|
|
|
$this->line('Cache Type: '.config('irfa.rajaongkir.cache_type')); |
57
|
|
|
} else{ |
58
|
|
|
$this->line('<fg=yellow>valid input is version, key, type, info,and v.'); |
59
|
|
|
} |
60
|
|
|
} |
61
|
|
|
|
62
|
|
|
private function informasi(){ |
63
|
|
|
$this->line(" |_ _| / _| | __ \ (_) / __ \ | | (_) |
64
|
|
|
| | _ __| |_ __ _ ______ | |__) |__ _ _ __ _ | | | |_ __ __ _| | ___ _ __ |
65
|
|
|
| | | '__| _/ _` | |______| | _ // _` | |/ _` | | | | | '_ \ / _` | |/ / | '__| |
66
|
|
|
_| |_| | | || (_| | | | \ \ (_| | | (_| | | |__| | | | | (_| | <| | | |
67
|
|
|
|_____|_| |_| \__,_| |_| \_\__,_| |\__,_| \____/|_| |_|\__, |_|\_\_|_| |
68
|
|
|
_/ | __/ | |
69
|
|
|
|__/ |___/ ".PHP_EOL); |
70
|
|
|
|
71
|
|
|
$this->line('-------------------------------------------------------------------------------'); |
72
|
|
|
$this->line('Raja Ongkir'); |
73
|
|
|
$this->line('Version 1.6.0 (2020)'); |
74
|
|
|
$this->line('https://github.com/irfaardy/raja-ongkir'); |
75
|
|
|
} |
76
|
|
|
|
77
|
|
|
} |
78
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths