@@ -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 | } |
@@ -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; |
@@ -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; |
@@ -443,7 +443,7 @@ discard block |
||
443 | 443 | * Remove the DOCUMENT_ROOT and front controller from segments if exists |
444 | 444 | * @return void |
445 | 445 | */ |
446 | - protected function removeDocumentRootFrontControllerFromSegments(){ |
|
446 | + protected function removeDocumentRootFrontControllerFromSegments() { |
|
447 | 447 | $segment = $this->segments; |
448 | 448 | $baseUrl = get_config('base_url'); |
449 | 449 | //check if the app is not in DOCUMENT_ROOT |
@@ -561,7 +561,7 @@ discard block |
||
561 | 561 | break; |
562 | 562 | } |
563 | 563 | } |
564 | - if($findIndex !== -1){ |
|
564 | + if ($findIndex !== -1) { |
|
565 | 565 | //$args[0] => full string captured by preg_match |
566 | 566 | //$args[1], $args[2], $args[n] => contains the value of |
567 | 567 | //(:num), (:alpha), (:alnum), (:any) |
@@ -586,7 +586,7 @@ discard block |
||
586 | 586 | * Find file path of the current controller using the current module |
587 | 587 | * @return boolean true if the file path is found otherwise false. |
588 | 588 | */ |
589 | - protected function findControllerFullPathUsingCurrentModule(){ |
|
589 | + protected function findControllerFullPathUsingCurrentModule() { |
|
590 | 590 | $path = $this->moduleInstance->findControllerFullPath(ucfirst($this->controller), $this->module); |
591 | 591 | if (!$path) { |
592 | 592 | $this->logger->info('The controller [' . $this->controller . '] not found in the module, may be will use the module [' . $this->module . '] as controller'); |
@@ -602,7 +602,7 @@ discard block |
||
602 | 602 | * or the current request does not use module |
603 | 603 | * @return void |
604 | 604 | */ |
605 | - protected function setRouteParamsIfNoModuleOrNotFound(){ |
|
605 | + protected function setRouteParamsIfNoModuleOrNotFound() { |
|
606 | 606 | $segment = $this->segments; |
607 | 607 | //controller |
608 | 608 | if (isset($segment[0])) { |
@@ -623,7 +623,7 @@ discard block |
||
623 | 623 | * or the current request use module |
624 | 624 | * @return void |
625 | 625 | */ |
626 | - protected function setRouteParamsIfAppHasModuleOrFound(){ |
|
626 | + protected function setRouteParamsIfAppHasModuleOrFound() { |
|
627 | 627 | //get the module list |
628 | 628 | $modules = $this->moduleInstance->getModuleList(); |
629 | 629 | $segment = $this->segments; |
@@ -636,7 +636,7 @@ discard block |
||
636 | 636 | $this->controller = $segment[0]; |
637 | 637 | |
638 | 638 | //check if the request use the same module name and controller |
639 | - if($this->findControllerFullPathUsingCurrentModule()){ |
|
639 | + if ($this->findControllerFullPathUsingCurrentModule()) { |
|
640 | 640 | array_shift($segment); |
641 | 641 | } |
642 | 642 | } |
@@ -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 | */ |