Passed
Branch v3.5 (f0ef26)
by Samir
36:09
created
web_interface/astpp/system/database/drivers/sqlsrv/sqlsrv_driver.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -338,13 +338,15 @@
 block discarded – undo
338 338
 	 */
339 339
 	function count_all($table = '')
340 340
 	{
341
-		if ($table == '')
342
-			return '0';
341
+		if ($table == '') {
342
+					return '0';
343
+		}
343 344
 	
344 345
 		$query = $this->query("SELECT COUNT(*) AS numrows FROM ".$this->dbprefix.$table);
345 346
 		
346
-		if ($query->num_rows() == 0)
347
-			return '0';
347
+		if ($query->num_rows() == 0) {
348
+					return '0';
349
+		}
348 350
 
349 351
 		$row = $query->row();
350 352
 		$this->_reset_select();
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 1 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.