Passed
Push — master ( 5bf0da...664238 )
by Miroslaw
04:08
created
src/Commands/EnvGetCommand.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -45,16 +45,18 @@
 block discarded – undo
45 45
     {
46 46
         $key = $this->argument('key');
47 47
 
48
-        if (!is_null($key))
49
-            $this->isValidKey((string)$key);
48
+        if (!is_null($key)) {
49
+                    $this->isValidKey((string)$key);
50
+        }
50 51
 
51 52
         $json = $this->option('json');
52 53
         $keyValFormat = $this->option('key-value');
53 54
 
54 55
         $env = new Env();
55 56
 
56
-        if (is_null($key))
57
-            $this->line(($json) ? json_encode($env->getVariables()) : $env->getEnvContent());
57
+        if (is_null($key)) {
58
+                    $this->line(($json) ? json_encode($env->getVariables()) : $env->getEnvContent());
59
+        }
58 60
 
59 61
         if (!is_null($key) && $env->exists($key)) {
60 62
             $value = ($json) ? json_encode($env->getKeyValue($key)) : ($keyValFormat ? $env->getKeyValue($key) : $env->getValue($key));
Please login to merge, or discard this patch.
src/Commands/EnvDelCommand.php 1 patch
Braces   +6 added lines, -5 removed lines patch added patch discarded remove patch
@@ -46,13 +46,14 @@
 block discarded – undo
46 46
     {
47 47
         $key = $this->argument('key');
48 48
 
49
-        if (!is_null($key))
50
-            $this->isValidKey((string)$key);
49
+        if (!is_null($key)) {
50
+                    $this->isValidKey((string)$key);
51
+        }
51 52
 
52 53
         $env = new Env();
53
-        if (!$env->exists((string)$key))
54
-            $this->info("There is no variable {$key}");
55
-        else
54
+        if (!$env->exists((string)$key)) {
55
+                    $this->info("There is no variable {$key}");
56
+        } else
56 57
         {
57 58
             $env->deleteVariable((string)$key);
58 59
             $this->info("Variable '{$key}' has been deleted");
Please login to merge, or discard this patch.