Completed
Push — master ( 1c7ca6...f861b9 )
by Miroslaw
19s queued 13s
created
src/Commands/EnvSetCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         $value = $this->argument('value');
72 72
 
73 73
         if (is_null($value) || !$value) {
74
-            $parts = explode('=', (string)$key, 2);
74
+            $parts = explode('=', (string) $key, 2);
75 75
 
76 76
             if (count($parts) !== 2) {
77 77
                 throw new InvalidArgumentException('No value was set');
@@ -80,15 +80,15 @@  discard block
 block discarded – undo
80 80
             [$key, $value] = $parts;
81 81
         }
82 82
 
83
-        if (Str::contains((string)$key, '=')) {
83
+        if (Str::contains((string) $key, '=')) {
84 84
             throw new InvalidArgumentException("Environment key should not contain '='");
85 85
         }
86 86
 
87
-        if (!$this->isValidKey((string)$key)) {
87
+        if (!$this->isValidKey((string) $key)) {
88 88
             throw new InvalidArgumentException('Invalid argument key');
89 89
         }
90 90
 
91
-        return [(string)$key, (string)$value];
91
+        return [(string) $key, (string) $value];
92 92
     }
93 93
 
94 94
 }
Please login to merge, or discard this patch.
src/Env.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 
28 28
         foreach ($env_lines as $line) {
29 29
             if (strlen(trim($line)) && !(strpos(trim($line), '#') === 0)) {
30
-                [$key, $val] = explode('=', (string)$line);
30
+                [$key, $val] = explode('=', (string) $line);
31 31
                 $this->_envVars[$key] = $this->_stripValue($val);
32 32
             }
33 33
         }
Please login to merge, or discard this patch.
src/Commands/EnvListCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
      */
56 56
     public function handle()
57 57
     {
58
-        $this->json = (bool)$this->option('json');
58
+        $this->json = (bool) $this->option('json');
59 59
 
60 60
         $this->env = new Env();
61 61
         $this->line($this->_getEntireEnvContent());
Please login to merge, or discard this patch.
src/Commands/EnvDelCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,14 +44,14 @@
 block discarded – undo
44 44
         $key = $this->argument('key');
45 45
 
46 46
         if (!is_null($key)) {
47
-            $this->isValidKey((string)$key);
47
+            $this->isValidKey((string) $key);
48 48
         }
49 49
 
50 50
         $env = new Env();
51
-        if (!$env->exists((string)$key)) {
51
+        if (!$env->exists((string) $key)) {
52 52
             $this->info("There is no variable {$key}");
53 53
         } else {
54
-            $env->deleteVariable((string)$key);
54
+            $env->deleteVariable((string) $key);
55 55
             $this->info("Variable '{$key}' has been deleted");
56 56
         }
57 57
     }
Please login to merge, or discard this patch.
src/Commands/EnvGetCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -69,14 +69,14 @@  discard block
 block discarded – undo
69 69
      */
70 70
     public function handle()
71 71
     {
72
-        $this->key = (string)$this->argument('key');
72
+        $this->key = (string) $this->argument('key');
73 73
 
74 74
         if (strlen($this->key)) {
75 75
             $this->isValidKey($this->key);
76 76
         }
77 77
 
78
-        $this->json = (bool)$this->option('json');
79
-        $this->keyValFormat = (bool)$this->option('key-value');
78
+        $this->json = (bool) $this->option('json');
79
+        $this->keyValFormat = (bool) $this->option('key-value');
80 80
         $this->env = new Env();
81 81
 
82 82
         return $this->_printOutput();
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
     {
93 93
         $value = ($this->json) ? json_encode($this->env->getKeyValue($this->key)) : ($this->keyValFormat ? $this->env->getKeyValue($this->key) : $this->env->getValue($this->key));
94 94
 
95
-        return($this->json) ? (string)$value : ($this->keyValFormat ? "{$this->key}={$value[$this->key]}" : (string)$value);
95
+        return($this->json) ? (string) $value : ($this->keyValFormat ? "{$this->key}={$value[$this->key]}" : (string) $value);
96 96
     }
97 97
 
98 98
     private function _printOutput(): void
Please login to merge, or discard this patch.