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