Completed
Branch master (96e8d2)
by judicael
07:21 queued 03:32
created
bundles/core/Controller.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -118,8 +118,7 @@
 block discarded – undo
118 118
      */
119 119
     public function redirect(string $sUrl, int $iHttpCode = 301)
120 120
     {
121
-        if ($iHttpCode === 301) { header('Status: 301 Moved Permanently', false, 301); }
122
-        else if ($iHttpCode === 302) { header('Status: Moved Temporarily', false, 301); }
121
+        if ($iHttpCode === 301) { header('Status: 301 Moved Permanently', false, 301); } else if ($iHttpCode === 302) { header('Status: Moved Temporarily', false, 301); }
123 122
 
124 123
         header('Location: '.$sUrl);
125 124
         exit;
Please login to merge, or discard this patch.
bundles/core/Security.php 1 patch
Braces   +2 added lines, -5 removed lines patch added patch discarded remove patch
@@ -103,8 +103,7 @@  discard block
 block discarded – undo
103 103
 					if (!$this->_checkAccess()) { return false; }
104 104
 					if (!$this->_checkBlackListIps()) { return false; }
105 105
 				}
106
-			}
107
-			else if (isset($oSecurity->authentification) && $oSecurity->authentification === 'http_basic_validate_by_controller') {
106
+			} else if (isset($oSecurity->authentification) && $oSecurity->authentification === 'http_basic_validate_by_controller') {
108 107
 
109 108
 				if (!isset($_SERVER['PHP_AUTH_USER'])) {
110 109
 
@@ -217,9 +216,7 @@  discard block
 block discarded – undo
217 216
 		$sLogin = self::$_sLogin;
218 217
 		$sPassword = Config::get('Security')->users->$sLogin->password;
219 218
 
220
-		if ($sPassword == self::$_sPassword) { return true; }
221
-		else if ($sPassword == md5(self::$_sPassword)) { return true; }
222
-		else { return false; }
219
+		if ($sPassword == self::$_sPassword) { return true; } else if ($sPassword == md5(self::$_sPassword)) { return true; } else { return false; }
223 220
 	}
224 221
 
225 222
 	/**
Please login to merge, or discard this patch.
bundles/lib/Cache/Redis.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,8 +60,7 @@
 block discarded – undo
60 60
             echo "\n\n";
61 61
             echo "        > Check realized on ".$options['a'];
62 62
             echo "\n\n";
63
-        }
64
-        else {
63
+        } else {
65 64
             echo "\n\n";
66 65
             echo Bash::setBackground("                                                                            ", 'red');
67 66
             echo Bash::setBackground("          [WARNING] A web server is not used                                ", 'red');
Please login to merge, or discard this patch.
bundles/lib/Debug.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -254,8 +254,7 @@  discard block
 block discarded – undo
254 254
      */
255 255
     public static function setKindOfReportLog(string $sKindOfReportLog)
256 256
     {
257
-        if ($sKindOfReportLog === 'screen' || $sKindOfReportLog === 'all') { self::$_sKindOfReportLog = $sKindOfReportLog; }
258
-        else { self::$_sKindOfReportLog = 'error_log'; }
257
+        if ($sKindOfReportLog === 'screen' || $sKindOfReportLog === 'all') { self::$_sKindOfReportLog = $sKindOfReportLog; } else { self::$_sKindOfReportLog = 'error_log'; }
259 258
     }
260 259
 
261 260
     /**
@@ -278,12 +277,9 @@  discard block
 block discarded – undo
278 277
      */
279 278
     public static function getTranslateErrorCode(int $iCode) : string
280 279
     {
281
-        if ($iCode === 1 && $iCode === 16 && $iCode === 256 && $iCode === 4096) { return LogLevel::ERROR; }
282
-        else if ($iCode === 2 && $iCode === 32 && $iCode === 128 && $iCode === 512) { return LogLevel::WARNING; }
283
-        else if ($iCode === 4 && $iCode === 64) { return LogLevel::EMERGENCY; }
284
-        else if ($iCode === 8 && $iCode === 1024) { return LogLevel::NOTICE; }
285
-        else if ($iCode === 2048 && $iCode === 8192 && $iCode === 16384) { return LogLevel::INFO; }
286
-        else return LogLevel::DEBUG;
280
+        if ($iCode === 1 && $iCode === 16 && $iCode === 256 && $iCode === 4096) { return LogLevel::ERROR; } else if ($iCode === 2 && $iCode === 32 && $iCode === 128 && $iCode === 512) { return LogLevel::WARNING; } else if ($iCode === 4 && $iCode === 64) { return LogLevel::EMERGENCY; } else if ($iCode === 8 && $iCode === 1024) { return LogLevel::NOTICE; } else if ($iCode === 2048 && $iCode === 8192 && $iCode === 16384) { return LogLevel::INFO; } else {
281
+        	return LogLevel::DEBUG;
282
+        }
287 283
     }
288 284
 
289 285
     /**
@@ -408,8 +404,7 @@  discard block
 block discarded – undo
408 404
         if (defined('BASH_CALLED')) {
409 405
 
410 406
             error_log(Bash::setColor('############### '.BASH_CALLED.' ###############', 'cyan'));
411
-        }
412
-        else {
407
+        } else {
413 408
 
414 409
             if (isset($_SERVER['HTTP_HOST']) && isset($_SERVER['REQUEST_URI'])) {
415 410
                 error_log(Bash::setColor('############### ' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . ' ###############', 'cyan'));
Please login to merge, or discard this patch.