Passed
Push — 1.2 ( 076ed1...b48793 )
by Quentin
23:19 queued 16:14
created
src/Repositories/Behaviors/HandleFieldsGroups.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
             if ($object->$group) {
39 39
                 $decoded_fields = json_decode($object->$group, true);
40 40
                 // In case that some field read the value through $item->$name
41
-                foreach($decoded_fields as $field_name => $field_value) {
41
+                foreach ($decoded_fields as $field_name => $field_value) {
42 42
                     $object->setAttribute($field_name, $field_value);
43 43
                 }
44 44
                 $fields = array_merge($fields, $decoded_fields);
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 
51 51
     protected function handleFieldsGroups($fields) {
52 52
         foreach ($this->fieldsGroups as $group => $groupFields) {
53
-            $fields[$group] = Arr::where(Arr::only($fields, $groupFields), function ($value, $key) {
53
+            $fields[$group] = Arr::where(Arr::only($fields, $groupFields), function($value, $key) {
54 54
                 return !empty($value);
55 55
             });
56 56
             Arr::forget($fields, $groupFields);
Please login to merge, or discard this patch.