@@ -148,7 +148,7 @@ |
||
| 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 | } |
@@ -343,7 +343,7 @@ |
||
| 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 | |
@@ -364,7 +364,7 @@ |
||
| 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 | } |
@@ -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 | } |
@@ -316,8 +316,7 @@ |
||
| 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 | } |
@@ -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; |
@@ -142,7 +142,7 @@ |
||
| 142 | 142 | * @return string the final path after add suffix if configured |
| 143 | 143 | * otherwise the same value will be returned |
| 144 | 144 | */ |
| 145 | - protected static function addSuffixInPath($path){ |
|
| 145 | + protected static function addSuffixInPath($path) { |
|
| 146 | 146 | $suffix = get_config('url_suffix'); |
| 147 | 147 | if ($suffix && $path) { |
| 148 | 148 | if (strpos($path, '?') !== false) { |
@@ -346,7 +346,7 @@ discard block |
||
| 346 | 346 | * |
| 347 | 347 | * @return string|null the full file path |
| 348 | 348 | */ |
| 349 | - protected static function getDefaultFilePathForView($file){ |
|
| 349 | + protected static function getDefaultFilePathForView($file) { |
|
| 350 | 350 | $searchDir = array(APPS_VIEWS_PATH, CORE_VIEWS_PATH); |
| 351 | 351 | $fullFilePath = null; |
| 352 | 352 | foreach ($searchDir as $dir) { |
@@ -465,7 +465,7 @@ discard block |
||
| 465 | 465 | // Parse out the elapsed time and memory usage, |
| 466 | 466 | // then swap the pseudo-variables with the data |
| 467 | 467 | $elapsedTime = $benchmark->elapsedTime('APP_EXECUTION_START', 'APP_EXECUTION_END'); |
| 468 | - $memoryUsage = round($benchmark->memoryUsage('APP_EXECUTION_START', 'APP_EXECUTION_END') / 1024 / 1024, 6) . 'MB'; |
|
| 468 | + $memoryUsage = round($benchmark->memoryUsage('APP_EXECUTION_START', 'APP_EXECUTION_END') / 1024 / 1024, 6) . 'MB'; |
|
| 469 | 469 | return str_replace(array('{elapsed_time}', '{memory_usage}'), array($elapsedTime, $memoryUsage), $content); |
| 470 | 470 | } |
| 471 | 471 | |
@@ -276,7 +276,7 @@ discard block |
||
| 276 | 276 | * Set the file array data generally in constructor this is already set using $_FILES |
| 277 | 277 | * @param array $fileArray the new value |
| 278 | 278 | */ |
| 279 | - public function setFileArray($fileArray){ |
|
| 279 | + public function setFileArray($fileArray) { |
|
| 280 | 280 | $this->file_array = $fileArray; |
| 281 | 281 | } |
| 282 | 282 | |
@@ -594,7 +594,7 @@ discard block |
||
| 594 | 594 | * @return string |
| 595 | 595 | */ |
| 596 | 596 | public function getDestinationDirectory() { |
| 597 | - return $this->destination_directory ; |
|
| 597 | + return $this->destination_directory; |
|
| 598 | 598 | } |
| 599 | 599 | |
| 600 | 600 | /** |
@@ -602,7 +602,7 @@ discard block |
||
| 602 | 602 | * @return boolean |
| 603 | 603 | */ |
| 604 | 604 | public function isAllowOverwriting() { |
| 605 | - return $this->overwrite_file ; |
|
| 605 | + return $this->overwrite_file; |
|
| 606 | 606 | } |
| 607 | 607 | |
| 608 | 608 | /** |
@@ -48,7 +48,7 @@ |
||
| 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 | */ |
@@ -410,7 +410,7 @@ |
||
| 410 | 410 | * |
| 411 | 411 | * @return object|void |
| 412 | 412 | */ |
| 413 | - protected function setConnectionUsingConfigFile(){ |
|
| 413 | + protected function setConnectionUsingConfigFile() { |
|
| 414 | 414 | $dbConfigFromFile = $this->getDatabaseConfigFromFile(); |
| 415 | 415 | $connection = &class_loader('DatabaseConnection', 'classes/database'); |
| 416 | 416 | $connection->setConfig($dbConfigFromFile); |