Test Failed
Push — 1.0.0-dev ( 970760...fdf7af )
by nguereza
02:47
created
core/classes/Module.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -66,8 +66,8 @@  discard block
 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.');
70
-               return $this;
69
+                $logger->info('The module [' .$name. '] already added skipping.');
70
+                return $this;
71 71
             }
72 72
             self::$list[] = $name;
73 73
             return $this;
@@ -97,10 +97,10 @@  discard block
 block discarded – undo
97 97
             self::$list = array();
98 98
         }
99 99
 
100
-         /**
101
-         * Get the list of module loaded
102
-         * @return array the module list
103
-         */
100
+            /**
101
+             * Get the list of module loaded
102
+             * @return array the module list
103
+             */
104 104
         public static function getModuleList() {
105 105
             return self::$list;
106 106
         }
Please login to merge, or discard this patch.
app/config/autoload.php 1 patch
Indentation   +85 added lines, -85 removed lines patch added patch discarded remove patch
@@ -25,103 +25,103 @@
 block discarded – undo
25 25
      */
26 26
 
27 27
     /**
28
-	* This file contains the configuration of resources that you want to load automatically: 
29
-	* personals or systems libraries, configuration files, models, languages
30
-	* personals functions or systems that are used often in your application 
31
-	* instead of loading them every time you want to use it.
32
-	* Note: loading a lot of resources can decrease the performance of your application.
33
-	*/
28
+     * This file contains the configuration of resources that you want to load automatically: 
29
+     * personals or systems libraries, configuration files, models, languages
30
+     * personals functions or systems that are used often in your application 
31
+     * instead of loading them every time you want to use it.
32
+     * Note: loading a lot of resources can decrease the performance of your application.
33
+     */
34 34
 
35 35
 
36
-	/**
37
-	* If you have personals libraries or systems to load automatically, then list them in the following array.
38
-	* For example :
39
-	*
40
-	*	$autoload['libraries'] = array('library1', 'library2');
41
-	*
42
-	* Using module:
43
-	* 
44
-	*   $autoload['libraries'] = array('module1/library1', 'module2/library1');
45
-	*
46
-	* Note: Systems libraries have priority over personals libraries, 
47
-	* ie the loading order is as follows: it looks in the folder of the systems libraries, 
48
-	* if it is found, it is loaded, if not, it search in the module directories, if it is found, 
49
-	* it is loaded, if not will search in personals libraries folder, 
50
-	* before returning an error in case it does not find it.
51
-	*/
36
+    /**
37
+     * If you have personals libraries or systems to load automatically, then list them in the following array.
38
+     * For example :
39
+     *
40
+     *	$autoload['libraries'] = array('library1', 'library2');
41
+     *
42
+     * Using module:
43
+     * 
44
+     *   $autoload['libraries'] = array('module1/library1', 'module2/library1');
45
+     *
46
+     * Note: Systems libraries have priority over personals libraries, 
47
+     * ie the loading order is as follows: it looks in the folder of the systems libraries, 
48
+     * if it is found, it is loaded, if not, it search in the module directories, if it is found, 
49
+     * it is loaded, if not will search in personals libraries folder, 
50
+     * before returning an error in case it does not find it.
51
+     */
52 52
     $autoload['libraries'] = array();
53 53
 
54 54
     /**
55
-	* If you have configuration files to load automatically, then list them in the following array.
56
-	* For example :
57
-	*
58
-	*	$autoload['config'] = array('config1', 'config2');
59
-	*
60
-	* Using module:
61
-	* 
62
-	*   $autoload['config'] = array('module1/config1', 'module2/config2');
63
-	*
64
-	* Note 1: the file name must have as prefix "config_" for config file inside CONFIG_PATH folder
65
-	* for example "config_name_of_the_file_config.php" and contains as configuration variable the array $config,
66
-	* otherwise the system can not find this configuration file.
67
-	* For example :
68
-	*
69
-	*	$config['key1'] = value1;
70
-	* 	$config['key2'] = value2;
71
-	*
72
-	* Note 2: the files to be loaded must be in the folder defined by the constant "CONFIG_PATH" in "index.php".
73
-	* or inside the "config" of your application modules
74
-	*/
55
+     * If you have configuration files to load automatically, then list them in the following array.
56
+     * For example :
57
+     *
58
+     *	$autoload['config'] = array('config1', 'config2');
59
+     *
60
+     * Using module:
61
+     * 
62
+     *   $autoload['config'] = array('module1/config1', 'module2/config2');
63
+     *
64
+     * Note 1: the file name must have as prefix "config_" for config file inside CONFIG_PATH folder
65
+     * for example "config_name_of_the_file_config.php" and contains as configuration variable the array $config,
66
+     * otherwise the system can not find this configuration file.
67
+     * For example :
68
+     *
69
+     *	$config['key1'] = value1;
70
+     * 	$config['key2'] = value2;
71
+     *
72
+     * Note 2: the files to be loaded must be in the folder defined by the constant "CONFIG_PATH" in "index.php".
73
+     * or inside the "config" of your application modules
74
+     */
75 75
     $autoload['config'] = array();
76 76
 
77 77
     /**
78
-	* If you have models to load automatically, then list them in the following array.
79
-	* For example :
80
-	*
81
-	*	$autoload['models'] = array('model1', 'model2');
82
-	*
83
-	* Using module:
84
-	* 
85
-	*   $autoload['models'] = array('module1/model1', 'module2/model2');
86
-	*/
78
+     * If you have models to load automatically, then list them in the following array.
79
+     * For example :
80
+     *
81
+     *	$autoload['models'] = array('model1', 'model2');
82
+     *
83
+     * Using module:
84
+     * 
85
+     *   $autoload['models'] = array('module1/model1', 'module2/model2');
86
+     */
87 87
     $autoload['models'] = array();
88 88
 
89 89
     /**
90
-	* If you have systems or personals functions to load automatically, specify them in the following array.
91
-	* For example :
92
-	*
93
-	* 	$autoload['functions'] = array('function1', 'function2');
94
-	*
95
-	* Using module:
96
-	* 
97
-	*   $autoload['functions'] = array('module1/function1', 'module2/function2');
98
-	*
99
-	* Note 1: Personal functions have priority over system functions,
100
-	* that is to say that the order of loading is the following : it looks in the directory of the modules functions, 
101
-	* if it is found, it is loaded, otherwise, it looks in the directory of the personal functions,
102
-	* if it is found, it is loaded, otherwise, it looks in the directory of the system functions,
103
-	* before returning an error in case he does not find it.
104
-	*
105
-	* Note 2: the file name must have as prefix "function_" for example "function_foo.php" then
106
-	* will use:
107
-	* 
108
-	*  $autoload['functions'] = array('foo');
109
-	*/
90
+     * If you have systems or personals functions to load automatically, specify them in the following array.
91
+     * For example :
92
+     *
93
+     * 	$autoload['functions'] = array('function1', 'function2');
94
+     *
95
+     * Using module:
96
+     * 
97
+     *   $autoload['functions'] = array('module1/function1', 'module2/function2');
98
+     *
99
+     * Note 1: Personal functions have priority over system functions,
100
+     * that is to say that the order of loading is the following : it looks in the directory of the modules functions, 
101
+     * if it is found, it is loaded, otherwise, it looks in the directory of the personal functions,
102
+     * if it is found, it is loaded, otherwise, it looks in the directory of the system functions,
103
+     * before returning an error in case he does not find it.
104
+     *
105
+     * Note 2: the file name must have as prefix "function_" for example "function_foo.php" then
106
+     * will use:
107
+     * 
108
+     *  $autoload['functions'] = array('foo');
109
+     */
110 110
     $autoload['functions'] = array();
111 111
 	
112 112
     /**
113
-	* If you have systems or personals languages to load automatically, specify them in the following array.
114
-	* For example :
115
-	*
116
-	* 	$autoload['languages'] = array('lang1', 'lang2');
117
-	*
118
-	* Using module:
119
-	* 
120
-	*   $autoload['languages'] = array('module1/lang1', 'module2/lang2');
121
-	*
122
-	* Note: the file name must have as prefix "lang_" for example "lang_foo.php" then
123
-	* will use:
124
-	* 
125
-	*  $autoload['languages'] = array('foo');
126
-	*/
113
+     * If you have systems or personals languages to load automatically, specify them in the following array.
114
+     * For example :
115
+     *
116
+     * 	$autoload['languages'] = array('lang1', 'lang2');
117
+     *
118
+     * Using module:
119
+     * 
120
+     *   $autoload['languages'] = array('module1/lang1', 'module2/lang2');
121
+     *
122
+     * Note: the file name must have as prefix "lang_" for example "lang_foo.php" then
123
+     * will use:
124
+     * 
125
+     *  $autoload['languages'] = array('foo');
126
+     */
127 127
     $autoload['languages'] = array();
Please login to merge, or discard this patch.
core/classes/Request.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -262,24 +262,24 @@
 block discarded – undo
262 262
             return $this;
263 263
         }
264 264
 
265
-         /**
266
-         * Return the instance of session.
267
-         * @return object the session instance
268
-         */
265
+            /**
266
+             * Return the instance of session.
267
+             * @return object the session instance
268
+             */
269 269
         public function getSession() {
270 270
             return $this->session;
271 271
         }
272 272
 
273
-         /**
274
-         * Set the value for $_GET, $_POST, $_SERVER etc. if the key is an array will
275
-         * set the current super variable value by this.
276
-         * @param string $type the type can be "post", "get", etc.
277
-         * @param  string|array  $key the item key to be set or array if need set the current global variable 
278
-         * by this value
279
-         * @param mixed $value the value to set if $key is not an array
280
-         *
281
-         * @return object       the current instance
282
-         */
273
+            /**
274
+             * Set the value for $_GET, $_POST, $_SERVER etc. if the key is an array will
275
+             * set the current super variable value by this.
276
+             * @param string $type the type can be "post", "get", etc.
277
+             * @param  string|array  $key the item key to be set or array if need set the current global variable 
278
+             * by this value
279
+             * @param mixed $value the value to set if $key is not an array
280
+             *
281
+             * @return object       the current instance
282
+             */
283 283
         protected function setVars($type, $key, $value = null) {
284 284
             if (is_array($key)) {
285 285
                 //set all
Please login to merge, or discard this patch.
core/classes/Response.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
             } else {
186 186
                 $logger->info('Cannot find view [' . $view . '] in module [' . $module . '] using the default location');
187 187
             }
188
-			if (!$path) {
188
+            if (!$path) {
189 189
                 $path = $this->getDefaultFilePathForView($viewFile);
190 190
             }
191 191
             $logger->info('The view file path to be loaded is [' . $path . ']');
@@ -273,12 +273,12 @@  discard block
 block discarded – undo
273 273
             return $this->_pageRender;
274 274
         }
275 275
 
276
-         /**
277
-         * Set the final page to be rendered
278
-         * @param string $finalPage the content of the final page
279
-         * 
280
-         * @return object
281
-         */
276
+            /**
277
+             * Set the final page to be rendered
278
+             * @param string $finalPage the content of the final page
279
+             * 
280
+             * @return object
281
+             */
282 282
         public function setFinalPageContent($finalPage) {
283 283
             $this->_pageRender = $finalPage;
284 284
             return $this;
@@ -351,12 +351,12 @@  discard block
 block discarded – undo
351 351
             ob_end_flush();
352 352
         }
353 353
 
354
-         /**
355
-         * Return the default full file path for view
356
-         * @param  string $file    the filename
357
-         * 
358
-         * @return string|null          the full file path
359
-         */
354
+            /**
355
+             * Return the default full file path for view
356
+             * @param  string $file    the filename
357
+             * 
358
+             * @return string|null          the full file path
359
+             */
360 360
         protected static function getDefaultFilePathForView($file){
361 361
             $searchDir = array(APPS_VIEWS_PATH, CORE_VIEWS_PATH);
362 362
             $fullFilePath = null;
@@ -548,18 +548,18 @@  discard block
 block discarded – undo
548 548
             }
549 549
         }
550 550
 
551
-         /**
552
-         * Set the mandory headers, like security, etc.
553
-         */
551
+            /**
552
+             * Set the mandory headers, like security, etc.
553
+             */
554 554
         protected static function setRequiredHeaders() {
555 555
             $requiredHeaders = array(
556 556
                                 'X-XSS-Protection' => '1; mode=block',
557 557
                                 'X-Frame-Options'  => 'SAMEORIGIN'
558 558
                             );
559 559
             foreach ($requiredHeaders as $key => $value) {
560
-               if (!isset(self::$headers[$key])) {
560
+                if (!isset(self::$headers[$key])) {
561 561
                     self::$headers[$key] = $value;
562
-               } 
562
+                } 
563 563
             }
564 564
         }
565 565
     }
Please login to merge, or discard this patch.
core/classes/Router.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -241,12 +241,12 @@  discard block
 block discarded – undo
241 241
         }
242 242
 
243 243
         /**
244
-        * Setting the route configuration using the configuration file and additional configuration from param
245
-        * @param array $overwriteConfig the additional configuration to overwrite with the existing one
246
-        * @param boolean $useConfigFile whether to use route configuration file
247
-        * 
248
-        * @return object
249
-        */
244
+         * Setting the route configuration using the configuration file and additional configuration from param
245
+         * @param array $overwriteConfig the additional configuration to overwrite with the existing one
246
+         * @param boolean $useConfigFile whether to use route configuration file
247
+         * 
248
+         * @return object
249
+         */
250 250
         public function setRouteConfiguration(array $overwriteConfig = array(), $useConfigFile = true) {
251 251
             $route = array();
252 252
             if ($useConfigFile && file_exists(CONFIG_PATH . 'routes.php')) {
@@ -423,11 +423,11 @@  discard block
 block discarded – undo
423 423
             }
424 424
         }
425 425
 
426
-         /**
427
-         * Remove the URL suffix and query string values if exists
428
-         * @param  string $uri the route URI to process
429
-         * @return string      the final route uri after processed
430
-         */
426
+            /**
427
+             * Remove the URL suffix and query string values if exists
428
+             * @param  string $uri the route URI to process
429
+             * @return string      the final route uri after processed
430
+             */
431 431
         protected function removeSuffixAndQueryStringFromUri($uri) {
432 432
             $this->logger->debug('Check if URL suffix is enabled in the configuration');
433 433
             //remove url suffix from the request URI
@@ -540,7 +540,7 @@  discard block
 block discarded – undo
540 540
                 $this->logger->info(
541 541
                                     'After loop in predefined routes configuration,'
542 542
                                     . 'the module name is set but the controller is not set,' 
543
-									. 'so we will use module as the controller'
543
+                                    . 'so we will use module as the controller'
544 544
                                 );
545 545
                 $this->controller = $this->module;
546 546
             }
Please login to merge, or discard this patch.
core/classes/Security.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -84,10 +84,10 @@
 block discarded – undo
84 84
         }
85 85
 		
86 86
         /**
87
-        * This method is used to check the whitelist IP address access
88
-        *
89
-        * @return boolean
90
-        */
87
+         * This method is used to check the whitelist IP address access
88
+         *
89
+         * @return boolean
90
+         */
91 91
         public static function checkWhiteListIpAccess() {
92 92
             $logger = self::getLogger();
93 93
             $logger->debug('Validation of the IP address access ...');
Please login to merge, or discard this patch.
core/libraries/Browser.php 1 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
      *
@@ -24,68 +24,68 @@  discard block
 block discarded – undo
24 24
      * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
25 25
      */
26 26
     
27
-	class Browser {
28
-
29
-		/**
30
-		 * List of know platforms
31
-		 * @var array
32
-		 */
33
-		private $_platforms = array(
34
-									'/windows nt 10/i'      =>  'Windows 10',
35
-									'/windows phone 10/i'   =>  'Windows Phone 10',
36
-									'/windows phone 8.1/i'  =>  'Windows Phone 8.1',
37
-									'/windows phone 8/i'    =>  'Windows Phone 8',
38
-									'/windows nt 6.3/i'     =>  'Windows 8.1',
39
-									'/windows nt 6.2/i'     =>  'Windows 8',
40
-									'/windows nt 6.1/i'     =>  'Windows 7',
41
-									'/windows nt 6.0/i'     =>  'Windows Vista',
42
-									'/windows nt 5.2/i'     =>  'Windows Server 2003/XP x64',
43
-									'/windows nt 5.1/i'     =>  'Windows XP',
44
-									'/windows xp/i'         =>  'Windows XP',
45
-									'/windows nt 5.0/i'     =>  'Windows 2000',
46
-									'/windows me/i'         =>  'Windows ME',
47
-									'/win98/i'              =>  'Windows 98',
48
-									'/win95/i'              =>  'Windows 95',
49
-									'/win16/i'              =>  'Windows 3.11',
50
-									'/ipad/i'               =>  'iPad',
27
+    class Browser {
28
+
29
+        /**
30
+         * List of know platforms
31
+         * @var array
32
+         */
33
+        private $_platforms = array(
34
+                                    '/windows nt 10/i'      =>  'Windows 10',
35
+                                    '/windows phone 10/i'   =>  'Windows Phone 10',
36
+                                    '/windows phone 8.1/i'  =>  'Windows Phone 8.1',
37
+                                    '/windows phone 8/i'    =>  'Windows Phone 8',
38
+                                    '/windows nt 6.3/i'     =>  'Windows 8.1',
39
+                                    '/windows nt 6.2/i'     =>  'Windows 8',
40
+                                    '/windows nt 6.1/i'     =>  'Windows 7',
41
+                                    '/windows nt 6.0/i'     =>  'Windows Vista',
42
+                                    '/windows nt 5.2/i'     =>  'Windows Server 2003/XP x64',
43
+                                    '/windows nt 5.1/i'     =>  'Windows XP',
44
+                                    '/windows xp/i'         =>  'Windows XP',
45
+                                    '/windows nt 5.0/i'     =>  'Windows 2000',
46
+                                    '/windows me/i'         =>  'Windows ME',
47
+                                    '/win98/i'              =>  'Windows 98',
48
+                                    '/win95/i'              =>  'Windows 95',
49
+                                    '/win16/i'              =>  'Windows 3.11',
50
+                                    '/ipad/i'               =>  'iPad',
51 51
                                     '/ipod/i'               =>  'iPod',
52 52
                                     '/iphone/i'             =>  'iPhone',
53 53
                                     '/macintosh|mac os x/i' =>  'Mac OS X',
54
-									'/mac_powerpc/i'        =>  'Mac OS 9',
55
-									'/android/i'            =>  'Android',
56
-									'/ubuntu/i'             =>  'Ubuntu',
57
-									'/linux/i'              =>  'Linux',
58
-									'/blackberry/i'         =>  'BlackBerry',
59
-									'/webos/i'              =>  'Mobile'
60
-								);
61
-
62
-		/**
63
-		 * List of know browsers
64
-		 * @var array
65
-		 */
66
-	 	private $_browsers = array(
67
-									'/mobile/i'     =>  'Handheld Browser',
68
-									'/msie/i'       =>  'Internet Explorer',
69
-									'/firefox/i'    =>  'Firefox',
70
-									'/chrome/i'     =>  'Chrome',
71
-									'/safari/i'     =>  'Safari',
72
-									'/edge/i'       =>  'Edge',
73
-									'/opera/i'      =>  'Opera',
74
-									'/netscape/i'   =>  'Netscape',
75
-									'/maxthon/i'    =>  'Maxthon',
76
-									'/konqueror/i'  =>  'Konqueror'
77
-								);
78
-
79
-	 	/**
80
-	 	 * Agent string
81
-	 	 * @var string
82
-	 	 */
83
-		private $_agent = '';
84
-
85
-		/**
86
-		 * Browser name
87
-		 * @var string
88
-		 */
54
+                                    '/mac_powerpc/i'        =>  'Mac OS 9',
55
+                                    '/android/i'            =>  'Android',
56
+                                    '/ubuntu/i'             =>  'Ubuntu',
57
+                                    '/linux/i'              =>  'Linux',
58
+                                    '/blackberry/i'         =>  'BlackBerry',
59
+                                    '/webos/i'              =>  'Mobile'
60
+                                );
61
+
62
+        /**
63
+         * List of know browsers
64
+         * @var array
65
+         */
66
+            private $_browsers = array(
67
+                                    '/mobile/i'     =>  'Handheld Browser',
68
+                                    '/msie/i'       =>  'Internet Explorer',
69
+                                    '/firefox/i'    =>  'Firefox',
70
+                                    '/chrome/i'     =>  'Chrome',
71
+                                    '/safari/i'     =>  'Safari',
72
+                                    '/edge/i'       =>  'Edge',
73
+                                    '/opera/i'      =>  'Opera',
74
+                                    '/netscape/i'   =>  'Netscape',
75
+                                    '/maxthon/i'    =>  'Maxthon',
76
+                                    '/konqueror/i'  =>  'Konqueror'
77
+                                );
78
+
79
+            /**
80
+             * Agent string
81
+             * @var string
82
+             */
83
+        private $_agent = '';
84
+
85
+        /**
86
+         * Browser name
87
+         * @var string
88
+         */
89 89
         private $_browser_name = '';
90 90
 
91 91
         /**
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
          */
125 125
         private $_is_facebook = false;
126 126
 
127
-		/**
127
+        /**
128 128
          * Class constructor
129 129
          */
130 130
         public function __construct($userAgent = '') {
@@ -251,12 +251,12 @@  discard block
 block discarded – undo
251 251
             return $this->_is_facebook;
252 252
         }
253 253
 
254
-         /**
255
-         * Returns a formatted string with a summary of the details of the browser.
256
-         * @codeCoverageIgnore
257
-         * 
258
-         * @return string formatted string with a summary of the browser
259
-         */
254
+            /**
255
+             * Returns a formatted string with a summary of the details of the browser.
256
+             * @codeCoverageIgnore
257
+             * 
258
+             * @return string formatted string with a summary of the browser
259
+             */
260 260
         public function __toString() {
261 261
             return "<strong>Browser Name:</strong> {$this->getBrowser()}<br/>\n" .
262 262
                 "<strong>Browser Version:</strong> {$this->getVersion()}<br/>\n" .
@@ -300,69 +300,69 @@  discard block
 block discarded – undo
300 300
         /**
301 301
          * Determine the user's platform
302 302
          */
303
-		protected function checkPlatform() { 
304
-			foreach ($this->_platforms as $regex => $value) { 
305
-				if (preg_match($regex, $this->_agent) ) {
306
-					$this->setPlatform($value);
307
-					break;
308
-				}
309
-			}   
310
-		}
303
+        protected function checkPlatform() { 
304
+            foreach ($this->_platforms as $regex => $value) { 
305
+                if (preg_match($regex, $this->_agent) ) {
306
+                    $this->setPlatform($value);
307
+                    break;
308
+                }
309
+            }   
310
+        }
311 311
 
312
-		/**
312
+        /**
313 313
          * Routine to determine the browser type
314 314
          */
315
-		protected function checkBrowser() {
316
-			foreach ($this->_browsers as $regex => $value) { 
317
-				if (preg_match($regex, $this->_agent ) ) {
318
-					$this->setBrowser($value);
319
-					break;
320
-				}
321
-			}
322
-		}
315
+        protected function checkBrowser() {
316
+            foreach ($this->_browsers as $regex => $value) { 
317
+                if (preg_match($regex, $this->_agent ) ) {
318
+                    $this->setBrowser($value);
319
+                    break;
320
+                }
321
+            }
322
+        }
323 323
 
324
-		/**
324
+        /**
325 325
          * Routine to determine the browser version
326 326
          */
327
-		protected function checkBrowserVersion(){
328
-			$detected = $this->getBrowser();
329
-			$d = array_search($detected, $this->_browsers);
330
-			$browser = str_replace(array("/i","/"), "", $d);
331
-			$regex = "/(?<browser>version|{$browser})[\/]+(?<version>[0-9.|a-zA-Z.]*)/i";
332
-			if (preg_match_all($regex, $this->_agent, $matches)) {
333
-				$found = array_search($browser, $matches["browser"]);
334
-				$this->setVersion($matches["version"][$found]);
335
-			}
336
-		}
337
-
338
-		/**
327
+        protected function checkBrowserVersion(){
328
+            $detected = $this->getBrowser();
329
+            $d = array_search($detected, $this->_browsers);
330
+            $browser = str_replace(array("/i","/"), "", $d);
331
+            $regex = "/(?<browser>version|{$browser})[\/]+(?<version>[0-9.|a-zA-Z.]*)/i";
332
+            if (preg_match_all($regex, $this->_agent, $matches)) {
333
+                $found = array_search($browser, $matches["browser"]);
334
+                $this->setVersion($matches["version"][$found]);
335
+            }
336
+        }
337
+
338
+        /**
339 339
          * Determine if the browser is Mobile or not
340 340
          */
341
-		protected function checkMobile() {
342
-			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) ) {
343
-				$this->setMobile(true);
344
-			}
345
-		}
341
+        protected function checkMobile() {
342
+            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) ) {
343
+                $this->setMobile(true);
344
+            }
345
+        }
346 346
 
347
-		/**
347
+        /**
348 348
          * Determine if the browser is Tablet or not
349 349
          */
350
-		protected function checkTablet() {
351
-			if (preg_match('/tablet|ipad/i', $this->_agent) ) {
352
-				$this->setTablet(true);
353
-			}
354
-		}
350
+        protected function checkTablet() {
351
+            if (preg_match('/tablet|ipad/i', $this->_agent) ) {
352
+                $this->setTablet(true);
353
+            }
354
+        }
355 355
 
356
-		/**
356
+        /**
357 357
          * Determine if the browser is Robot or not
358 358
          */
359
-		protected function checkBot() {
360
-			if (preg_match('/bot/i', $this->_agent) ) {
361
-				$this->setRobot(true);
362
-			}
363
-		}
359
+        protected function checkBot() {
360
+            if (preg_match('/bot/i', $this->_agent) ) {
361
+                $this->setRobot(true);
362
+            }
363
+        }
364 364
 
365
-		/**
365
+        /**
366 366
          * Detect if URL is loaded from FacebookExternalHit
367 367
          */
368 368
         protected function checkFacebook() {
@@ -375,10 +375,10 @@  discard block
 block discarded – undo
375 375
         }
376 376
 
377 377
 
378
-		 /**
379
-         * Protected routine to calculate and determine what
380
-         *  the browser is in use (including platform)
381
-         */
378
+            /**
379
+             * Protected routine to calculate and determine what
380
+             *  the browser is in use (including platform)
381
+             */
382 382
         protected function determine() {
383 383
             $this->checkPlatform();
384 384
             $this->checkBrowser();
@@ -389,4 +389,4 @@  discard block
 block discarded – undo
389 389
             $this->checkFacebook();
390 390
         }
391 391
 		
392
-	}
392
+    }
Please login to merge, or discard this patch.
core/classes/database/DatabaseQueryRunner.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -170,7 +170,7 @@
 block discarded – undo
170 170
                 //by default count() return 1 if the parameter is not an array
171 171
                 //object or object implements Countable.
172 172
                 if (is_array($result) || is_object($result) || $result instanceof Countable) {
173
-                     $numRows = count($result);  
173
+                        $numRows = count($result);  
174 174
                 }
175 175
             } else {
176 176
                 $numRows = $this->pdoStatment->rowCount(); 
Please login to merge, or discard this patch.
core/libraries/Form.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
                 $attributes['accept-charset'] = get_config('charset', 'UTF-8');
46 46
             }
47 47
             if (!empty($enctype)) {
48
-                 $attributes['enctype'] = $enctype;
48
+                    $attributes['enctype'] = $enctype;
49 49
             }
50 50
             $str .= attributes_to_string($attributes);
51 51
             $str .= '>';
Please login to merge, or discard this patch.