@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | $_keys = array(); |
415 | 415 | foreach ($keys as $k => $v) { |
416 | 416 | $v = $this->checkForNullValue($v); |
417 | - if (! is_numeric($v)) { |
|
417 | + if (!is_numeric($v)) { |
|
418 | 418 | $v = $this->connection->escape($v, $escape); |
419 | 419 | } |
420 | 420 | $_keys[] = $v; |
@@ -727,7 +727,7 @@ discard block |
||
727 | 727 | * |
728 | 728 | * @return string|null |
729 | 729 | */ |
730 | - protected function buildQueryPart($property, $command = ''){ |
|
730 | + protected function buildQueryPart($property, $command = '') { |
|
731 | 731 | if (!empty($this->{$property})) { |
732 | 732 | return $command . $this->{$property}; |
733 | 733 | } |
@@ -742,7 +742,7 @@ discard block |
||
742 | 742 | * @param string $clause the clause type "IS NULL", "IS NOT NULLs" |
743 | 743 | * @return object the current DatabaseQueryBuilder instance |
744 | 744 | */ |
745 | - protected function whereIsNullAndNotNull($field, $andOr = 'AND', $clause = 'IS NULL'){ |
|
745 | + protected function whereIsNullAndNotNull($field, $andOr = 'AND', $clause = 'IS NULL') { |
|
746 | 746 | if (is_array($field)) { |
747 | 747 | foreach ($field as $f) { |
748 | 748 | $this->whereIsNullAndNotNull($f, $andOr, $clause); |
@@ -760,7 +760,7 @@ discard block |
||
760 | 760 | * |
761 | 761 | * @return object the current instance |
762 | 762 | */ |
763 | - protected function setSelectStr($newSelect){ |
|
763 | + protected function setSelectStr($newSelect) { |
|
764 | 764 | $this->select = (($this->select == '*' || empty($this->select)) |
765 | 765 | ? $newSelect |
766 | 766 | : $this->select . ', ' . $newSelect); |
@@ -774,8 +774,8 @@ discard block |
||
774 | 774 | * @return string the empty string if the value is null |
775 | 775 | * otherwise the same value will be returned |
776 | 776 | */ |
777 | - protected function checkForNullValue($value){ |
|
778 | - if(is_null($value)){ |
|
777 | + protected function checkForNullValue($value) { |
|
778 | + if (is_null($value)) { |
|
779 | 779 | return ''; |
780 | 780 | } |
781 | 781 | return $value; |
@@ -424,7 +424,7 @@ discard block |
||
424 | 424 | * @return object the current instance |
425 | 425 | */ |
426 | 426 | protected function filterValidationData() { |
427 | - foreach ($this->data as $key => $value ) { |
|
427 | + foreach ($this->data as $key => $value) { |
|
428 | 428 | if (is_array($value)) { |
429 | 429 | $this->data[$key] = array_map('trim', $value); |
430 | 430 | } else { |
@@ -1037,7 +1037,7 @@ discard block |
||
1037 | 1037 | if (call_user_func_array($paramValue, array($value)) === false) { |
1038 | 1038 | $this->setFieldErrorWithRequiredCheck($field, $value, $rule, $paramValue); |
1039 | 1039 | } |
1040 | - } else{ |
|
1040 | + } else { |
|
1041 | 1041 | $this->forceError = true; |
1042 | 1042 | show_error('The callback validation function/method "' . $paramValue . '" does not exist'); |
1043 | 1043 | } |
@@ -121,7 +121,7 @@ |
||
121 | 121 | if ((double) $responseTime >= 1.000000) { |
122 | 122 | $this->logger->warning( |
123 | 123 | 'High response time while processing database query [' . $this->query . '].' |
124 | - . 'The response time is [' .$responseTime . '] sec.' |
|
124 | + . 'The response time is [' . $responseTime . '] sec.' |
|
125 | 125 | ); |
126 | 126 | } |
127 | 127 |
@@ -32,8 +32,8 @@ |
||
32 | 32 | <p>Required PHP version : <b>PHP >= <?php echo TNH_MIN_PHP_VERSION; ?>, PHP < <?php echo TNH_MAX_PHP_VERSION; ?></b></p> |
33 | 33 | <p>Release date : <b><?php echo TNH_RELEASE_DATE; ?></b></p> |
34 | 34 | <hr /> |
35 | - <p>Current controller: <b class = "text-muted label-danger"><?php echo APPS_CONTROLLER_PATH . 'Home.php';?></b> |
|
36 | - <p>Current view: <b class = "text-muted label-danger"><?php echo APPS_VIEWS_PATH . 'home.php';?></b> |
|
35 | + <p>Current controller: <b class = "text-muted label-danger"><?php echo APPS_CONTROLLER_PATH . 'Home.php'; ?></b> |
|
36 | + <p>Current view: <b class = "text-muted label-danger"><?php echo APPS_VIEWS_PATH . 'home.php'; ?></b> |
|
37 | 37 | </div> |
38 | 38 | </div> |
39 | 39 | </div> |
@@ -144,7 +144,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | public function getCacheContent() { |
159 | 159 | //set some attributes values |
160 | 160 | $this->setPropertiesValues(); |
161 | - if(! $this->isSelectQuery || ! $this->dbCacheStatus){ |
|
161 | + if (!$this->isSelectQuery || !$this->dbCacheStatus) { |
|
162 | 162 | $this->logger->info('The cache is not enabled for this query or is not a SELECT query'); |
163 | 163 | return null; |
164 | 164 | } |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | public function saveCacheContent($result) { |
180 | 180 | //set some attributes values |
181 | 181 | $this->setPropertiesValues(); |
182 | - if(! $this->isSelectQuery || ! $this->dbCacheStatus){ |
|
182 | + if (!$this->isSelectQuery || !$this->dbCacheStatus) { |
|
183 | 183 | return null; |
184 | 184 | } |
185 | 185 | $this->setCacheInstanceFromSuperInstanceIfNull(); |
@@ -308,7 +308,7 @@ discard block |
||
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 |
||
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; |