@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | * Remove the DOCUMENT_ROOT and front controller from segments if exists |
408 | 408 | * @return void |
409 | 409 | */ |
410 | - protected function removeDocumentRootFrontControllerFromSegments(){ |
|
410 | + protected function removeDocumentRootFrontControllerFromSegments() { |
|
411 | 411 | $segment = $this->segments; |
412 | 412 | $baseUrl = get_config('base_url'); |
413 | 413 | //check if the app is not in DOCUMENT_ROOT |
@@ -525,7 +525,7 @@ discard block |
||
525 | 525 | break; |
526 | 526 | } |
527 | 527 | } |
528 | - if($findIndex !== -1){ |
|
528 | + if ($findIndex !== -1) { |
|
529 | 529 | //$args[0] => full string captured by preg_match |
530 | 530 | //$args[1], $args[2], $args[n] => contains the value of |
531 | 531 | //(:num), (:alpha), (:alnum), (:any) |
@@ -550,7 +550,7 @@ discard block |
||
550 | 550 | * Find file path of the current controller using the current module |
551 | 551 | * @return boolean true if the file path is found otherwise false. |
552 | 552 | */ |
553 | - protected function findControllerFullPathUsingCurrentModule(){ |
|
553 | + protected function findControllerFullPathUsingCurrentModule() { |
|
554 | 554 | $path = Module::findControllerFullPath(ucfirst($this->controller), $this->module); |
555 | 555 | if (!$path) { |
556 | 556 | $this->logger->info('The controller [' . $this->controller . '] not found in the module, may be will use the module [' . $this->module . '] as controller'); |
@@ -566,7 +566,7 @@ discard block |
||
566 | 566 | * or the current request does not use module |
567 | 567 | * @return void |
568 | 568 | */ |
569 | - protected function setRouteParamsIfNoModuleOrNotFound(){ |
|
569 | + protected function setRouteParamsIfNoModuleOrNotFound() { |
|
570 | 570 | $segment = $this->segments; |
571 | 571 | //controller |
572 | 572 | if (isset($segment[0])) { |
@@ -587,7 +587,7 @@ discard block |
||
587 | 587 | * or the current request use module |
588 | 588 | * @return void |
589 | 589 | */ |
590 | - protected function setRouteParamsIfAppHasModuleOrFound(){ |
|
590 | + protected function setRouteParamsIfAppHasModuleOrFound() { |
|
591 | 591 | //get the module list |
592 | 592 | $modules = Module::getModuleList(); |
593 | 593 | $segment = $this->segments; |
@@ -600,7 +600,7 @@ discard block |
||
600 | 600 | $this->controller = $segment[0]; |
601 | 601 | |
602 | 602 | //check if the request use the same module name and controller |
603 | - if($this->findControllerFullPathUsingCurrentModule()){ |
|
603 | + if ($this->findControllerFullPathUsingCurrentModule()) { |
|
604 | 604 | array_shift($segment); |
605 | 605 | } |
606 | 606 | } |
@@ -45,7 +45,7 @@ |
||
45 | 45 | */ |
46 | 46 | |
47 | 47 | |
48 | - class Email extends BaseClass{ |
|
48 | + class Email extends BaseClass { |
|
49 | 49 | /** |
50 | 50 | * @var int $_wrap |
51 | 51 | */ |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | */ |
303 | 303 | protected function checkPlatform() { |
304 | 304 | foreach ($this->_platforms as $regex => $value) { |
305 | - if (preg_match($regex, $this->_agent) ) { |
|
305 | + if (preg_match($regex, $this->_agent)) { |
|
306 | 306 | $this->setPlatform($value); |
307 | 307 | break; |
308 | 308 | } |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | */ |
315 | 315 | protected function checkBrowser() { |
316 | 316 | foreach ($this->_browsers as $regex => $value) { |
317 | - if (preg_match($regex, $this->_agent ) ) { |
|
317 | + if (preg_match($regex, $this->_agent)) { |
|
318 | 318 | $this->setBrowser($value); |
319 | 319 | break; |
320 | 320 | } |
@@ -324,10 +324,10 @@ discard block |
||
324 | 324 | /** |
325 | 325 | * Routine to determine the browser version |
326 | 326 | */ |
327 | - protected function checkBrowserVersion(){ |
|
327 | + protected function checkBrowserVersion() { |
|
328 | 328 | $detected = $this->getBrowser(); |
329 | 329 | $d = array_search($detected, $this->_browsers); |
330 | - $browser = str_replace(array("/i","/"), "", $d); |
|
330 | + $browser = str_replace(array("/i", "/"), "", $d); |
|
331 | 331 | $regex = "/(?<browser>version|{$browser})[\/]+(?<version>[0-9.|a-zA-Z.]*)/i"; |
332 | 332 | if (preg_match_all($regex, $this->_agent, $matches)) { |
333 | 333 | $found = array_search($browser, $matches["browser"]); |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | * Determine if the browser is Mobile or not |
340 | 340 | */ |
341 | 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) ) { |
|
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 | 343 | $this->setMobile(true); |
344 | 344 | } |
345 | 345 | } |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | * Determine if the browser is Tablet or not |
349 | 349 | */ |
350 | 350 | protected function checkTablet() { |
351 | - if (preg_match('/tablet|ipad/i', $this->_agent) ) { |
|
351 | + if (preg_match('/tablet|ipad/i', $this->_agent)) { |
|
352 | 352 | $this->setTablet(true); |
353 | 353 | } |
354 | 354 | } |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | * Determine if the browser is Robot or not |
358 | 358 | */ |
359 | 359 | protected function checkBot() { |
360 | - if (preg_match('/bot/i', $this->_agent) ) { |
|
360 | + if (preg_match('/bot/i', $this->_agent)) { |
|
361 | 361 | $this->setRobot(true); |
362 | 362 | } |
363 | 363 | } |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | if (stristr($this->_agent, 'FacebookExternalHit')) { |
370 | 370 | $this->setRobot(true); |
371 | 371 | $this->setFacebook(true); |
372 | - } else if (stristr($this->_agent, 'FBIOS')) { |
|
372 | + } else if (stristr($this->_agent, 'FBIOS')) { |
|
373 | 373 | $this->setFacebook(true); |
374 | 374 | } |
375 | 375 | } |
@@ -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 | /** |