Passed
Push — master ( 1fb1d1...2d3750 )
by Luiz Kim
04:12 queued 01:43
created
src/Service/ConfigService.php 1 patch
Braces   +11 added lines, -8 removed lines patch added patch discarded remove patch
@@ -36,8 +36,9 @@  discard block
 block discarded – undo
36 36
             'people' => $people,
37 37
             'configKey' => $key
38 38
         ]);
39
-        if ($config)
40
-            return $config;
39
+        if ($config) {
40
+                    return $config;
41
+        }
41 42
         if ($create) {
42 43
             $config = new Config();
43 44
             $config->setConfigKey($key);
@@ -55,14 +56,16 @@  discard block
 block discarded – undo
55 56
     ) {
56 57
         $config = $this->discoveryConfig($people, $key);
57 58
         $newValue = json_decode($config->getConfigValue(), true) || [];
58
-        if (!is_array($newValue))
59
-            $newValue = [$newValue];
59
+        if (!is_array($newValue)) {
60
+                    $newValue = [$newValue];
61
+        }
60 62
 
61
-        if (is_array($values))
62
-            foreach ($values as $key => $value)
63
+        if (is_array($values)) {
64
+                    foreach ($values as $key => $value)
63 65
                 $newValue[$key] = $value;
64
-        else
65
-            $newValue[] = $values;
66
+        } else {
67
+                    $newValue[] = $values;
68
+        }
66 69
 
67 70
         $config->setConfigValue(json_encode($newValue));
68 71
         $config->setVisibility($visibility);
Please login to merge, or discard this patch.