Passed
Push — 1.0.0-dev ( 066288...93958a )
by nguereza
09:45
created
core/common.php 1 patch
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -222,16 +222,14 @@  discard block
 block discarded – undo
222 222
 							);
223 223
 			if (isset($http_status[$code])){
224 224
 				$text = $http_status[$code];
225
-			}
226
-			else{
225
+			} else{
227 226
 				show_error('No HTTP status text found for your code please check it.');
228 227
 			}
229 228
 		}
230 229
 		
231 230
 		if (strpos(php_sapi_name(), 'cgi') === 0){
232 231
 			header('Status: ' . $code . ' ' . $text, TRUE);
233
-		}
234
-		else{
232
+		} else{
235 233
 			$proto = 'HTTP/1.1';
236 234
 			if(isset($_SERVER['SERVER_PROTOCOL'])){
237 235
 				$proto = $_SERVER['SERVER_PROTOCOL'];
@@ -323,8 +321,7 @@  discard block
 block discarded – undo
323 321
 	function php_exception_handler($ex){
324 322
 		if (str_ireplace(array('off', 'none', 'no', 'false', 'null'), '', ini_get('display_errors'))){
325 323
 			show_error('An exception is occured in file '. $ex->getFile() .' at line ' . $ex->getLine() . ' raison : ' . $ex->getMessage(), 'PHP Exception #' . $ex->getCode());
326
-		}
327
-		else{
324
+		} else{
328 325
 			save_to_log('error', 'An exception is occured in file ' . $ex->getFile() . ' at line ' . $ex->getLine() . ' raison : ' . $ex->getMessage(), 'PHP Exception');
329 326
 		}
330 327
 		return true;
@@ -440,15 +437,13 @@  discard block
 block discarded – undo
440 437
 	function clean_input($str){
441 438
 		if (is_array($str)){
442 439
 			$str = array_map('clean_input', $str);
443
-		}
444
-		else if (is_object($str)){
440
+		} else if (is_object($str)){
445 441
 			$obj = $str;
446 442
 			foreach ($str as $var => $value) {
447 443
 				$obj->$var = clean_input($value);
448 444
 			}
449 445
 			$str = $obj;
450
-		}
451
-		else{
446
+		} else{
452 447
 			$str = htmlspecialchars(strip_tags($str), ENT_QUOTES, 'UTF-8');
453 448
 		}
454 449
 		return $str;
@@ -521,8 +516,7 @@  discard block
 block discarded – undo
521 516
 					session_save_path($sessionSavePath);
522 517
 					$logger->info('Session save path: ' . $sessionSavePath);
523 518
 				}
524
-			}
525
-			else if ($sessionHandler == 'database'){
519
+			} else if ($sessionHandler == 'database'){
526 520
 				//load database session handle library
527 521
 				//Database Session handler Model
528 522
 				require_once CORE_CLASSES_MODEL_PATH . 'DBSessionHandlerModel.php';
@@ -530,8 +524,7 @@  discard block
 block discarded – undo
530 524
 				$DBS =& class_loader('DBSessionHandler', 'classes');
531 525
 				session_set_save_handler($DBS, true);
532 526
 				$logger->info('session save path: ' . get_config('session_save_path'));
533
-			}
534
-			else{
527
+			} else{
535 528
 				show_error('Invalid session handler configuration');
536 529
 			}
537 530
 			$lifetime = get_config('session_cookie_lifetime', 0);
Please login to merge, or discard this patch.
core/classes/Module.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,8 +49,7 @@
 block discarded – undo
49 49
 				while(($module = readdir($moduleDir)) !== false){
50 50
 					if (preg_match('/^([a-z0-9-_]+)$/i', $module) && is_dir(MODULE_PATH . $module)){
51 51
 						self::$list[] = $module;
52
-					}
53
-					else{
52
+					} else{
54 53
 						$logger->info('Skipping [' .$module. '], may be this is not a directory or does not exists or is invalid name');
55 54
 					}
56 55
 				}
Please login to merge, or discard this patch.