@@ -35,7 +35,10 @@ discard block |
||
| 35 | 35 | $rule = is_array($ruleName) ? $ruleName : null; |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | - if ($rule == null) return; // No need to go further as rule doesn't exist. |
|
| 38 | + if ($rule == null) { |
|
| 39 | + return; |
|
| 40 | + } |
|
| 41 | + // No need to go further as rule doesn't exist. |
|
| 39 | 42 | // Unset |
| 40 | 43 | if (isset($rule['unset'])) { |
| 41 | 44 | $this->unset_values($object, $rule); |
@@ -67,7 +70,9 @@ discard block |
||
| 67 | 70 | continue; |
| 68 | 71 | } |
| 69 | 72 | $object[$field] = $query->result_array()[0]; |
| 70 | - if (isset($data['refactor'])) $this->run($object[$field], $data['refactor']); |
|
| 73 | + if (isset($data['refactor'])) { |
|
| 74 | + $this->run($object[$field], $data['refactor']); |
|
| 75 | + } |
|
| 71 | 76 | continue; |
| 72 | 77 | } |
| 73 | 78 | $object[$field] = []; |
@@ -79,7 +84,9 @@ discard block |
||
| 79 | 84 | } |
| 80 | 85 | $object[$field][] = $query->result_array()[0]; |
| 81 | 86 | // Recursion |
| 82 | - if (isset($data['refactor'])) $this->run($object[$field][count($object[$field]) - 1], $data['refactor']); |
|
| 87 | + if (isset($data['refactor'])) { |
|
| 88 | + $this->run($object[$field][count($object[$field]) - 1], $data['refactor']); |
|
| 89 | + } |
|
| 83 | 90 | } |
| 84 | 91 | } |
| 85 | 92 | } |