Passed
Push — 1.0.0-dev ( 8edc19...2b6704 )
by nguereza
03:32
created
index.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -242,8 +242,7 @@
 block discarded – undo
242 242
 			ini_set('display_errors', 0);
243 243
 			if (version_compare(PHP_VERSION, '5.3', '>=')) {
244 244
 				error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED);
245
-			}
246
-			else{
245
+			} else{
247 246
 				error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_USER_NOTICE);
248 247
 			}
249 248
 		break;
Please login to merge, or discard this patch.
core/bootstrap.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -78,8 +78,7 @@  discard block
 block discarded – undo
78 78
 	*/
79 79
 	if (version_compare(phpversion(), TNH_REQUIRED_PHP_MIN_VERSION, '<')){
80 80
 		show_error('Your PHP Version [' . phpversion() . '] is less than [' . TNH_REQUIRED_PHP_MIN_VERSION . '], please install a new version or update your PHP to the latest.', 'PHP Error environment');	
81
-	}
82
-	else if(version_compare(phpversion(), TNH_REQUIRED_PHP_MAX_VERSION, '>')){
81
+	} else if(version_compare(phpversion(), TNH_REQUIRED_PHP_MAX_VERSION, '>')){
83 82
 		show_error('Your PHP Version [' . phpversion() . '] is greather than [' . TNH_REQUIRED_PHP_MAX_VERSION . '] please install a PHP version that is compatible.', 'PHP Error environment');	
84 83
 	}
85 84
 	$LOGGER->info('PHP version [' . phpversion() . '] is OK [REQUIRED MINIMUM: ' . TNH_REQUIRED_PHP_MIN_VERSION . ', REQUIRED MAXIMUM: ' . TNH_REQUIRED_PHP_MAX_VERSION . '], application can work without any issue');
@@ -104,8 +103,7 @@  discard block
 block discarded – undo
104 103
 	if(file_exists(VENDOR_PATH . 'autoload.php')){
105 104
 		$LOGGER->info('The composer autoload file exists include it');
106 105
 		require_once VENDOR_PATH . 'autoload.php';
107
-	}
108
-	else{
106
+	} else{
109 107
 		$LOGGER->info('The composer autoload file does not exist skipping');
110 108
 	}
111 109
 	
@@ -176,8 +174,7 @@  discard block
 block discarded – undo
176 174
 		//first check if the cache handler is the system driver
177 175
 		if(file_exists(CORE_CLASSES_CACHE_PATH . $cacheHandler . '.php')){
178 176
 			$CACHE =& class_loader($cacheHandler, 'classes/cache');
179
-		}
180
-		else{
177
+		} else{
181 178
 			//it's not a system driver use user library
182 179
 			$CACHE =& class_loader($cacheHandler);
183 180
 		}
Please login to merge, or discard this patch.
core/classes/Session.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -90,8 +90,7 @@  discard block
 block discarded – undo
90 90
 			($_SESSION[$key]) : $default;
91 91
 			if(array_key_exists($key, $_SESSION)){
92 92
 				unset($_SESSION[$key]);
93
-			}
94
-			else{
93
+			} else{
95 94
 				$logger->warning('Cannot find session flash item ['. $key .'] using the default value ['. $default .']');
96 95
 			}
97 96
 			return $return;
@@ -126,8 +125,7 @@  discard block
 block discarded – undo
126 125
 			if(array_key_exists($item, $_SESSION)){
127 126
 				$logger->info('Deleting of session for item ['.$item.' ]');
128 127
 				unset($_SESSION[$item]);
129
-			}
130
-			else{
128
+			} else{
131 129
 				$logger->warning('Session item ['.$item.'] to be deleted does not exists');
132 130
 			}
133 131
 		}
@@ -142,8 +140,7 @@  discard block
 block discarded – undo
142 140
 			if(array_key_exists($key, $_SESSION)){
143 141
 				$logger->info('Delete session flash for item ['.$item.']');
144 142
 				unset($_SESSION[$item]);
145
-			}
146
-			else{
143
+			} else{
147 144
 				$logger->warning('Dession flash item ['.$item.'] to be deleted does not exists');
148 145
 			}
149 146
 		}
Please login to merge, or discard this patch.
core/classes/Lang.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -82,8 +82,7 @@  discard block
 block discarded – undo
82 82
 			if($cookieLang && $this->isValid($cookieLang)){
83 83
 				$this->current = $cookieLang;
84 84
 				$this->logger->info('Language from cookie [' .$cfgKey. '] is valid so we will set the language using the cookie value [' .$cookieLang. ']');
85
-			}
86
-			else{
85
+			} else{
87 86
 				$this->logger->info('Language from cookie [' .$cfgKey. '] is not set, use the default value [' .$this->getDefault(). ']');
88 87
 				$this->current = $this->getDefault();
89 88
 			}
@@ -171,8 +170,7 @@  discard block
 block discarded – undo
171 170
 			}
172 171
 			if($this->isValid($name)){
173 172
 				$this->availables[$name] = $description;
174
-			}
175
-			else{
173
+			} else{
176 174
 				show_error('The language [' . $name . '] is not valid or does not exists.');
177 175
 			}
178 176
 		}
Please login to merge, or discard this patch.
core/classes/Request.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -103,8 +103,7 @@
 block discarded – undo
103 103
 			$this->header = array();
104 104
 			if(function_exists('apache_request_headers')){
105 105
 				$this->header = apache_request_headers();
106
-			}
107
-			else if(function_exists('getallheaders')){
106
+			} else if(function_exists('getallheaders')){
108 107
 				$this->header = getallheaders();
109 108
 			}
110 109
 		}
Please login to merge, or discard this patch.
core/libraries/PDF.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,8 +69,7 @@
 block discarded – undo
69 69
 			$this->dompdf->render();
70 70
 			if($stream){
71 71
 				$this->dompdf->stream($filename);
72
-			}
73
-			else{
72
+			} else{
74 73
 				return $this->dompdf->output();
75 74
 			}
76 75
 		}
Please login to merge, or discard this patch.
core/libraries/Email.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -150,8 +150,7 @@
 block discarded – undo
150 150
 			foreach ($emails as $name => $email) {
151 151
 				if(is_numeric($name)){
152 152
 					$this->setTo($email);
153
-				}
154
-				else{
153
+				} else{
155 154
 					$this->setTo($email, $name);
156 155
 				}
157 156
 			}
Please login to merge, or discard this patch.
core/libraries/Cookie.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -93,8 +93,7 @@
 block discarded – undo
93 93
 				$logger->info('Delete cookie item ['.$item.']');
94 94
 				unset($_COOKIE[$item]);
95 95
 				return true;
96
-			}
97
-			else{
96
+			} else{
98 97
 				$logger->warning('Cookie item ['.$item.'] to be deleted does not exists');
99 98
 				return false;
100 99
 			}
Please login to merge, or discard this patch.
core/libraries/Browser.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -921,20 +921,15 @@
 block discarded – undo
921 921
                     if(preg_match('#trident/([0-9\.]+);#i', $this->_agent, $aresult)){
922 922
                         if($aresult[1] == '3.1'){
923 923
                             $this->setVersion('7.0');
924
-                        }
925
-                        else if($aresult[1] == '4.0'){
924
+                        } else if($aresult[1] == '4.0'){
926 925
                             $this->setVersion('8.0');
927
-                        }
928
-                        else if($aresult[1] == '5.0'){
926
+                        } else if($aresult[1] == '5.0'){
929 927
                             $this->setVersion('9.0');
930
-                        }
931
-                        else if($aresult[1] == '6.0'){
928
+                        } else if($aresult[1] == '6.0'){
932 929
                             $this->setVersion('10.0');
933
-                        }
934
-                        else if($aresult[1] == '7.0'){
930
+                        } else if($aresult[1] == '7.0'){
935 931
                             $this->setVersion('11.0');
936
-                        }
937
-                        else if($aresult[1] == '8.0'){
932
+                        } else if($aresult[1] == '8.0'){
938 933
                             $this->setVersion('11.0');
939 934
                         }
940 935
                     }
Please login to merge, or discard this patch.