Passed
Push — master ( 383648...1bfd0d )
by Fatih
03:42
created
src/Encryptable.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,8 +29,9 @@  discard block
 block discarded – undo
29 29
     {
30 30
         $decrypt = $this->decryptValue($value);
31 31
 
32
-        if (!is_array($decrypt) && $this->is_json($decrypt))
33
-            $decrypt = json_decode($decrypt);
32
+        if (!is_array($decrypt) && $this->is_json($decrypt)) {
33
+                    $decrypt = json_decode($decrypt);
34
+        }
34 35
 
35 36
         return $decrypt;
36 37
     }
@@ -94,8 +95,9 @@  discard block
 block discarded – undo
94 95
     {
95 96
         $attributes = parent::attributesToArray();
96 97
 
97
-        if (!config('encryption.encrypt'))
98
-            return $attributes;
98
+        if (!config('encryption.encrypt')) {
99
+                    return $attributes;
100
+        }
99 101
 
100 102
         foreach ($this->encrypted ?? [] as $key) {
101 103
             if (isset($attributes[$key])) {
Please login to merge, or discard this patch.