Test Failed
Push — 1.0.0-dev ( 5195bb...ef06ce )
by nguereza
02:55
created
core/libraries/Browser.php 1 patch
Indentation   +122 added lines, -122 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-	defined('ROOT_PATH') || exit('Access denied');
2
+    defined('ROOT_PATH') || exit('Access denied');
3 3
     /**
4 4
      * TNH Framework
5 5
      *
@@ -28,68 +28,68 @@  discard block
 block discarded – undo
28 28
      * SOFTWARE.
29 29
      */
30 30
     
31
-	class Browser {
32
-
33
-		/**
34
-		 * List of know platforms
35
-		 * @var array
36
-		 */
37
-		private $platforms = array(
38
-									'/windows nt 10/i'      =>  'Windows 10',
39
-									'/windows phone 10/i'   =>  'Windows Phone 10',
40
-									'/windows phone 8.1/i'  =>  'Windows Phone 8.1',
41
-									'/windows phone 8/i'    =>  'Windows Phone 8',
42
-									'/windows nt 6.3/i'     =>  'Windows 8.1',
43
-									'/windows nt 6.2/i'     =>  'Windows 8',
44
-									'/windows nt 6.1/i'     =>  'Windows 7',
45
-									'/windows nt 6.0/i'     =>  'Windows Vista',
46
-									'/windows nt 5.2/i'     =>  'Windows Server 2003/XP x64',
47
-									'/windows nt 5.1/i'     =>  'Windows XP',
48
-									'/windows xp/i'         =>  'Windows XP',
49
-									'/windows nt 5.0/i'     =>  'Windows 2000',
50
-									'/windows me/i'         =>  'Windows ME',
51
-									'/win98/i'              =>  'Windows 98',
52
-									'/win95/i'              =>  'Windows 95',
53
-									'/win16/i'              =>  'Windows 3.11',
54
-									'/ipad/i'               =>  'iPad',
31
+    class Browser {
32
+
33
+        /**
34
+         * List of know platforms
35
+         * @var array
36
+         */
37
+        private $platforms = array(
38
+                                    '/windows nt 10/i'      =>  'Windows 10',
39
+                                    '/windows phone 10/i'   =>  'Windows Phone 10',
40
+                                    '/windows phone 8.1/i'  =>  'Windows Phone 8.1',
41
+                                    '/windows phone 8/i'    =>  'Windows Phone 8',
42
+                                    '/windows nt 6.3/i'     =>  'Windows 8.1',
43
+                                    '/windows nt 6.2/i'     =>  'Windows 8',
44
+                                    '/windows nt 6.1/i'     =>  'Windows 7',
45
+                                    '/windows nt 6.0/i'     =>  'Windows Vista',
46
+                                    '/windows nt 5.2/i'     =>  'Windows Server 2003/XP x64',
47
+                                    '/windows nt 5.1/i'     =>  'Windows XP',
48
+                                    '/windows xp/i'         =>  'Windows XP',
49
+                                    '/windows nt 5.0/i'     =>  'Windows 2000',
50
+                                    '/windows me/i'         =>  'Windows ME',
51
+                                    '/win98/i'              =>  'Windows 98',
52
+                                    '/win95/i'              =>  'Windows 95',
53
+                                    '/win16/i'              =>  'Windows 3.11',
54
+                                    '/ipad/i'               =>  'iPad',
55 55
                                     '/ipod/i'               =>  'iPod',
56 56
                                     '/iphone/i'             =>  'iPhone',
57 57
                                     '/macintosh|mac os x/i' =>  'Mac OS X',
58
-									'/mac_powerpc/i'        =>  'Mac OS 9',
59
-									'/android/i'            =>  'Android',
60
-									'/ubuntu/i'             =>  'Ubuntu',
61
-									'/linux/i'              =>  'Linux',
62
-									'/blackberry/i'         =>  'BlackBerry',
63
-									'/webos/i'              =>  'Mobile'
64
-								);
65
-
66
-		/**
67
-		 * List of know browsers
68
-		 * @var array
69
-		 */
70
-	 	private $browsers = array(
71
-									'/mobile/i'     =>  'Handheld Browser',
72
-									'/msie/i'       =>  'Internet Explorer',
73
-									'/firefox/i'    =>  'Firefox',
74
-									'/chrome/i'     =>  'Chrome',
75
-									'/safari/i'     =>  'Safari',
76
-									'/edge/i'       =>  'Edge',
77
-									'/opera/i'      =>  'Opera',
78
-									'/netscape/i'   =>  'Netscape',
79
-									'/maxthon/i'    =>  'Maxthon',
80
-									'/konqueror/i'  =>  'Konqueror'
81
-								);
82
-
83
-	 	/**
84
-	 	 * Agent string
85
-	 	 * @var string
86
-	 	 */
87
-		private $agent = '';
88
-
89
-		/**
90
-		 * Browser name
91
-		 * @var string
92
-		 */
58
+                                    '/mac_powerpc/i'        =>  'Mac OS 9',
59
+                                    '/android/i'            =>  'Android',
60
+                                    '/ubuntu/i'             =>  'Ubuntu',
61
+                                    '/linux/i'              =>  'Linux',
62
+                                    '/blackberry/i'         =>  'BlackBerry',
63
+                                    '/webos/i'              =>  'Mobile'
64
+                                );
65
+
66
+        /**
67
+         * List of know browsers
68
+         * @var array
69
+         */
70
+            private $browsers = array(
71
+                                    '/mobile/i'     =>  'Handheld Browser',
72
+                                    '/msie/i'       =>  'Internet Explorer',
73
+                                    '/firefox/i'    =>  'Firefox',
74
+                                    '/chrome/i'     =>  'Chrome',
75
+                                    '/safari/i'     =>  'Safari',
76
+                                    '/edge/i'       =>  'Edge',
77
+                                    '/opera/i'      =>  'Opera',
78
+                                    '/netscape/i'   =>  'Netscape',
79
+                                    '/maxthon/i'    =>  'Maxthon',
80
+                                    '/konqueror/i'  =>  'Konqueror'
81
+                                );
82
+
83
+            /**
84
+             * Agent string
85
+             * @var string
86
+             */
87
+        private $agent = '';
88
+
89
+        /**
90
+         * Browser name
91
+         * @var string
92
+         */
93 93
         private $browserName = '';
94 94
 
95 95
         /**
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
          */
129 129
         private $isFacebook = false;
130 130
 
131
-		/**
131
+        /**
132 132
          * Class constructor
133 133
          */
134 134
         public function __construct($userAgent = '') {
@@ -231,12 +231,12 @@  discard block
 block discarded – undo
231 231
             return $this->isFacebook;
232 232
         }
233 233
 
234
-         /**
235
-         * Returns a formatted string with a summary of the details of the browser.
236
-         * @codeCoverageIgnore
237
-         * 
238
-         * @return string formatted string with a summary of the browser
239
-         */
234
+            /**
235
+             * Returns a formatted string with a summary of the details of the browser.
236
+             * @codeCoverageIgnore
237
+             * 
238
+             * @return string formatted string with a summary of the browser
239
+             */
240 240
         public function __toString() {
241 241
             return "<strong>Browser Name:</strong> {$this->getBrowser()}<br/>\n" .
242 242
                 "<strong>Browser Version:</strong> {$this->getVersion()}<br/>\n" .
@@ -248,70 +248,70 @@  discard block
 block discarded – undo
248 248
         /**
249 249
          * Determine the user's platform
250 250
          */
251
-		protected function checkPlatform() { 
252
-			foreach ($this->platforms as $regex => $value) { 
253
-				if (preg_match($regex, $this->agent) ) {
254
-					$this->platform = $value;
255
-					break;
256
-				}
257
-			}   
258
-		}
259
-
260
-		/**
251
+        protected function checkPlatform() { 
252
+            foreach ($this->platforms as $regex => $value) { 
253
+                if (preg_match($regex, $this->agent) ) {
254
+                    $this->platform = $value;
255
+                    break;
256
+                }
257
+            }   
258
+        }
259
+
260
+        /**
261 261
          * Routine to determine the browser type
262 262
          */
263
-		protected function checkBrowser() {
264
-			foreach ($this->browsers as $regex => $value) { 
265
-				if (preg_match($regex, $this->agent ) ) {
266
-					$this->browserName = $value;
267
-					break;
268
-				}
269
-			}
270
-		}
271
-
272
-		/**
263
+        protected function checkBrowser() {
264
+            foreach ($this->browsers as $regex => $value) { 
265
+                if (preg_match($regex, $this->agent ) ) {
266
+                    $this->browserName = $value;
267
+                    break;
268
+                }
269
+            }
270
+        }
271
+
272
+        /**
273 273
          * Routine to determine the browser version
274 274
          */
275
-		protected function checkBrowserVersion(){
276
-			$detected = $this->getBrowser();
277
-			$detect = array_search($detected, $this->browsers);
278
-			$browser = str_replace(array('/i','/'), '', $detect);
279
-			$regex = "/(?<browser>version|{$browser})[\/]+(?<version>[0-9.|a-zA-Z.]*)/i";
280
-			if (preg_match_all($regex, $this->agent, $matches)) {
281
-				$found = array_search($browser, $matches['browser']);
282
-				$this->version = $matches['version'][$found];
283
-			}
284
-		}
285
-
286
-		/**
275
+        protected function checkBrowserVersion(){
276
+            $detected = $this->getBrowser();
277
+            $detect = array_search($detected, $this->browsers);
278
+            $browser = str_replace(array('/i','/'), '', $detect);
279
+            $regex = "/(?<browser>version|{$browser})[\/]+(?<version>[0-9.|a-zA-Z.]*)/i";
280
+            if (preg_match_all($regex, $this->agent, $matches)) {
281
+                $found = array_search($browser, $matches['browser']);
282
+                $this->version = $matches['version'][$found];
283
+            }
284
+        }
285
+
286
+        /**
287 287
          * Determine if the browser is Mobile or not
288 288
          */
289
-		protected function checkMobile() {
290
-			if (preg_match('/(android|avantgo|blackberry|bolt|boost|cricket'
289
+        protected function checkMobile() {
290
+            if (preg_match('/(android|avantgo|blackberry|bolt|boost|cricket'
291 291
                 . '|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\.browser|up\.link|webos|wos)/i', $this->agent) ) {
292
-				$this->isMobile = true;
293
-			}
294
-		}
292
+                $this->isMobile = true;
293
+            }
294
+        }
295 295
 
296
-		/**
296
+        /**
297 297
          * Determine if the browser is Tablet or not
298 298
          */
299
-		protected function checkTablet() {
300
-			if (preg_match('/tablet|ipad/i', $this->agent) ) {
301
-				$this->isTablet = true;
302
-			}
303
-		}
299
+        protected function checkTablet() {
300
+            if (preg_match('/tablet|ipad/i', $this->agent) ) {
301
+                $this->isTablet = true;
302
+            }
303
+        }
304 304
 
305
-		/**
305
+        /**
306 306
          * Determine if the browser is Robot or not
307 307
          */
308
-		protected function checkBot() {
309
-			if (preg_match('/bot/i', $this->agent) ) {
310
-				$this->isRobot = true;
311
-			}
312
-		}
308
+        protected function checkBot() {
309
+            if (preg_match('/bot/i', $this->agent) ) {
310
+                $this->isRobot = true;
311
+            }
312
+        }
313 313
 
314
-		/**
314
+        /**
315 315
          * Detect if URL is loaded from FacebookExternalHit
316 316
          */
317 317
         protected function checkFacebook() {
@@ -324,10 +324,10 @@  discard block
 block discarded – undo
324 324
         }
325 325
 
326 326
 
327
-		 /**
328
-         * Protected routine to calculate and determine what
329
-         *  the browser is in use (including platform)
330
-         */
327
+            /**
328
+             * Protected routine to calculate and determine what
329
+             *  the browser is in use (including platform)
330
+             */
331 331
         protected function determine() {
332 332
             $this->checkPlatform();
333 333
             $this->checkBrowser();
@@ -338,4 +338,4 @@  discard block
 block discarded – undo
338 338
             $this->checkFacebook();
339 339
         }
340 340
 		
341
-	}
341
+    }
Please login to merge, or discard this patch.
core/common.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 		
92 92
         //record the class instance
93 93
         $classes[$class] = isset($params) ? new $class($params) : new $class();
94
-		return $classes[$class];
94
+        return $classes[$class];
95 95
     }
96 96
 
97 97
     /**
@@ -179,17 +179,17 @@  discard block
 block discarded – undo
179 179
         die();
180 180
     }
181 181
 
182
-     /**
183
-     *  Function defined for PHP error message handling
184
-     *              
185
-     *  @param int $errno the type of error for example: E_USER_ERROR, E_USER_WARNING, etc.
186
-     *  @param string $errstr the error message
187
-     *  @param string $errfile the file where the error occurred
188
-     *  @param int $errline the line number where the error occurred
189
-     *  @codeCoverageIgnore
190
-     *  
191
-     *  @return boolean 
192
-     */
182
+        /**
183
+         *  Function defined for PHP error message handling
184
+         *              
185
+         *  @param int $errno the type of error for example: E_USER_ERROR, E_USER_WARNING, etc.
186
+         *  @param string $errstr the error message
187
+         *  @param string $errfile the file where the error occurred
188
+         *  @param int $errline the line number where the error occurred
189
+         *  @codeCoverageIgnore
190
+         *  
191
+         *  @return boolean 
192
+         */
193 193
     function fw_error_handler($errno, $errstr, $errfile, $errline) {
194 194
         $isError = (((E_ERROR | E_COMPILE_ERROR | E_CORE_ERROR | E_USER_ERROR) & $errno) === $errno);
195 195
         if ($isError) {
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
                 E_RECOVERABLE_ERROR  => 'Catchable Fatal Error'
213 213
         );
214 214
         if (isset($errorsType[$errno])) {
215
-           $errorType = $errorsType[$errno];
215
+            $errorType = $errorsType[$errno];
216 216
         }
217 217
         $errorText = 'An error is occurred in the file ' . $errfile . ' at line ' . $errline . ' raison : ' . $errstr;
218 218
         if ((error_reporting() & $errno) !== $errno) {
Please login to merge, or discard this patch.
core/libraries/Email.php 1 patch
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
             $addresses = array();
396 396
             foreach ($pairs as $name => $email) {
397 397
                 if (is_numeric($name)) {
398
-                   $name = null;
398
+                    $name = null;
399 399
                 }
400 400
                 $addresses[] = $this->formatHeader($email, $name);
401 401
             }
@@ -837,10 +837,10 @@  discard block
 block discarded – undo
837 837
             return $headers;
838 838
         }
839 839
 
840
-         /**
841
-         * Get the attachment message for send or the simple message
842
-         * @return string
843
-         */
840
+            /**
841
+             * Get the attachment message for send or the simple message
842
+             * @return string
843
+             */
844 844
         protected function getMessageWithAttachmentForSend() {
845 845
             $message = $this->getWrapMessage();
846 846
             if ($this->hasAttachments()) {
@@ -870,7 +870,7 @@  discard block
 block discarded – undo
870 870
          */
871 871
         protected function sendHelloCommand() {
872 872
             $responseCode = $this->sendCommand('EHLO ' . $this->getSmtpClientHostname())
873
-                                 ->getSmtpResponseCode();
873
+                                    ->getSmtpResponseCode();
874 874
             if ($responseCode !== 250) {
875 875
                 $this->error = $this->smtpResponse;
876 876
                 return false;
@@ -1017,7 +1017,7 @@  discard block
 block discarded – undo
1017 1017
             $message = $this->getMessageWithAttachmentForSend();
1018 1018
             $headers = $this->getHeadersForSend(); 
1019 1019
             $this->logger->info('Sending new mail using mail protocol, the information are listed below: '
1020
-                                  . 'destination: ' . $to . ', headers: ' . $headers . ', message: ' . $message);
1020
+                                    . 'destination: ' . $to . ', headers: ' . $headers . ', message: ' . $message);
1021 1021
             $result = mail($to, $this->subject, $message, $headers, $this->params);
1022 1022
             if (!$result) {
1023 1023
                 $this->error = 'Error when sending mail using mail protocol';
@@ -1025,10 +1025,10 @@  discard block
 block discarded – undo
1025 1025
             return $result;
1026 1026
         }
1027 1027
 
1028
-         /**
1029
-         * Send mail using "smtp" protocol
1030
-         * @return boolean
1031
-         */
1028
+            /**
1029
+             * Send mail using "smtp" protocol
1030
+             * @return boolean
1031
+             */
1032 1032
         protected function sendSmtp() {
1033 1033
             if (!$this->smtpConnection()) {
1034 1034
                 return false;
@@ -1038,7 +1038,7 @@  discard block
 block discarded – undo
1038 1038
             $message = $this->getMessageWithAttachmentForSend();
1039 1039
             $headers = $this->getHeadersForSend();
1040 1040
             $this->logger->info('Sending new mail using SMTP protocol, the information are listed below: '
1041
-                                  . 'destination: ' . $to . ', headers: ' . $headers . ', message: ' . $message);
1041
+                                    . 'destination: ' . $to . ', headers: ' . $headers . ', message: ' . $message);
1042 1042
             $recipients = array_merge($this->to, $this->cc, $this->bcc);
1043 1043
             $commands = array(
1044 1044
                                 'mail_from' => array('MAIL FROM: <' . $this->from . '>', 'MAIL_FROM', 250),
@@ -1089,17 +1089,17 @@  discard block
 block discarded – undo
1089 1089
         }
1090 1090
 
1091 1091
 
1092
-         /**
1093
-         * Return the client hostname for SMTP
1094
-         * 
1095
-         * There are only two legal types of hostname - either a fully
1096
-         * qualified domain name (eg: "mail.example.com") or an IP literal
1097
-         * (eg: "[1.2.3.4]").
1098
-         *
1099
-         * @link    https://tools.ietf.org/html/rfc5321#section-2.3.5
1100
-         * @link    http://cbl.abuseat.org/namingproblems.html
1101
-         * @return string
1102
-         */
1092
+            /**
1093
+             * Return the client hostname for SMTP
1094
+             * 
1095
+             * There are only two legal types of hostname - either a fully
1096
+             * qualified domain name (eg: "mail.example.com") or an IP literal
1097
+             * (eg: "[1.2.3.4]").
1098
+             *
1099
+             * @link    https://tools.ietf.org/html/rfc5321#section-2.3.5
1100
+             * @link    http://cbl.abuseat.org/namingproblems.html
1101
+             * @return string
1102
+             */
1103 1103
         protected function getSmtpClientHostname() {
1104 1104
             $globals = &class_loader('GlobalVar', 'classes');
1105 1105
             if ($globals->server('SERVER_NAME')) {
Please login to merge, or discard this patch.
core/classes/Lang.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
             if ($cookieLang && $this->isValid($cookieLang)) {
80 80
                 $this->current = $cookieLang;
81 81
                 $this->logger->info('Language from cookie [' . $cfgKey . '] is valid so '
82
-                                     .'we will set the language using the cookie value [' . $cookieLang . ']');
82
+                                        .'we will set the language using the cookie value [' . $cookieLang . ']');
83 83
             } else {
84 84
                 $this->logger->info('Language from cookie [' . $cfgKey . '] is not set, use the default value [' . $this->getDefault() . ']');
85 85
                 $this->current = $this->getDefault();
Please login to merge, or discard this patch.
core/classes/Loader.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
             $moduleConfigPath = get_instance()->module->findConfigFullPath($filename, $module);
220 220
             if ($moduleConfigPath) {
221 221
                 $this->logger->info('Found config [' . $filename . '] from module [' . $module . '], '
222
-                                  . 'the file path is [' . $moduleConfigPath . '] we will used it');
222
+                                    . 'the file path is [' . $moduleConfigPath . '] we will used it');
223 223
                 $configFilePath = $moduleConfigPath;
224 224
             } else {
225 225
                 $this->logger->info('Cannot find config [' . $filename . '] from modules using the default location');
@@ -479,7 +479,7 @@  discard block
 block discarded – undo
479 479
             $moduleLibraryPath = get_instance()->module->findLibraryFullPath($class, $module);
480 480
             if ($moduleLibraryPath) {
481 481
                 $this->logger->info('Found library [' . $class . '] from module [' . $module . '], the '
482
-                                   . 'file path is [' . $moduleLibraryPath . '] we will used it');
482
+                                    . 'file path is [' . $moduleLibraryPath . '] we will used it');
483 483
                 $libraryFilePath = $moduleLibraryPath;
484 484
             } else {
485 485
                 $this->logger->info('Cannot find library [' . $class . '] from modules using the default location');
Please login to merge, or discard this patch.
core/classes/model/DBSessionHandlerModel.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -29,8 +29,8 @@  discard block
 block discarded – undo
29 29
      */
30 30
 	
31 31
     /**
32
-    * DB session handler model class
33
-    */
32
+     * DB session handler model class
33
+     */
34 34
     abstract class DBSessionHandlerModel extends Model {
35 35
 		
36 36
         /**
@@ -40,14 +40,14 @@  discard block
 block discarded – undo
40 40
          *
41 41
          * @example
42 42
          * 	array(
43
-	 *	      'sid' => '', //VARCHAR(100) Note: this a primary key
44
-	 *	      'sdata' => '', //TEXT
45
-	 *	      'stime' => '', //unix timestamp (INT|BIGINT)
46
-	 *	      'shost' => '', //VARCHAR(255)
47
-	 *	      'sip' => '', //VARCHAR(128) 
48
-	 *	      'sbrowser' => '', //VARCHAR(255) 
49
-	 *	      'skey' => '' //VARCHAR(255) 
50
-	 *	);
43
+         *	      'sid' => '', //VARCHAR(100) Note: this a primary key
44
+         *	      'sdata' => '', //TEXT
45
+         *	      'stime' => '', //unix timestamp (INT|BIGINT)
46
+         *	      'shost' => '', //VARCHAR(255)
47
+         *	      'sip' => '', //VARCHAR(128) 
48
+         *	      'sbrowser' => '', //VARCHAR(255) 
49
+         *	      'skey' => '' //VARCHAR(255) 
50
+         *	);
51 51
          */
52 52
         protected $sessionTableColumns = array();
53 53
 
Please login to merge, or discard this patch.
core/classes/Config.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -46,9 +46,9 @@  discard block
 block discarded – undo
46 46
             if ($init) {
47 47
                 $this->init();
48 48
                 //@codeCoverageIgnoreStart
49
-                 if (ENVIRONMENT == 'production' && in_array(strtolower($this->config['log_level']), array('debug', 'info', 'notice'))) {
49
+                    if (ENVIRONMENT == 'production' && in_array(strtolower($this->config['log_level']), array('debug', 'info', 'notice'))) {
50 50
                     $this->logger->warning('You are in production environment, please set '
51
-                                           . 'log level to WARNING, ERROR, CRITICAL, ALERT, EMERGENCY to increase the application performance');
51
+                                            . 'log level to WARNING, ERROR, CRITICAL, ALERT, EMERGENCY to increase the application performance');
52 52
                 }
53 53
                 //@codeCoverageIgnoreEnd
54 54
             }
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
             if (empty($this->config['base_url'])) {
147 147
                 if (ENVIRONMENT == 'production') {
148 148
                     $this->logger->warning('Application base URL is not set or invalid, please'
149
-                                           . ' set application base URL to increase the application loading time');
149
+                                            . ' set application base URL to increase the application loading time');
150 150
                 }
151 151
                 $baseUrl = null;
152 152
                 $protocol = 'http';
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
                                                                     );
174 174
                 } else {
175 175
                     $this->logger->warning('Can not determine the application '
176
-                                           . 'base URL automatically, use http://localhost as default');
176
+                                            . 'base URL automatically, use http://localhost as default');
177 177
                     $baseUrl = 'http://localhost/';
178 178
                 }
179 179
                 $this->config['base_url'] = $baseUrl;
@@ -182,11 +182,11 @@  discard block
 block discarded – undo
182 182
         }
183 183
          
184 184
         /**
185
-        * Return the server port using variable
186
-        *
187
-        * @codeCoverageIgnore
188
-        * @return string
189
-        */
185
+         * Return the server port using variable
186
+         *
187
+         * @codeCoverageIgnore
188
+         * @return string
189
+         */
190 190
         protected function getServerPort() {
191 191
             $globals = & class_loader('GlobalVar', 'classes');
192 192
             $serverPort = $globals->server('SERVER_PORT');
Please login to merge, or discard this patch.
core/classes/Router.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -276,14 +276,14 @@  discard block
 block discarded – undo
276 276
         }
277 277
 
278 278
         /**
279
-        * Setting the route configuration using the configuration file 
280
-        * and additional configuration from param
281
-        * @param array $overwriteConfig the additional configuration 
282
-        * to overwrite with the existing one
283
-        * @param boolean $useConfigFile whether to use route configuration file
284
-        * 
285
-        * @return object
286
-        */
279
+         * Setting the route configuration using the configuration file 
280
+         * and additional configuration from param
281
+         * @param array $overwriteConfig the additional configuration 
282
+         * to overwrite with the existing one
283
+         * @param boolean $useConfigFile whether to use route configuration file
284
+         * 
285
+         * @return object
286
+         */
287 287
         public function setRouteConfiguration(array $overwriteConfig = array(), $useConfigFile = true) {
288 288
             $route = array();
289 289
             if ($useConfigFile && file_exists(CONFIG_PATH . 'routes.php')) {
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
             //the URL like http://domain.com/module/controller/method/arg1/arg2/argn 
365 365
             if (!$this->controller) {
366 366
                 $this->logger->info('Cannot determine the routing information ' 
367
-                       . 'using the predefined routes configuration, will use the request URI parameters');
367
+                        . 'using the predefined routes configuration, will use the request URI parameters');
368 368
                 //determine route parameters using the route URI param
369 369
                 $this->determineRouteParamsFromRequestUri();
370 370
             }
@@ -478,11 +478,11 @@  discard block
 block discarded – undo
478 478
             }
479 479
         }
480 480
 
481
-         /**
482
-         * Remove the URL suffix and query string values if exists
483
-         * @param  string $uri the route URI to process
484
-         * @return string      the final route uri after processed
485
-         */
481
+            /**
482
+             * Remove the URL suffix and query string values if exists
483
+             * @param  string $uri the route URI to process
484
+             * @return string      the final route uri after processed
485
+             */
486 486
         protected function removeSuffixAndQueryStringFromUri($uri) {
487 487
             $this->logger->debug('Check if URL suffix is enabled in the configuration');
488 488
             //remove url suffix from the request URI
@@ -598,7 +598,7 @@  discard block
 block discarded – undo
598 598
                 $this->logger->info(
599 599
                                     'After loop in predefined routes configuration,'
600 600
                                     . 'the module name is set but the controller is not set,' 
601
-									. 'so we will use module as the controller'
601
+                                    . 'so we will use module as the controller'
602 602
                                 );
603 603
                 $this->controller = $this->module;
604 604
             }
Please login to merge, or discard this patch.
core/classes/Url.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@
 block discarded – undo
128 128
                     break;
129 129
                 }
130 130
             }
131
-	    $port = get_instance()->request->server('SERVER_PORT');
131
+        $port = get_instance()->request->server('SERVER_PORT');
132 132
             if ($port && !in_array($port, array(80, 443))) {
133 133
                 $domain .= ':' . $port;
134 134
             }
Please login to merge, or discard this patch.