Passed
Push — master ( 81a8b5...62ae3a )
by Francis
01:15
created
libraries/RefactorCI.php 1 patch
Braces   +10 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,7 +27,10 @@  discard block
 block discarded – undo
27 27
    */
28 28
   function run(array &$object, string $ruleName):void {
29 29
     $rule = $this->ci->config->item("refactor_$ruleName");
30
-    if ($rule == null) return; // No need to go further as rule doesn't exist.
30
+    if ($rule == null) {
31
+        return;
32
+    }
33
+    // No need to go further as rule doesn't exist.
31 34
     // Unset
32 35
     if (isset($rule['unset'])) {
33 36
       $this->unset_values($object, $rule);
@@ -55,7 +58,9 @@  discard block
 block discarded – undo
55 58
             continue;
56 59
           }
57 60
           $object[$field] = $query->result_array()[0];
58
-          if (isset($data['refactor'])) $this->run($object[$field], $data['refactor']);
61
+          if (isset($data['refactor'])) {
62
+              $this->run($object[$field], $data['refactor']);
63
+          }
59 64
           continue;
60 65
         }
61 66
         $object[$field] = [];
@@ -67,7 +72,9 @@  discard block
 block discarded – undo
67 72
           }
68 73
           $object[$field][] = $query->result_array()[0];
69 74
           // Recursion
70
-          if (isset($data['refactor'])) $this->run($object[$field][count($object[$field]) - 1], $data['refactor']);
75
+          if (isset($data['refactor'])) {
76
+              $this->run($object[$field][count($object[$field]) - 1], $data['refactor']);
77
+          }
71 78
         }
72 79
       }
73 80
     }
Please login to merge, or discard this patch.