@@ -22,7 +22,10 @@ discard block |
||
| 22 | 22 | } |
| 23 | 23 | function run(array &$object, string $ruleName):void { |
| 24 | 24 | $rule = $this->ci->config->item("refactor_$ruleName"); |
| 25 | - if ($rule == null) return; // No need to go further as rule doesn't exist. |
|
| 25 | + if ($rule == null) { |
|
| 26 | + return; |
|
| 27 | + } |
|
| 28 | + // No need to go further as rule doesn't exist. |
|
| 26 | 29 | |
| 27 | 30 | // Unset |
| 28 | 31 | if (isset($rule['unset'])) { |
@@ -59,7 +62,9 @@ discard block |
||
| 59 | 62 | continue; |
| 60 | 63 | } |
| 61 | 64 | $object[$field] = $query->result_array()[0]; |
| 62 | - if (isset($data['refactor'])) $this->run($object[$field], $data['refactor']); |
|
| 65 | + if (isset($data['refactor'])) { |
|
| 66 | + $this->run($object[$field], $data['refactor']); |
|
| 67 | + } |
|
| 63 | 68 | continue; |
| 64 | 69 | } |
| 65 | 70 | $object[$field] = []; |
@@ -71,7 +76,9 @@ discard block |
||
| 71 | 76 | } |
| 72 | 77 | $object[$field][] = $query->result_array()[0]; |
| 73 | 78 | // Recursion |
| 74 | - if (isset($data['refactor'])) $this->run($object[$field][count($object[$field]) - 1], $data['refactor']); |
|
| 79 | + if (isset($data['refactor'])) { |
|
| 80 | + $this->run($object[$field][count($object[$field]) - 1], $data['refactor']); |
|
| 81 | + } |
|
| 75 | 82 | } |
| 76 | 83 | } |
| 77 | 84 | } |