Passed
Branch 1.0.0-dev (a5e91d)
by nguereza
02:42
created
core/common.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@
 block discarded – undo
148 148
         static $cfg;
149 149
         if (empty($cfg)) {
150 150
             $cfg[0] = & load_configurations();
151
-            if(! is_array($cfg[0])){
151
+            if (!is_array($cfg[0])) {
152 152
                 $cfg[0] = array();
153 153
             }
154 154
         }
Please login to merge, or discard this patch.
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -270,15 +270,15 @@
 block discarded – undo
270 270
         die();
271 271
     }
272 272
 
273
-       /**
274
-     *  Function defined for handling PHP exception error message, 
275
-     *  it displays an error message using the function "show_error"
276
-     *  
277
-     *  @param object $ex instance of the "Exception" class or a derived class
278
-     *  @codeCoverageIgnore
279
-     *  
280
-     *  @return boolean
281
-     */
273
+        /**
274
+         *  Function defined for handling PHP exception error message, 
275
+         *  it displays an error message using the function "show_error"
276
+         *  
277
+         *  @param object $ex instance of the "Exception" class or a derived class
278
+         *  @codeCoverageIgnore
279
+         *  
280
+         *  @return boolean
281
+         */
282 282
     function fw_exception_handler($ex) {
283 283
         if (str_ireplace(array('off', 'none', 'no', 'false', 'null'), '', ini_get('display_errors'))) {
284 284
             show_error('An exception is occured in file ' . $ex->getFile() . ' at line ' . $ex->getLine() . ' raison : ' . $ex->getMessage(), 'PHP Exception #' . $ex->getCode());
Please login to merge, or discard this patch.
core/classes/DBSessionHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -343,7 +343,7 @@
 block discarded – undo
343 343
          * Get some parameters data need like ip address, hostname, browser info, etc.
344 344
          * @return array
345 345
          */
346
-        protected function getSessionDataParams(){
346
+        protected function getSessionDataParams() {
347 347
             $this->getLoader()->functions('user_agent'); 
348 348
             $this->getLoader()->library('Browser'); 
349 349
             
Please login to merge, or discard this patch.
core/libraries/Browser.php 3 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -364,7 +364,7 @@
 block discarded – undo
364 364
             if (stristr($this->_agent, 'FacebookExternalHit')) {
365 365
                 $this->setRobot(true);
366 366
                 $this->setFacebook(true);
367
-            }  else if (stristr($this->_agent, 'FBIOS')) {
367
+            } else if (stristr($this->_agent, 'FBIOS')) {
368 368
                 $this->setFacebook(true);
369 369
             }
370 370
         }
Please login to merge, or discard this patch.
Indentation   +120 added lines, -120 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 $_browser_name = '';
94 94
 
95 95
         /**
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
          */
129 129
         private $_is_facebook = false;
130 130
 
131
-		/**
131
+        /**
132 132
          * Class constructor
133 133
          */
134 134
         public function __construct($userAgent = '') {
@@ -255,12 +255,12 @@  discard block
 block discarded – undo
255 255
             return $this->_is_facebook;
256 256
         }
257 257
 
258
-         /**
259
-         * Returns a formatted string with a summary of the details of the browser.
260
-         * @codeCoverageIgnore
261
-         * 
262
-         * @return string formatted string with a summary of the browser
263
-         */
258
+            /**
259
+             * Returns a formatted string with a summary of the details of the browser.
260
+             * @codeCoverageIgnore
261
+             * 
262
+             * @return string formatted string with a summary of the browser
263
+             */
264 264
         public function __toString() {
265 265
             return "<strong>Browser Name:</strong> {$this->getBrowser()}<br/>\n" .
266 266
                 "<strong>Browser Version:</strong> {$this->getVersion()}<br/>\n" .
@@ -304,69 +304,69 @@  discard block
 block discarded – undo
304 304
         /**
305 305
          * Determine the user's platform
306 306
          */
307
-		protected function checkPlatform() { 
308
-			foreach ($this->_platforms as $regex => $value) { 
309
-				if (preg_match($regex, $this->_agent) ) {
310
-					$this->setPlatform($value);
311
-					break;
312
-				}
313
-			}   
314
-		}
307
+        protected function checkPlatform() { 
308
+            foreach ($this->_platforms as $regex => $value) { 
309
+                if (preg_match($regex, $this->_agent) ) {
310
+                    $this->setPlatform($value);
311
+                    break;
312
+                }
313
+            }   
314
+        }
315 315
 
316
-		/**
316
+        /**
317 317
          * Routine to determine the browser type
318 318
          */
319
-		protected function checkBrowser() {
320
-			foreach ($this->_browsers as $regex => $value) { 
321
-				if (preg_match($regex, $this->_agent ) ) {
322
-					$this->setBrowser($value);
323
-					break;
324
-				}
325
-			}
326
-		}
319
+        protected function checkBrowser() {
320
+            foreach ($this->_browsers as $regex => $value) { 
321
+                if (preg_match($regex, $this->_agent ) ) {
322
+                    $this->setBrowser($value);
323
+                    break;
324
+                }
325
+            }
326
+        }
327 327
 
328
-		/**
328
+        /**
329 329
          * Routine to determine the browser version
330 330
          */
331
-		protected function checkBrowserVersion(){
332
-			$detected = $this->getBrowser();
333
-			$d = array_search($detected, $this->_browsers);
334
-			$browser = str_replace(array("/i","/"), "", $d);
335
-			$regex = "/(?<browser>version|{$browser})[\/]+(?<version>[0-9.|a-zA-Z.]*)/i";
336
-			if (preg_match_all($regex, $this->_agent, $matches)) {
337
-				$found = array_search($browser, $matches["browser"]);
338
-				$this->setVersion($matches["version"][$found]);
339
-			}
340
-		}
341
-
342
-		/**
331
+        protected function checkBrowserVersion(){
332
+            $detected = $this->getBrowser();
333
+            $d = array_search($detected, $this->_browsers);
334
+            $browser = str_replace(array("/i","/"), "", $d);
335
+            $regex = "/(?<browser>version|{$browser})[\/]+(?<version>[0-9.|a-zA-Z.]*)/i";
336
+            if (preg_match_all($regex, $this->_agent, $matches)) {
337
+                $found = array_search($browser, $matches["browser"]);
338
+                $this->setVersion($matches["version"][$found]);
339
+            }
340
+        }
341
+
342
+        /**
343 343
          * Determine if the browser is Mobile or not
344 344
          */
345
-		protected function checkMobile() {
346
-			if (preg_match('/(android|avantgo|blackberry|bolt|boost|cricket|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\.browser|up\.link|webos|wos)/i', $this->_agent) ) {
347
-				$this->setMobile(true);
348
-			}
349
-		}
345
+        protected function checkMobile() {
346
+            if (preg_match('/(android|avantgo|blackberry|bolt|boost|cricket|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\.browser|up\.link|webos|wos)/i', $this->_agent) ) {
347
+                $this->setMobile(true);
348
+            }
349
+        }
350 350
 
351
-		/**
351
+        /**
352 352
          * Determine if the browser is Tablet or not
353 353
          */
354
-		protected function checkTablet() {
355
-			if (preg_match('/tablet|ipad/i', $this->_agent) ) {
356
-				$this->setTablet(true);
357
-			}
358
-		}
354
+        protected function checkTablet() {
355
+            if (preg_match('/tablet|ipad/i', $this->_agent) ) {
356
+                $this->setTablet(true);
357
+            }
358
+        }
359 359
 
360
-		/**
360
+        /**
361 361
          * Determine if the browser is Robot or not
362 362
          */
363
-		protected function checkBot() {
364
-			if (preg_match('/bot/i', $this->_agent) ) {
365
-				$this->setRobot(true);
366
-			}
367
-		}
363
+        protected function checkBot() {
364
+            if (preg_match('/bot/i', $this->_agent) ) {
365
+                $this->setRobot(true);
366
+            }
367
+        }
368 368
 
369
-		/**
369
+        /**
370 370
          * Detect if URL is loaded from FacebookExternalHit
371 371
          */
372 372
         protected function checkFacebook() {
@@ -379,10 +379,10 @@  discard block
 block discarded – undo
379 379
         }
380 380
 
381 381
 
382
-		 /**
383
-         * Protected routine to calculate and determine what
384
-         *  the browser is in use (including platform)
385
-         */
382
+            /**
383
+             * Protected routine to calculate and determine what
384
+             *  the browser is in use (including platform)
385
+             */
386 386
         protected function determine() {
387 387
             $this->checkPlatform();
388 388
             $this->checkBrowser();
@@ -393,4 +393,4 @@  discard block
 block discarded – undo
393 393
             $this->checkFacebook();
394 394
         }
395 395
 		
396
-	}
396
+    }
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
          * Reset all properties
145 145
          */
146 146
         public function reset() {
147
-            $this->_agent =  get_instance()->globalvar->server('HTTP_USER_AGENT');
147
+            $this->_agent = get_instance()->globalvar->server('HTTP_USER_AGENT');
148 148
             $this->_browser_name = 'unknown';
149 149
             $this->_version = 'unknown';
150 150
             $this->_platform = 'unknown';
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
          */
307 307
 		protected function checkPlatform() { 
308 308
 			foreach ($this->_platforms as $regex => $value) { 
309
-				if (preg_match($regex, $this->_agent) ) {
309
+				if (preg_match($regex, $this->_agent)) {
310 310
 					$this->setPlatform($value);
311 311
 					break;
312 312
 				}
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
          */
319 319
 		protected function checkBrowser() {
320 320
 			foreach ($this->_browsers as $regex => $value) { 
321
-				if (preg_match($regex, $this->_agent ) ) {
321
+				if (preg_match($regex, $this->_agent)) {
322 322
 					$this->setBrowser($value);
323 323
 					break;
324 324
 				}
@@ -328,10 +328,10 @@  discard block
 block discarded – undo
328 328
 		/**
329 329
          * Routine to determine the browser version
330 330
          */
331
-		protected function checkBrowserVersion(){
331
+		protected function checkBrowserVersion() {
332 332
 			$detected = $this->getBrowser();
333 333
 			$d = array_search($detected, $this->_browsers);
334
-			$browser = str_replace(array("/i","/"), "", $d);
334
+			$browser = str_replace(array("/i", "/"), "", $d);
335 335
 			$regex = "/(?<browser>version|{$browser})[\/]+(?<version>[0-9.|a-zA-Z.]*)/i";
336 336
 			if (preg_match_all($regex, $this->_agent, $matches)) {
337 337
 				$found = array_search($browser, $matches["browser"]);
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
          * Determine if the browser is Mobile or not
344 344
          */
345 345
 		protected function checkMobile() {
346
-			if (preg_match('/(android|avantgo|blackberry|bolt|boost|cricket|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\.browser|up\.link|webos|wos)/i', $this->_agent) ) {
346
+			if (preg_match('/(android|avantgo|blackberry|bolt|boost|cricket|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\.browser|up\.link|webos|wos)/i', $this->_agent)) {
347 347
 				$this->setMobile(true);
348 348
 			}
349 349
 		}
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
          * Determine if the browser is Tablet or not
353 353
          */
354 354
 		protected function checkTablet() {
355
-			if (preg_match('/tablet|ipad/i', $this->_agent) ) {
355
+			if (preg_match('/tablet|ipad/i', $this->_agent)) {
356 356
 				$this->setTablet(true);
357 357
 			}
358 358
 		}
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
          * Determine if the browser is Robot or not
362 362
          */
363 363
 		protected function checkBot() {
364
-			if (preg_match('/bot/i', $this->_agent) ) {
364
+			if (preg_match('/bot/i', $this->_agent)) {
365 365
 				$this->setRobot(true);
366 366
 			}
367 367
 		}
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
             if (stristr($this->_agent, 'FacebookExternalHit')) {
374 374
                 $this->setRobot(true);
375 375
                 $this->setFacebook(true);
376
-            }  else if (stristr($this->_agent, 'FBIOS')) {
376
+            } else if (stristr($this->_agent, 'FBIOS')) {
377 377
                 $this->setFacebook(true);
378 378
             }
379 379
         }
Please login to merge, or discard this patch.
core/classes/model/Model.php 2 patches
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -746,22 +746,22 @@  discard block
 block discarded – undo
746 746
             return $this->loaderInstance;
747 747
         }
748 748
 
749
-         /**
750
-         * Get the return type array or object
751
-         * @return string|boolean
752
-         */
749
+            /**
750
+             * Get the return type array or object
751
+             * @return string|boolean
752
+             */
753 753
         protected function getReturnType(){
754 754
             $type = false;
755 755
             if ($this->_temporary_return_type == 'array') {
756
-               $type = 'array';
756
+                $type = 'array';
757 757
             }
758 758
             return $type;
759 759
         }
760 760
 
761
-         /**
762
-         * Check if soft delete is enable setting the condition
763
-         * @return object the current instance 
764
-         */
761
+            /**
762
+             * Check if soft delete is enable setting the condition
763
+             * @return object the current instance 
764
+             */
765 765
         protected function checkForSoftDelete(){
766 766
             if ($this->soft_delete && $this->_temporary_with_deleted !== true) {
767 767
                 $this->getQueryBuilder()->where($this->soft_delete_key, (bool) $this->_temporary_only_deleted);
@@ -769,14 +769,14 @@  discard block
 block discarded – undo
769 769
             return $this;
770 770
         }
771 771
 
772
-         /**
773
-         * Relate for "belongs_to" and "has_many"
774
-         * @param  string $relationship the name of relation
775
-         * @param  string|array $options      the model and primary key values
776
-         * @param  object|array $row          the row to update
777
-         * @param  string $type         the type can be "belongs_to", "has_many"
778
-         * @return mixed               the final row values
779
-         */
772
+            /**
773
+             * Relate for "belongs_to" and "has_many"
774
+             * @param  string $relationship the name of relation
775
+             * @param  string|array $options      the model and primary key values
776
+             * @param  object|array $row          the row to update
777
+             * @param  string $type         the type can be "belongs_to", "has_many"
778
+             * @return mixed               the final row values
779
+             */
780 780
         protected function relateBelongsToAndHasMany($relationship, $options, $row, $type){
781 781
             if (in_array($relationship, $this->_with)) {
782 782
                 $loaderInstance = $this->getLoaderInstanceOrCreate();
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
                 $instance = $db;
152 152
             } else {
153 153
                 $obj = & get_instance();
154
-                if (isset($obj->database)){
154
+                if (isset($obj->database)) {
155 155
                     /**
156 156
                      * NOTE: Need use "clone" because some Model need have the personal instance of the database library
157 157
                      * to prevent duplication
@@ -730,7 +730,7 @@  discard block
 block discarded – undo
730 730
          * @return object
731 731
          */
732 732
         protected function getLoaderInstanceOrCreate() {
733
-            if (! is_object($this->loaderInstance)) {
733
+            if (!is_object($this->loaderInstance)) {
734 734
                 $this->loaderInstance = & get_instance()->loader;
735 735
             } 
736 736
             return $this->loaderInstance;
@@ -740,7 +740,7 @@  discard block
 block discarded – undo
740 740
          * Get the return type array or object
741 741
          * @return string|boolean
742 742
          */
743
-        protected function getReturnType(){
743
+        protected function getReturnType() {
744 744
             $type = false;
745 745
             if ($this->_temporary_return_type == 'array') {
746 746
                $type = 'array';
@@ -752,7 +752,7 @@  discard block
 block discarded – undo
752 752
          * Check if soft delete is enable setting the condition
753 753
          * @return object the current instance 
754 754
          */
755
-        protected function checkForSoftDelete(){
755
+        protected function checkForSoftDelete() {
756 756
             if ($this->soft_delete && $this->_temporary_with_deleted !== true) {
757 757
                 $this->getQueryBuilder()->where($this->soft_delete_key, (bool) $this->_temporary_only_deleted);
758 758
             }
@@ -767,12 +767,12 @@  discard block
 block discarded – undo
767 767
          * @param  string $type         the type can be "belongs_to", "has_many"
768 768
          * @return mixed               the final row values
769 769
          */
770
-        protected function relateBelongsToAndHasMany($relationship, $options, $row, $type){
770
+        protected function relateBelongsToAndHasMany($relationship, $options, $row, $type) {
771 771
             if (in_array($relationship, $this->_with)) {
772 772
                 $loaderInstance = $this->getLoaderInstanceOrCreate();
773 773
                 $loaderInstance->model($options['model'], $relationship . '_model');
774 774
 
775
-                if($type == 'belongs_to'){
775
+                if ($type == 'belongs_to') {
776 776
                     if (is_object($row)) {
777 777
                         $row->{$relationship} = $this->{$relationship . '_model'}->get($row->{$options['primary_key']});
778 778
                     } else {
Please login to merge, or discard this patch.
core/classes/Loader.php 3 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -316,8 +316,7 @@
 block discarded – undo
316 316
             $searchDir = null;
317 317
             if ($type == 'function') {
318 318
                $searchDir = array(FUNCTIONS_PATH, CORE_FUNCTIONS_PATH);
319
-            }
320
-            else if ($type == 'language') {
319
+            } else if ($type == 'language') {
321 320
                 $searchDir = array(APP_LANG_PATH, CORE_LANG_PATH);
322 321
                 $file = $appLang . DS . $file;
323 322
             }
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -311,7 +311,7 @@
 block discarded – undo
311 311
         protected function getDefaultFilePathForFunctionLanguage($file, $type, $appLang = null){
312 312
             $searchDir = null;
313 313
             if ($type == 'function') {
314
-               $searchDir = array(FUNCTIONS_PATH, CORE_FUNCTIONS_PATH);
314
+                $searchDir = array(FUNCTIONS_PATH, CORE_FUNCTIONS_PATH);
315 315
             }
316 316
             else if ($type == 'language') {
317 317
                 $searchDir = array(APP_LANG_PATH, CORE_LANG_PATH);
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
          * @param  string $appLang the application language, only if type = "language"
309 309
          * @return string|null          the full file path
310 310
          */
311
-        protected function getDefaultFilePathForFunctionLanguage($file, $type, $appLang = null){
311
+        protected function getDefaultFilePathForFunctionLanguage($file, $type, $appLang = null) {
312 312
             $searchDir = null;
313 313
             if ($type == 'function') {
314 314
                $searchDir = array(FUNCTIONS_PATH, CORE_FUNCTIONS_PATH);
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
          * @param  string|null $module the module if is not null will return it
335 335
          * @return string|null
336 336
          */
337
-        protected function getModuleFromSuperController($module){
337
+        protected function getModuleFromSuperController($module) {
338 338
             $obj = & get_instance();
339 339
             if (!$module && !empty($obj->moduleName)) {
340 340
                 $module = $obj->moduleName;
Please login to merge, or discard this patch.
core/classes/BaseStaticClass.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
                 self::$logger = $logger[0];
45 45
             }
46 46
             if ($setLoggerName) {
47
-               self::$logger->setLogger('Class::' . get_called_class());
47
+                self::$logger->setLogger('Class::' . get_called_class());
48 48
             }
49 49
             return self::$logger;			
50 50
         }
Please login to merge, or discard this patch.
index.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -189,11 +189,11 @@
 block discarded – undo
189 189
      */
190 190
     define('VAR_PATH', ROOT_PATH . 'var' . DS);
191 191
     
192
-     /**
193
-     * The path to the directory of your cache files.
194
-     *
195
-     * This feature is available currently for database and views.
196
-     */
192
+        /**
193
+         * The path to the directory of your cache files.
194
+         *
195
+         * This feature is available currently for database and views.
196
+         */
197 197
     define('CACHE_PATH', VAR_PATH . 'cache' . DS);
198 198
     
199 199
     /**
Please login to merge, or discard this patch.
core/libraries/Email.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
             }
283 283
             $filename = $this->encodeUtf8($this->filterOther((string) $filename));
284 284
             if (empty($data)) {
285
-               $data = $this->getAttachmentData($path);
285
+                $data = $this->getAttachmentData($path);
286 286
             }
287 287
             $this->_attachments[] = array(
288 288
                 'path' => $path,
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
             $addresses = array();
347 347
             foreach ($pairs as $name => $email) {
348 348
                 if (is_numeric($name)) {
349
-                   $name = null;
349
+                    $name = null;
350 350
                 }
351 351
                 $addresses[] = $this->formatHeader($email, $name);
352 352
             }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
      * @link      http://github.com/eoghanobrien/php-simple-mail
49 49
      */
50 50
 
51
-    class Email extends BaseClass{
51
+    class Email extends BaseClass {
52 52
         /**
53 53
          * @var int $_wrap
54 54
          */
Please login to merge, or discard this patch.
core/classes/Module.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
         public function add($name) {
67 67
             $logger = self::getLogger();
68 68
             if (in_array($name, self::$list)) {
69
-               $logger->info('The module [' .$name. '] already added skipping.');
69
+               $logger->info('The module [' . $name . '] already added skipping.');
70 70
                return $this;
71 71
             }
72 72
             self::$list[] = $name;
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
             $logger->debug('Check if the application contains the modules ...');
41 41
             $dirList = glob(MODULE_PATH . '*', GLOB_ONLYDIR);
42 42
             if ($dirList !== false) {
43
-               self::$list = array_map('basename', $dirList);
43
+                self::$list = array_map('basename', $dirList);
44 44
             }
45 45
             if (!empty(self::$list)) {
46 46
                 $logger->info('The application contains the module below [' . implode(', ', self::getModuleList()) . ']');
@@ -57,8 +57,8 @@  discard block
 block discarded – undo
57 57
         public function add($name) {
58 58
             $logger = self::getLogger();
59 59
             if (in_array($name, self::$list)) {
60
-               $logger->info('The module [' .$name. '] already added skipping.');
61
-               return $this;
60
+                $logger->info('The module [' .$name. '] already added skipping.');
61
+                return $this;
62 62
             }
63 63
             self::$list[] = $name;
64 64
             return $this;
@@ -88,10 +88,10 @@  discard block
 block discarded – undo
88 88
             self::$list = array();
89 89
         }
90 90
 
91
-         /**
92
-         * Get the list of module loaded
93
-         * @return array the module list
94
-         */
91
+            /**
92
+             * Get the list of module loaded
93
+             * @return array the module list
94
+             */
95 95
         public static function getModuleList() {
96 96
             return self::$list;
97 97
         }
Please login to merge, or discard this patch.