Passed
Pull Request — v3.0 (#167)
by Samir
11:33
created
web_interface/astpp/application/language/spanish/menu_lang.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
1
+<?php if ( ! defined('BASEPATH')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 
3 5
 $_doctypes = array(
4 6
 					'xhtml11'		=> '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">',
Please login to merge, or discard this patch.
web_interface/astpp/cron/cron.php 1 patch
Braces   +15 added lines, -9 removed lines patch added patch discarded remove patch
@@ -11,21 +11,24 @@  discard block
 block discarded – undo
11 11
 define('CRON_BETA_MODE', $config['CRON_BETA_MODE']);
12 12
 
13 13
 // Set index.php location
14
-if (isset($config['CRON_CI_INDEX']) && $config['CRON_CI_INDEX'])
14
+if (isset($config['CRON_CI_INDEX']) && $config['CRON_CI_INDEX']) {
15 15
 	define('CRON_CI_INDEX', $config['CRON_CI_INDEX']);
16
-else
16
+} else {
17 17
 	define('CRON_CI_INDEX', '../index.php');
18
+}
18 19
 
19
-if (count($argv) <= 2)
20
+if (count($argv) <= 2) {
20 21
 	if (count($config['argv'])) {
21 22
 		$path = $argv[1];
23
+}
22 24
 		unset($argv[1]);
23 25
 //        $argv = array_merge($argv, $config["argv"][$path]);
24 26
 		$argv[0] = $argv[0];
25 27
 		$argv[1] =$config["argv"][$path];
26 28
 		$_SERVER['argv'] = $argv;
27
-	} else
28
-		die('Use: php cron.php controller/method');
29
+	} else {
30
+			die('Use: php cron.php controller/method');
31
+	}
29 32
 
30 33
 // Simulate an HTTP request
31 34
 $_SERVER['PATH_INFO'] = $argv[1];
@@ -44,10 +47,13 @@  discard block
 block discarded – undo
44 47
 require( CRON_CI_INDEX );           // main CI index.php file
45 48
 $output = ob_get_contents();
46 49
 
47
-if (CRON_FLUSH_BUFFERS === TRUE)
48
-	while (@ob_end_flush());          // display buffer contents
49
-		else
50
-	ob_end_clean();
50
+if (CRON_FLUSH_BUFFERS === TRUE) {
51
+	while (@ob_end_flush());
52
+}
53
+// display buffer contents
54
+		else {
55
+			ob_end_clean();
56
+		}
51 57
 
52 58
 echo "\n";
53 59
 ?>
Please login to merge, or discard this patch.
web_interface/astpp/system/core/Loader.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1025,18 +1025,15 @@
 block discarded – undo
1025 1025
 					{
1026 1026
 						include($path.'config/'.ENVIRONMENT.'/'.strtolower($class).'.php');
1027 1027
 						break;
1028
-					}
1029
-					elseif (defined('ENVIRONMENT') AND file_exists($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php'))
1028
+					} elseif (defined('ENVIRONMENT') AND file_exists($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php'))
1030 1029
 					{
1031 1030
 						include($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php');
1032 1031
 						break;
1033
-					}
1034
-					elseif (file_exists($path.'config/'.strtolower($class).'.php'))
1032
+					} elseif (file_exists($path.'config/'.strtolower($class).'.php'))
1035 1033
 					{
1036 1034
 						include($path.'config/'.strtolower($class).'.php');
1037 1035
 						break;
1038
-					}
1039
-					elseif (file_exists($path.'config/'.ucfirst(strtolower($class)).'.php'))
1036
+					} elseif (file_exists($path.'config/'.ucfirst(strtolower($class)).'.php'))
1040 1037
 					{
1041 1038
 						include($path.'config/'.ucfirst(strtolower($class)).'.php');
1042 1039
 						break;
Please login to merge, or discard this patch.
web_interface/astpp/system/core/URI.php 1 patch
Braces   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
   $pos = strpos($str, "_json");
165 165
  if($pos > 0 && !isset($_SERVER['HTTP_X_REQUESTED_WITH'])){
166 166
 	   $this->uri_string = str_replace('_json', '', trim($str, '/'));
167
- }else{
167
+ } else{
168 168
 		// If the URI contains only a slash we'll kill it
169 169
 		$this->uri_string = ($str == '/') ? '' : $str;
170 170
 }
@@ -562,8 +562,7 @@  discard block
 block discarded – undo
562 562
 		if ($where == 'trailing')
563 563
 		{
564 564
 			$leading = '';
565
-		}
566
-		elseif ($where == 'leading')
565
+		} elseif ($where == 'leading')
567 566
 		{
568 567
 			$trailing = '';
569 568
 		}
Please login to merge, or discard this patch.
web_interface/astpp/system/core/Hooks.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,8 +85,7 @@
 block discarded – undo
85 85
 		if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/hooks.php'))
86 86
 		{
87 87
 			include(APPPATH.'config/'.ENVIRONMENT.'/hooks.php');
88
-		}
89
-		elseif (is_file(APPPATH.'config/hooks.php'))
88
+		} elseif (is_file(APPPATH.'config/hooks.php'))
90 89
 		{
91 90
 			include(APPPATH.'config/hooks.php');
92 91
 		}
Please login to merge, or discard this patch.
web_interface/astpp/system/libraries/Email.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -674,16 +674,13 @@
 block discarded – undo
674 674
 		if ($this->mailtype == 'html' && count($this->_attach_name) == 0)
675 675
 		{
676 676
 			return 'html';
677
-		}
678
-		elseif ($this->mailtype == 'html' && count($this->_attach_name) > 0)
677
+		} elseif ($this->mailtype == 'html' && count($this->_attach_name) > 0)
679 678
 		{
680 679
 			return 'html-attach';
681
-		}
682
-		elseif ($this->mailtype == 'text' && count($this->_attach_name) > 0)
680
+		} elseif ($this->mailtype == 'text' && count($this->_attach_name) > 0)
683 681
 		{
684 682
 			return 'plain-attach';
685
-		}
686
-		else
683
+		} else
687 684
 		{
688 685
 			return 'plain';
689 686
 		}
Please login to merge, or discard this patch.
web_interface/astpp/system/libraries/Form_validation.php 1 patch
Braces   +10 added lines, -12 removed lines patch added patch discarded remove patch
@@ -412,13 +412,11 @@  discard block
 block discarded – undo
412 412
 				if (isset($array[$keys[$i]]))
413 413
 				{
414 414
 					$array = $this->_reduce_array($array[$keys[$i]], $keys, ($i + 1));
415
-				}
416
-				else
415
+				} else
417 416
 				{
418 417
 					return NULL;
419 418
 				}
420
-			}
421
-			else
419
+			} else
422 420
 			{
423 421
 				return $array;
424 422
 			}
@@ -456,8 +454,7 @@  discard block
 block discarded – undo
456 454
 					if (count($row['keys']) == 1)
457 455
 					{
458 456
 						$post_ref = & $post_ref[current($row['keys'])];
459
-					}
460
-					else
457
+					} else
461 458
 					{
462 459
 						foreach ($row['keys'] as $val)
463 460
 						{
@@ -978,8 +975,9 @@  discard block
 block discarded – undo
978 975
 		$data =explode('.', $field);
979 976
 				$table=$data[0];
980 977
 				$field=$data[1];
981
-				if(isset($data[2]))
982
-				$id=$data[2];
978
+				if(isset($data[2])) {
979
+								$id=$data[2];
980
+				}
983 981
 				$where=array($field => $str);
984 982
 				if($id != ''){
985 983
 				 $where['id !=']=$id;
@@ -1448,10 +1446,10 @@  discard block
 block discarded – undo
1448 1446
 			  $password=$this->CI->common->decode($result['password']);
1449 1447
 			  if($password && $password == $str){
1450 1448
 				  return true;
1451
-			  }else{
1449
+			  } else{
1452 1450
 				  return false;
1453 1451
 			  }
1454
-		  }else{
1452
+		  } else{
1455 1453
 			  return false;
1456 1454
 		  }
1457 1455
 		}
@@ -1465,10 +1463,10 @@  discard block
 block discarded – undo
1465 1463
 		  $available_bal = ($customer_info["balance"]) + $customer_info["posttoexternal"] * ($customer_info["credit_limit"]);
1466 1464
 		  if($available_bal >= $post_array['setup']){
1467 1465
 		   return TRUE;
1468
-		  }else{
1466
+		  } else{
1469 1467
 		   return FALSE;
1470 1468
 		  }
1471
-		  }else{
1469
+		  } else{
1472 1470
 		   return TRUE;
1473 1471
 		  }
1474 1472
 		}
Please login to merge, or discard this patch.
web_interface/astpp/system/libraries/Xmlrpcs.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -307,14 +307,12 @@  discard block
 block discarded – undo
307 307
 			{
308 308
 				return new XML_RPC_Response(0, $this->xmlrpcerr['unknown_method'], $this->xmlrpcstr['unknown_method']);
309 309
 			}
310
-		}
311
-		else
310
+		} else
312 311
 		{
313 312
 			if ($objectCall && ! is_callable(array($method_parts['0'], $method_parts['1'])))
314 313
 			{
315 314
 				return new XML_RPC_Response(0, $this->xmlrpcerr['unknown_method'], $this->xmlrpcstr['unknown_method']);
316
-			}
317
-			elseif ( ! $objectCall && ! is_callable($this->methods[$methName]['function']))
315
+			} elseif ( ! $objectCall && ! is_callable($this->methods[$methName]['function']))
318 316
 			{
319 317
 				return new XML_RPC_Response(0, $this->xmlrpcerr['unknown_method'], $this->xmlrpcstr['unknown_method']);
320 318
 			}
@@ -362,22 +360,19 @@  discard block
 block discarded – undo
362 360
 			if ($method_parts[0] == "this" && $system_call == TRUE)
363 361
 			{
364 362
 				return call_user_func(array($this, $method_parts[1]), $m);
365
-			}
366
-			else
363
+			} else
367 364
 			{
368 365
 				if ($this->object === FALSE)
369 366
 				{
370 367
 					$CI = & get_instance();
371 368
 					return $CI->$method_parts['1']($m);
372
-				}
373
-				else
369
+				} else
374 370
 				{
375 371
 					return $this->object->$method_parts['1']($m);
376 372
 					//return call_user_func(array(&$method_parts['0'],$method_parts['1']), $m);
377 373
 				}
378 374
 			}
379
-		}
380
-		else
375
+		} else
381 376
 		{
382 377
 			return call_user_func($this->methods[$methName]['function'], $m);
383 378
 		}
Please login to merge, or discard this patch.
web_interface/astpp/system/libraries/font/courieri.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,6 +3,7 @@
 block discarded – undo
3 3
 $name = 'Courier-Oblique';
4 4
 $up = -100;
5 5
 $ut = 50;
6
-for ($i = 0; $i <= 255; $i++)
7
-	$cw[chr($i)] = 600;
6
+for ($i = 0; $i <= 255; $i++) {
7
+	$cw[chr($i)] = 600;
8
+}
8 9
 ?>
Please login to merge, or discard this patch.