@@ -27,7 +27,10 @@ discard block |
||
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 |
||
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 |
||
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 | } |