@@ -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 | } |
@@ -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; |
@@ -61,7 +61,7 @@ |
||
61 | 61 | */ |
62 | 62 | public function add($name) { |
63 | 63 | if (in_array($name, $this->list)) { |
64 | - $this->logger->info('The module [' .$name. '] already added skipping.'); |
|
64 | + $this->logger->info('The module [' . $name . '] already added skipping.'); |
|
65 | 65 | return $this; |
66 | 66 | } |
67 | 67 | $this->list[] = $name; |
@@ -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> |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | * SOFTWARE. |
29 | 29 | */ |
30 | 30 | |
31 | - class Url extends BaseClass{ |
|
31 | + class Url extends BaseClass { |
|
32 | 32 | |
33 | 33 | /** |
34 | 34 | * Construct new instance |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | * @return string the final path after add suffix if configured |
152 | 152 | * otherwise the same value will be returned |
153 | 153 | */ |
154 | - protected function addSuffixInPath($path){ |
|
154 | + protected function addSuffixInPath($path) { |
|
155 | 155 | $suffix = get_config('url_suffix'); |
156 | 156 | if ($suffix && $path) { |
157 | 157 | if (strpos($path, '?') !== false) { |
@@ -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->setCacheFromSuperInstanceIfNull(); |
@@ -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 | */ |
@@ -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->browserName = '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 | $detect = array_search($detected, $this->browsers); |
334 | - $browser = str_replace(array('/i','/'), '', $detect); |
|
334 | + $browser = str_replace(array('/i', '/'), '', $detect); |
|
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']); |
@@ -344,7 +344,7 @@ discard block |
||
344 | 344 | */ |
345 | 345 | protected function checkMobile() { |
346 | 346 | if (preg_match('/(android|avantgo|blackberry|bolt|boost|cricket' |
347 | - . '|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\.browser|up\.link|webos|wos)/i', $this->agent) ) { |
|
347 | + . '|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\.browser|up\.link|webos|wos)/i', $this->agent)) { |
|
348 | 348 | $this->setMobile(true); |
349 | 349 | } |
350 | 350 | } |
@@ -353,7 +353,7 @@ discard block |
||
353 | 353 | * Determine if the browser is Tablet or not |
354 | 354 | */ |
355 | 355 | protected function checkTablet() { |
356 | - if (preg_match('/tablet|ipad/i', $this->agent) ) { |
|
356 | + if (preg_match('/tablet|ipad/i', $this->agent)) { |
|
357 | 357 | $this->setTablet(true); |
358 | 358 | } |
359 | 359 | } |
@@ -362,7 +362,7 @@ discard block |
||
362 | 362 | * Determine if the browser is Robot or not |
363 | 363 | */ |
364 | 364 | protected function checkBot() { |
365 | - if (preg_match('/bot/i', $this->agent) ) { |
|
365 | + if (preg_match('/bot/i', $this->agent)) { |
|
366 | 366 | $this->setRobot(true); |
367 | 367 | } |
368 | 368 | } |
@@ -374,7 +374,7 @@ discard block |
||
374 | 374 | if (stristr($this->agent, 'FacebookExternalHit')) { |
375 | 375 | $this->setRobot(true); |
376 | 376 | $this->setFacebook(true); |
377 | - } else if (stristr($this->agent, 'FBIOS')) { |
|
377 | + } else if (stristr($this->agent, 'FBIOS')) { |
|
378 | 378 | $this->setFacebook(true); |
379 | 379 | } |
380 | 380 | } |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | * |
284 | 284 | * @return object the current instance |
285 | 285 | */ |
286 | - public function setUploadedFileData(array $fileData){ |
|
286 | + public function setUploadedFileData(array $fileData) { |
|
287 | 287 | $this->uploadedFileData = $fileData; |
288 | 288 | return $this; |
289 | 289 | } |
@@ -526,7 +526,7 @@ discard block |
||
526 | 526 | * @return boolean |
527 | 527 | */ |
528 | 528 | public function isAllowOverwriting() { |
529 | - return $this->overwriteFile ; |
|
529 | + return $this->overwriteFile; |
|
530 | 530 | } |
531 | 531 | |
532 | 532 | /** |
@@ -565,7 +565,7 @@ discard block |
||
565 | 565 | * @return string |
566 | 566 | */ |
567 | 567 | public function getDestinationDirectory() { |
568 | - return $this->destinationDirectory ; |
|
568 | + return $this->destinationDirectory; |
|
569 | 569 | } |
570 | 570 | |
571 | 571 | /** |