Passed
Push — v3.0 ( f561e7...727e9b )
by Samir
23:05 queued 11:50
created
web_interface/astpp/system/database/DB_active_rec.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2132,7 +2132,7 @@
 block discarded – undo
2132 2132
 	 */
2133 2133
 		 function _insert_on_duplicate_update_batch($table, $keys, $values)
2134 2134
 		 {
2135
-				  foreach($keys as $key)
2135
+				  foreach ($keys as $key)
2136 2136
 				  $update_fields[] = $key.'=VALUES('.$key.')';
2137 2137
            
2138 2138
 				  return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES ".implode(', ', $values)." ON DUPLICATE KEY UPDATE ".implode(', ', $update_fields);
Please login to merge, or discard this patch.
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1121,8 +1121,7 @@  discard block
 block discarded – undo
1121 1121
 			if ($escape === FALSE)
1122 1122
 			{
1123 1123
 				$this->ar_set[] = '('.implode(',', $row).')';
1124
-			}
1125
-			else
1124
+			} else
1126 1125
 			{
1127 1126
 				$clean = array();
1128 1127
 
@@ -2132,8 +2131,9 @@  discard block
 block discarded – undo
2132 2131
 	 */
2133 2132
 		 function _insert_on_duplicate_update_batch($table, $keys, $values)
2134 2133
 		 {
2135
-				  foreach($keys as $key)
2136
-				  $update_fields[] = $key.'=VALUES('.$key.')';
2134
+				  foreach($keys as $key) {
2135
+				  				  $update_fields[] = $key.'=VALUES('.$key.')';
2136
+				  }
2137 2137
            
2138 2138
 				  return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES ".implode(', ', $values)." ON DUPLICATE KEY UPDATE ".implode(', ', $update_fields);
2139 2139
 		 } 
Please login to merge, or discard this patch.
web_interface/astpp/system/database/drivers/postgre/postgre_driver.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -338,20 +338,17 @@
 block discarded – undo
338 338
 		if ($table == NULL && $v >= '8.1')
339 339
 		{
340 340
 			$sql = 'SELECT LASTVAL() as ins_id';
341
-		}
342
-		elseif ($table != NULL && $column != NULL && $v >= '8.0')
341
+		} elseif ($table != NULL && $column != NULL && $v >= '8.0')
343 342
 		{
344 343
 			$sql = sprintf("SELECT pg_get_serial_sequence('%s','%s') as seq", $table, $column);
345 344
 			$query = $this->query($sql);
346 345
 			$row = $query->row();
347 346
 			$sql = sprintf("SELECT CURRVAL('%s') as ins_id", $row->seq);
348
-		}
349
-		elseif ($table != NULL)
347
+		} elseif ($table != NULL)
350 348
 		{
351 349
 			// seq_name passed in table parameter
352 350
 			$sql = sprintf("SELECT CURRVAL('%s') as ins_id", $table);
353
-		}
354
-		else
351
+		} else
355 352
 		{
356 353
 			return pg_last_oid($this->result_id);
357 354
 		}
Please login to merge, or discard this patch.
web_interface/astpp/system/database/drivers/cubrid/cubrid_utility.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,8 +42,7 @@
 block discarded – undo
42 42
 		if ($this->conn_id)
43 43
 		{
44 44
 			return "SELECT '".$this->database."'";
45
-		}
46
-		else
45
+		} else
47 46
 		{
48 47
 			return FALSE;
49 48
 		}
Please login to merge, or discard this patch.
web_interface/astpp/system/helpers/html_helper.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -318,31 +318,26 @@
 block discarded – undo
318 318
 					if ($index_page === TRUE)
319 319
 					{
320 320
 						$link .= 'href="'.$CI->config->site_url($v).'" ';
321
-					}
322
-					else
321
+					} else
323 322
 					{
324 323
 						$link .= 'href="'.$CI->config->slash_item('base_url').$v.'" ';
325 324
 					}
326
-				}
327
-				else
325
+				} else
328 326
 				{
329 327
 					$link .= "$k=\"$v\" ";
330 328
 				}
331 329
 			}
332 330
 
333 331
 			$link .= "/>";
334
-		}
335
-		else
332
+		} else
336 333
 		{
337 334
 			if (strpos($href, '://') !== FALSE)
338 335
 			{
339 336
 				$link .= 'href="'.$href.'" ';
340
-			}
341
-			elseif ($index_page === TRUE)
337
+			} elseif ($index_page === TRUE)
342 338
 			{
343 339
 				$link .= 'href="'.$CI->config->site_url($href).'" ';
344
-			}
345
-			else
340
+			} else
346 341
 			{
347 342
 				$link .= 'href="'.$CI->config->slash_item('base_url').$href.'" ';
348 343
 			}
Please login to merge, or discard this patch.
web_interface/astpp/system/helpers/smiley_helper.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -232,8 +232,7 @@
 block discarded – undo
232 232
 		if (defined('ENVIRONMENT') AND file_exists(APPPATH.'config/'.ENVIRONMENT.'/smileys.php'))
233 233
 		{
234 234
 			include(APPPATH.'config/'.ENVIRONMENT.'/smileys.php');
235
-		}
236
-		elseif (file_exists(APPPATH.'config/smileys.php'))
235
+		} elseif (file_exists(APPPATH.'config/smileys.php'))
237 236
 		{
238 237
 			include(APPPATH.'config/smileys.php');
239 238
 		}
Please login to merge, or discard this patch.
web_interface/astpp/system/helpers/url_helper.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -584,8 +584,7 @@
 block discarded – undo
584 584
 			if ($javascript == TRUE)
585 585
 			{
586 586
 				$att .= $key.'='.$val.',';
587
-			}
588
-			else
587
+			} else
589 588
 			{
590 589
 				$att .= ' '.$key.'="'.$val.'"';
591 590
 			}
Please login to merge, or discard this patch.
web_interface/astpp/system/helpers/date_helper.php 1 patch
Braces   +10 added lines, -8 removed lines patch added patch discarded remove patch
@@ -465,8 +465,7 @@  discard block
 block discarded – undo
465 465
 		if (isset($ex['2']) && preg_match('/[0-9]{1,2}/', $ex['2']))
466 466
 		{
467 467
 			$sec = (strlen($ex['2']) == 1) ? '0'.$ex['2'] : $ex['2'];
468
-		}
469
-		else
468
+		} else
470 469
 		{
471 470
 			// Unless specified, seconds get set to zero.
472 471
 			$sec = '00';
@@ -476,14 +475,17 @@  discard block
 block discarded – undo
476 475
 		{
477 476
 			$ampm = strtolower($split['2']);
478 477
 
479
-			if (substr($ampm, 0, 1) == 'p' AND $hour < 12)
480
-				$hour = $hour + 12;
478
+			if (substr($ampm, 0, 1) == 'p' AND $hour < 12) {
479
+							$hour = $hour + 12;
480
+			}
481 481
 
482
-			if (substr($ampm, 0, 1) == 'a' AND $hour == 12)
483
-				$hour = '00';
482
+			if (substr($ampm, 0, 1) == 'a' AND $hour == 12) {
483
+							$hour = '00';
484
+			}
484 485
 
485
-			if (strlen($hour) == 1)
486
-				$hour = '0'.$hour;
486
+			if (strlen($hour) == 1) {
487
+							$hour = '0'.$hour;
488
+			}
487 489
 		}
488 490
 
489 491
 		return mktime($hour, $min, $sec, $month, $day, $year);
Please login to merge, or discard this patch.
web_interface/astpp/system/helpers/captcha_helper.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -207,8 +207,7 @@
 block discarded – undo
207 207
 				$y = rand(0, $img_height / 2);
208 208
 				imagestring($im, $font_size, $x, $y, substr($word, $i, 1), $text_color);
209 209
 				$x += ($font_size * 2);
210
-			}
211
-			else
210
+			} else
212 211
 			{
213 212
 				$y = rand($img_height / 2, $img_height - 3);
214 213
 				imagettftext($im, $font_size, $angle, $x, $y, $text_color, $font_path, substr($word, $i, 1));
Please login to merge, or discard this patch.
web_interface/astpp/system/helpers/template_inheritance_helper.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
 
237 237
 That's it for now. If you have questions, ideas or problems, please write me at daniel AT dornhardt.com.
238 238
 */
239
-	if (! defined('TI_VIEWS_DIR') ) {
239
+	if ( ! defined('TI_VIEWS_DIR')) {
240 240
 		if (defined('APPPATH')) {
241 241
 			define('TI_VIEWS_DIR', APPPATH.'views/');
242 242
 		} else {
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
 			$GLOBALS['CI']->load->view($GLOBALS['TI_CURRENT_BASE_TEMPLATE']);
286 286
 		}
287 287
 		else {
288
-			include realpath( TI_VIEWS_DIR . $GLOBALS['TI_CURRENT_BASE_TEMPLATE']);
288
+			include realpath(TI_VIEWS_DIR.$GLOBALS['TI_CURRENT_BASE_TEMPLATE']);
289 289
 		}
290 290
 	}
291 291
 
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
 	 */
372 372
 	function block_rendering_neccessary() {
373 373
 		// check if no child did override this block
374
-		if (!array_key_exists($GLOBALS['TI_CURRENT_BLOCKNAME'], $GLOBALS['TI_EXTENDED_BASE_TEMPLATE_DATA'] )) {
374
+		if ( ! array_key_exists($GLOBALS['TI_CURRENT_BLOCKNAME'], $GLOBALS['TI_EXTENDED_BASE_TEMPLATE_DATA'])) {
375 375
 			return true;
376 376
 		}
377 377
 		// check if there is an extension marker in the child blocks data. If so, the
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -283,8 +283,7 @@
 block discarded – undo
283 283
 		//echo 'tttttttttttt';
284 284
 		if (isset($GLOBALS['CI'])) {
285 285
 			$GLOBALS['CI']->load->view($GLOBALS['TI_CURRENT_BASE_TEMPLATE']);
286
-		}
287
-		else {
286
+		} else {
288 287
 			include realpath( TI_VIEWS_DIR . $GLOBALS['TI_CURRENT_BASE_TEMPLATE']);
289 288
 		}
290 289
 	}
Please login to merge, or discard this patch.