@@ -179,8 +179,7 @@ discard block |
||
| 179 | 179 | if (! empty($name)) |
| 180 | 180 | { |
| 181 | 181 | $this->from = [$email, $name]; |
| 182 | - } |
|
| 183 | - else |
|
| 182 | + } else |
|
| 184 | 183 | { |
| 185 | 184 | $this->from = $email; |
| 186 | 185 | } |
@@ -231,8 +230,7 @@ discard block |
||
| 231 | 230 | if (! empty($name)) |
| 232 | 231 | { |
| 233 | 232 | $this->reply_to = [$email, $name]; |
| 234 | - } |
|
| 235 | - else |
|
| 233 | + } else |
|
| 236 | 234 | { |
| 237 | 235 | $this->reply_to = $email; |
| 238 | 236 | } |
@@ -155,8 +155,7 @@ |
||
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | $output .= "ID: {$item->id}, Mailer: {$item->mailer}. \n"; |
| 158 | - } |
|
| 159 | - catch (\Exception $e) |
|
| 158 | + } catch (\Exception $e) |
|
| 160 | 159 | { |
| 161 | 160 | $output .= "[EXCEPTION] ". $e->getMessage() ."\n"; |
| 162 | 161 | } |
@@ -294,8 +294,12 @@ discard block |
||
| 294 | 294 | |
| 295 | 295 | // Check our auto-set features and make sure they are part of |
| 296 | 296 | // our observer system. |
| 297 | - if ($this->set_created === true) array_unshift($this->before_insert, 'created_on'); |
|
| 298 | - if ($this->set_modified === true) array_unshift($this->before_update, 'modified_on'); |
|
| 297 | + if ($this->set_created === true) { |
|
| 298 | + array_unshift($this->before_insert, 'created_on'); |
|
| 299 | + } |
|
| 300 | + if ($this->set_modified === true) { |
|
| 301 | + array_unshift($this->before_update, 'modified_on'); |
|
| 302 | + } |
|
| 299 | 303 | |
| 300 | 304 | // Make sure our temp return type is correct. |
| 301 | 305 | $this->temp_return_type = $this->return_type; |
@@ -303,8 +307,7 @@ discard block |
||
| 303 | 307 | // Make sure our database is loaded |
| 304 | 308 | if (!is_null($db)) { |
| 305 | 309 | $this->db = $db; |
| 306 | - } |
|
| 307 | - else { |
|
| 310 | + } else { |
|
| 308 | 311 | // Auto Init the damn database.... |
| 309 | 312 | $this->load->database(); |
| 310 | 313 | } |
@@ -312,8 +315,7 @@ discard block |
||
| 312 | 315 | // Do we have a form_validation library? |
| 313 | 316 | if (! is_null($form_validation)) { |
| 314 | 317 | $this->form_validation = $form_validation; |
| 315 | - } |
|
| 316 | - else { |
|
| 318 | + } else { |
|
| 317 | 319 | $this->load->library('form_validation'); |
| 318 | 320 | } |
| 319 | 321 | |
@@ -700,7 +702,9 @@ discard block |
||
| 700 | 702 | */ |
| 701 | 703 | public function update_many($ids, $data, $skip_validation = null) |
| 702 | 704 | { |
| 703 | - if (!is_array($ids) || count($ids) == 0) return NULL; |
|
| 705 | + if (!is_array($ids) || count($ids) == 0) { |
|
| 706 | + return NULL; |
|
| 707 | + } |
|
| 704 | 708 | |
| 705 | 709 | $skip_validation = is_null($skip_validation) ? $this->skip_validation : $skip_validation; |
| 706 | 710 | |
@@ -897,7 +901,9 @@ discard block |
||
| 897 | 901 | |
| 898 | 902 | public function delete_many($ids) |
| 899 | 903 | { |
| 900 | - if (!is_array($ids) || count($ids) == 0) return NULL; |
|
| 904 | + if (!is_array($ids) || count($ids) == 0) { |
|
| 905 | + return NULL; |
|
| 906 | + } |
|
| 901 | 907 | |
| 902 | 908 | $ids = $this->trigger('before_delete', ['ids' => $ids, 'method' => 'delete_many'] ); |
| 903 | 909 | |
@@ -44,8 +44,7 @@ discard block |
||
| 44 | 44 | if ( is_array( $config['modules_locations'] ) ) |
| 45 | 45 | { |
| 46 | 46 | Modules::$locations = $config['modules_locations']; |
| 47 | - } |
|
| 48 | - else |
|
| 47 | + } else |
|
| 49 | 48 | { |
| 50 | 49 | Modules::$locations = array( APPPATH . 'modules/' => '../modules/' ); |
| 51 | 50 | } |
@@ -122,8 +121,7 @@ discard block |
||
| 122 | 121 | return $result; |
| 123 | 122 | } |
| 124 | 123 | include_once $location; |
| 125 | - } |
|
| 126 | - else |
|
| 124 | + } else |
|
| 127 | 125 | { |
| 128 | 126 | |
| 129 | 127 | /* load config or language array */ |
@@ -43,8 +43,7 @@ |
||
| 43 | 43 | if (is_object($ci)) |
| 44 | 44 | { |
| 45 | 45 | $this->ci =& $ci; |
| 46 | - } |
|
| 47 | - else { |
|
| 46 | + } else { |
|
| 48 | 47 | $this->ci =& get_instance(); |
| 49 | 48 | } |
| 50 | 49 | |
@@ -361,7 +361,9 @@ |
||
| 361 | 361 | */ |
| 362 | 362 | public function setLayout($file) |
| 363 | 363 | { |
| 364 | - if (empty($file)) return; |
|
| 364 | + if (empty($file)) { |
|
| 365 | + return; |
|
| 366 | + } |
|
| 365 | 367 | |
| 366 | 368 | $this->layout = $file; |
| 367 | 369 | } |
@@ -290,7 +290,9 @@ |
||
| 290 | 290 | */ |
| 291 | 291 | protected function runClosure(\Closure $c) |
| 292 | 292 | { |
| 293 | - if (! is_callable($c)) return ''; |
|
| 293 | + if (! is_callable($c)) { |
|
| 294 | + return ''; |
|
| 295 | + } |
|
| 294 | 296 | |
| 295 | 297 | ob_start(); |
| 296 | 298 | $c(); |
@@ -228,8 +228,7 @@ discard block |
||
| 228 | 228 | { |
| 229 | 229 | CLI::write("\nUnable to find model named: {$model_name}"); |
| 230 | 230 | $model_name = CLI::prompt('Model filename'); |
| 231 | - } |
|
| 232 | - else |
|
| 231 | + } else |
|
| 233 | 232 | { |
| 234 | 233 | CLI::write("Using model: ". CLI::color($model_name, 'yellow') ); |
| 235 | 234 | } |
@@ -423,12 +422,10 @@ discard block |
||
| 423 | 422 | if ($field->name == 'email') |
| 424 | 423 | { |
| 425 | 424 | $obj .= "\"[email protected]\",\n"; |
| 426 | - } |
|
| 427 | - else if (strpos('name', $field->name) !== false) |
|
| 425 | + } else if (strpos('name', $field->name) !== false) |
|
| 428 | 426 | { |
| 429 | 427 | $obj .= "\"Lefty\",\n"; |
| 430 | - } |
|
| 431 | - else if (in_array($field->type, ['char', 'varchar', 'text'])) |
|
| 428 | + } else if (in_array($field->type, ['char', 'varchar', 'text'])) |
|
| 432 | 429 | { |
| 433 | 430 | $obj .= "\"Some default string\",\n"; |
| 434 | 431 | } |
@@ -62,8 +62,7 @@ discard block |
||
| 62 | 62 | if ( $quiet === FALSE ) |
| 63 | 63 | { |
| 64 | 64 | $this->collectOptions( $name ); |
| 65 | - } |
|
| 66 | - else |
|
| 65 | + } else |
|
| 67 | 66 | { |
| 68 | 67 | $this->quietSetOptions( $name ); |
| 69 | 68 | } |
@@ -212,8 +211,7 @@ discard block |
||
| 212 | 211 | { |
| 213 | 212 | return NULL; |
| 214 | 213 | } |
| 215 | - } |
|
| 216 | - else |
|
| 214 | + } else |
|
| 217 | 215 | { |
| 218 | 216 | return NULL; |
| 219 | 217 | } |