Total Complexity | 4 |
Total Lines | 62 |
Duplicated Lines | 0 % |
Changes | 1 | ||
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 | return $this->_printAllEnvValues(); |
||
|
|||
65 | |||
66 | } |
||
67 | |||
68 | private function _printAllEnvValues() |
||
72 | } |
||
73 | } |
||
74 |
This check looks for function or method calls that always return null and whose return value is used.
The method
getObject()
can return nothing but null, so it makes no sense to use the return value.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.