Total Complexity | 4 |
Total Lines | 61 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class EnvListCommand extends Command |
||
11 | { |
||
12 | |||
13 | use CommandValidator; |
||
14 | |||
15 | /** |
||
16 | * The name and signature of the console command. |
||
17 | * |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $signature = 'env:list {key?} {--json}'; |
||
21 | |||
22 | /** |
||
23 | * The console command description. |
||
24 | * |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $description = 'List all variables from an environment file'; |
||
28 | |||
29 | /** |
||
30 | * json format argument |
||
31 | * |
||
32 | * @var bool |
||
33 | */ |
||
34 | protected $json; |
||
35 | |||
36 | /** |
||
37 | * Env object |
||
38 | * |
||
39 | * @var object |
||
40 | */ |
||
41 | protected $env; |
||
42 | |||
43 | /** |
||
44 | * Create a new command instance. |
||
45 | * |
||
46 | * @return void |
||
47 | */ |
||
48 | public function __construct() |
||
51 | } |
||
52 | |||
53 | /** |
||
54 | * Execute the console command. |
||
55 | * |
||
56 | * @return mixed |
||
57 | */ |
||
58 | public function handle() |
||
59 | { |
||
60 | |||
61 | $this->json = (bool)$this->option('json'); |
||
62 | |||
63 | $this->env = new Env(); |
||
64 | $this->line($this->_getEntireEnvContent()); |
||
65 | return; |
||
66 | } |
||
67 | |||
68 | private function _getEntireEnvContent() |
||
71 | } |
||
72 | } |
||
73 |