Passed
Push — master ( f8faaa...aedd7e )
by Luiz Kim
02:31
created
src/Service/ConfigService.php 1 patch
Braces   +11 added lines, -8 removed lines patch added patch discarded remove patch
@@ -35,8 +35,9 @@  discard block
 block discarded – undo
35 35
             'people' => $people,
36 36
             'configKey' => $key
37 37
         ]);
38
-        if ($config)
39
-            return $config;
38
+        if ($config) {
39
+                    return $config;
40
+        }
40 41
         if ($create) {
41 42
             $config = new Config();
42 43
             $config->setConfigKey($key);
@@ -49,14 +50,16 @@  discard block
 block discarded – undo
49 50
     {
50 51
         $config = $this->discoveryConfig($people, $key);
51 52
         $newValue = json_decode($config->getConfigValue()) || [];
52
-        if (!is_array($newValue))
53
-            $newValue = [$newValue];
53
+        if (!is_array($newValue)) {
54
+                    $newValue = [$newValue];
55
+        }
54 56
 
55
-        if (is_array($values))
56
-            foreach ($values as $key => $value)
57
+        if (is_array($values)) {
58
+                    foreach ($values as $key => $value)
57 59
                 $newValue[$key] = $value;
58
-        else
59
-            $newValue[] = $values;
60
+        } else {
61
+                    $newValue[] = $values;
62
+        }
60 63
 
61 64
         $config->setConfigValue(json_encode($newValue));
62 65
         $this->manager->persist($config);
Please login to merge, or discard this patch.