@@ -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 | } |
@@ -200,17 +200,17 @@ |
||
200 | 200 | die(); |
201 | 201 | } |
202 | 202 | |
203 | - /** |
|
204 | - * Function defined for PHP error message handling |
|
205 | - * |
|
206 | - * @param int $errno the type of error for example: E_USER_ERROR, E_USER_WARNING, etc. |
|
207 | - * @param string $errstr the error message |
|
208 | - * @param string $errfile the file where the error occurred |
|
209 | - * @param int $errline the line number where the error occurred |
|
210 | - * @codeCoverageIgnore |
|
211 | - * |
|
212 | - * @return boolean |
|
213 | - */ |
|
203 | + /** |
|
204 | + * Function defined for PHP error message handling |
|
205 | + * |
|
206 | + * @param int $errno the type of error for example: E_USER_ERROR, E_USER_WARNING, etc. |
|
207 | + * @param string $errstr the error message |
|
208 | + * @param string $errfile the file where the error occurred |
|
209 | + * @param int $errline the line number where the error occurred |
|
210 | + * @codeCoverageIgnore |
|
211 | + * |
|
212 | + * @return boolean |
|
213 | + */ |
|
214 | 214 | function fw_error_handler($errno, $errstr, $errfile, $errline) { |
215 | 215 | $isError = (((E_ERROR | E_COMPILE_ERROR | E_CORE_ERROR | E_USER_ERROR) & $errno) === $errno); |
216 | 216 | if ($isError) { |
@@ -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; |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | $moduleConfigPath = get_instance()->module->findConfigFullPath($filename, $module); |
221 | 221 | if ($moduleConfigPath) { |
222 | 222 | $this->logger->info('Found config [' . $filename . '] from module [' . $module . '], ' |
223 | - . 'the file path is [' . $moduleConfigPath . '] we will used it'); |
|
223 | + . 'the file path is [' . $moduleConfigPath . '] we will used it'); |
|
224 | 224 | $configFilePath = $moduleConfigPath; |
225 | 225 | } else { |
226 | 226 | $this->logger->info('Cannot find config [' . $filename . '] from modules using the default location'); |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | protected function getDefaultFilePathForFunctionLanguage($file, $type, $appLang = null){ |
340 | 340 | $searchDir = null; |
341 | 341 | if ($type == 'function') { |
342 | - $searchDir = array(FUNCTIONS_PATH, CORE_FUNCTIONS_PATH); |
|
342 | + $searchDir = array(FUNCTIONS_PATH, CORE_FUNCTIONS_PATH); |
|
343 | 343 | } |
344 | 344 | else if ($type == 'language') { |
345 | 345 | $searchDir = array(APP_LANG_PATH, CORE_LANG_PATH); |
@@ -507,7 +507,7 @@ discard block |
||
507 | 507 | $moduleLibraryPath = get_instance()->module->findLibraryFullPath($class, $module); |
508 | 508 | if ($moduleLibraryPath) { |
509 | 509 | $this->logger->info('Found library [' . $class . '] from module [' . $module . '], the ' |
510 | - . 'file path is [' . $moduleLibraryPath . '] we will used it'); |
|
510 | + . 'file path is [' . $moduleLibraryPath . '] we will used it'); |
|
511 | 511 | $libraryFilePath = $moduleLibraryPath; |
512 | 512 | } else { |
513 | 513 | $this->logger->info('Cannot find library [' . $class . '] from modules using the default location'); |
@@ -189,11 +189,11 @@ |
||
189 | 189 | */ |
190 | 190 | define('VAR_PATH', ROOT_PATH . 'var' . DS); |
191 | 191 | |
192 | - /** |
|
193 | - * The path to the directory of your cache files. |
|
194 | - * |
|
195 | - * This feature is available currently for database and views. |
|
196 | - */ |
|
192 | + /** |
|
193 | + * The path to the directory of your cache files. |
|
194 | + * |
|
195 | + * This feature is available currently for database and views. |
|
196 | + */ |
|
197 | 197 | define('CACHE_PATH', VAR_PATH . 'cache' . DS); |
198 | 198 | |
199 | 199 | /** |
@@ -25,103 +25,103 @@ |
||
25 | 25 | */ |
26 | 26 | |
27 | 27 | /** |
28 | - * This file contains the configuration of resources that you want to load automatically: |
|
29 | - * personals or systems libraries, configuration files, models, languages |
|
30 | - * personals functions or systems that are used often in your application |
|
31 | - * instead of loading them every time you want to use it. |
|
32 | - * Note: loading a lot of resources can decrease the performance of your application. |
|
33 | - */ |
|
28 | + * This file contains the configuration of resources that you want to load automatically: |
|
29 | + * personals or systems libraries, configuration files, models, languages |
|
30 | + * personals functions or systems that are used often in your application |
|
31 | + * instead of loading them every time you want to use it. |
|
32 | + * Note: loading a lot of resources can decrease the performance of your application. |
|
33 | + */ |
|
34 | 34 | |
35 | 35 | |
36 | - /** |
|
37 | - * If you have personals libraries or systems to load automatically, then list them in the following array. |
|
38 | - * For example : |
|
39 | - * |
|
40 | - * $autoload['libraries'] = array('library1', 'library2'); |
|
41 | - * |
|
42 | - * Using module: |
|
43 | - * |
|
44 | - * $autoload['libraries'] = array('module1/library1', 'module2/library1'); |
|
45 | - * |
|
46 | - * Note: Systems libraries have priority over personals libraries, |
|
47 | - * ie the loading order is as follows: it looks in the folder of the systems libraries, |
|
48 | - * if it is found, it is loaded, if not, it search in the module directories, if it is found, |
|
49 | - * it is loaded, if not will search in personals libraries folder, |
|
50 | - * before returning an error in case it does not find it. |
|
51 | - */ |
|
36 | + /** |
|
37 | + * If you have personals libraries or systems to load automatically, then list them in the following array. |
|
38 | + * For example : |
|
39 | + * |
|
40 | + * $autoload['libraries'] = array('library1', 'library2'); |
|
41 | + * |
|
42 | + * Using module: |
|
43 | + * |
|
44 | + * $autoload['libraries'] = array('module1/library1', 'module2/library1'); |
|
45 | + * |
|
46 | + * Note: Systems libraries have priority over personals libraries, |
|
47 | + * ie the loading order is as follows: it looks in the folder of the systems libraries, |
|
48 | + * if it is found, it is loaded, if not, it search in the module directories, if it is found, |
|
49 | + * it is loaded, if not will search in personals libraries folder, |
|
50 | + * before returning an error in case it does not find it. |
|
51 | + */ |
|
52 | 52 | $autoload['libraries'] = array(); |
53 | 53 | |
54 | 54 | /** |
55 | - * If you have configuration files to load automatically, then list them in the following array. |
|
56 | - * For example : |
|
57 | - * |
|
58 | - * $autoload['config'] = array('config1', 'config2'); |
|
59 | - * |
|
60 | - * Using module: |
|
61 | - * |
|
62 | - * $autoload['config'] = array('module1/config1', 'module2/config2'); |
|
63 | - * |
|
64 | - * Note 1: the file name must have as prefix "config_" for config file inside CONFIG_PATH folder |
|
65 | - * for example "config_name_of_the_file_config.php" and contains as configuration variable the array $config, |
|
66 | - * otherwise the system can not find this configuration file. |
|
67 | - * For example : |
|
68 | - * |
|
69 | - * $config['key1'] = value1; |
|
70 | - * $config['key2'] = value2; |
|
71 | - * |
|
72 | - * Note 2: the files to be loaded must be in the folder defined by the constant "CONFIG_PATH" in "index.php". |
|
73 | - * or inside the "config" of your application modules |
|
74 | - */ |
|
55 | + * If you have configuration files to load automatically, then list them in the following array. |
|
56 | + * For example : |
|
57 | + * |
|
58 | + * $autoload['config'] = array('config1', 'config2'); |
|
59 | + * |
|
60 | + * Using module: |
|
61 | + * |
|
62 | + * $autoload['config'] = array('module1/config1', 'module2/config2'); |
|
63 | + * |
|
64 | + * Note 1: the file name must have as prefix "config_" for config file inside CONFIG_PATH folder |
|
65 | + * for example "config_name_of_the_file_config.php" and contains as configuration variable the array $config, |
|
66 | + * otherwise the system can not find this configuration file. |
|
67 | + * For example : |
|
68 | + * |
|
69 | + * $config['key1'] = value1; |
|
70 | + * $config['key2'] = value2; |
|
71 | + * |
|
72 | + * Note 2: the files to be loaded must be in the folder defined by the constant "CONFIG_PATH" in "index.php". |
|
73 | + * or inside the "config" of your application modules |
|
74 | + */ |
|
75 | 75 | $autoload['config'] = array(); |
76 | 76 | |
77 | 77 | /** |
78 | - * If you have models to load automatically, then list them in the following array. |
|
79 | - * For example : |
|
80 | - * |
|
81 | - * $autoload['models'] = array('model1', 'model2'); |
|
82 | - * |
|
83 | - * Using module: |
|
84 | - * |
|
85 | - * $autoload['models'] = array('module1/model1', 'module2/model2'); |
|
86 | - */ |
|
78 | + * If you have models to load automatically, then list them in the following array. |
|
79 | + * For example : |
|
80 | + * |
|
81 | + * $autoload['models'] = array('model1', 'model2'); |
|
82 | + * |
|
83 | + * Using module: |
|
84 | + * |
|
85 | + * $autoload['models'] = array('module1/model1', 'module2/model2'); |
|
86 | + */ |
|
87 | 87 | $autoload['models'] = array(); |
88 | 88 | |
89 | 89 | /** |
90 | - * If you have systems or personals functions to load automatically, specify them in the following array. |
|
91 | - * For example : |
|
92 | - * |
|
93 | - * $autoload['functions'] = array('function1', 'function2'); |
|
94 | - * |
|
95 | - * Using module: |
|
96 | - * |
|
97 | - * $autoload['functions'] = array('module1/function1', 'module2/function2'); |
|
98 | - * |
|
99 | - * Note 1: Personal functions have priority over system functions, |
|
100 | - * that is to say that the order of loading is the following : it looks in the directory of the modules functions, |
|
101 | - * if it is found, it is loaded, otherwise, it looks in the directory of the personal functions, |
|
102 | - * if it is found, it is loaded, otherwise, it looks in the directory of the system functions, |
|
103 | - * before returning an error in case he does not find it. |
|
104 | - * |
|
105 | - * Note 2: the file name must have as prefix "function_" for example "function_foo.php" then |
|
106 | - * will use: |
|
107 | - * |
|
108 | - * $autoload['functions'] = array('foo'); |
|
109 | - */ |
|
90 | + * If you have systems or personals functions to load automatically, specify them in the following array. |
|
91 | + * For example : |
|
92 | + * |
|
93 | + * $autoload['functions'] = array('function1', 'function2'); |
|
94 | + * |
|
95 | + * Using module: |
|
96 | + * |
|
97 | + * $autoload['functions'] = array('module1/function1', 'module2/function2'); |
|
98 | + * |
|
99 | + * Note 1: Personal functions have priority over system functions, |
|
100 | + * that is to say that the order of loading is the following : it looks in the directory of the modules functions, |
|
101 | + * if it is found, it is loaded, otherwise, it looks in the directory of the personal functions, |
|
102 | + * if it is found, it is loaded, otherwise, it looks in the directory of the system functions, |
|
103 | + * before returning an error in case he does not find it. |
|
104 | + * |
|
105 | + * Note 2: the file name must have as prefix "function_" for example "function_foo.php" then |
|
106 | + * will use: |
|
107 | + * |
|
108 | + * $autoload['functions'] = array('foo'); |
|
109 | + */ |
|
110 | 110 | $autoload['functions'] = array(); |
111 | 111 | |
112 | 112 | /** |
113 | - * If you have systems or personals languages to load automatically, specify them in the following array. |
|
114 | - * For example : |
|
115 | - * |
|
116 | - * $autoload['languages'] = array('lang1', 'lang2'); |
|
117 | - * |
|
118 | - * Using module: |
|
119 | - * |
|
120 | - * $autoload['languages'] = array('module1/lang1', 'module2/lang2'); |
|
121 | - * |
|
122 | - * Note: the file name must have as prefix "lang_" for example "lang_foo.php" then |
|
123 | - * will use: |
|
124 | - * |
|
125 | - * $autoload['languages'] = array('foo'); |
|
126 | - */ |
|
113 | + * If you have systems or personals languages to load automatically, specify them in the following array. |
|
114 | + * For example : |
|
115 | + * |
|
116 | + * $autoload['languages'] = array('lang1', 'lang2'); |
|
117 | + * |
|
118 | + * Using module: |
|
119 | + * |
|
120 | + * $autoload['languages'] = array('module1/lang1', 'module2/lang2'); |
|
121 | + * |
|
122 | + * Note: the file name must have as prefix "lang_" for example "lang_foo.php" then |
|
123 | + * will use: |
|
124 | + * |
|
125 | + * $autoload['languages'] = array('foo'); |
|
126 | + */ |
|
127 | 127 | $autoload['languages'] = array(); |
@@ -241,12 +241,12 @@ discard block |
||
241 | 241 | } |
242 | 242 | |
243 | 243 | /** |
244 | - * Setting the route configuration using the configuration file and additional configuration from param |
|
245 | - * @param array $overwriteConfig the additional configuration to overwrite with the existing one |
|
246 | - * @param boolean $useConfigFile whether to use route configuration file |
|
247 | - * |
|
248 | - * @return object |
|
249 | - */ |
|
244 | + * Setting the route configuration using the configuration file and additional configuration from param |
|
245 | + * @param array $overwriteConfig the additional configuration to overwrite with the existing one |
|
246 | + * @param boolean $useConfigFile whether to use route configuration file |
|
247 | + * |
|
248 | + * @return object |
|
249 | + */ |
|
250 | 250 | public function setRouteConfiguration(array $overwriteConfig = array(), $useConfigFile = true) { |
251 | 251 | $route = array(); |
252 | 252 | if ($useConfigFile && file_exists(CONFIG_PATH . 'routes.php')) { |
@@ -423,11 +423,11 @@ discard block |
||
423 | 423 | } |
424 | 424 | } |
425 | 425 | |
426 | - /** |
|
427 | - * Remove the URL suffix and query string values if exists |
|
428 | - * @param string $uri the route URI to process |
|
429 | - * @return string the final route uri after processed |
|
430 | - */ |
|
426 | + /** |
|
427 | + * Remove the URL suffix and query string values if exists |
|
428 | + * @param string $uri the route URI to process |
|
429 | + * @return string the final route uri after processed |
|
430 | + */ |
|
431 | 431 | protected function removeSuffixAndQueryStringFromUri($uri) { |
432 | 432 | $this->logger->debug('Check if URL suffix is enabled in the configuration'); |
433 | 433 | //remove url suffix from the request URI |
@@ -540,7 +540,7 @@ discard block |
||
540 | 540 | $this->logger->info( |
541 | 541 | 'After loop in predefined routes configuration,' |
542 | 542 | . 'the module name is set but the controller is not set,' |
543 | - . 'so we will use module as the controller' |
|
543 | + . 'so we will use module as the controller' |
|
544 | 544 | ); |
545 | 545 | $this->controller = $this->module; |
546 | 546 | } |
@@ -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 | } |
@@ -29,8 +29,8 @@ |
||
29 | 29 | */ |
30 | 30 | |
31 | 31 | /** |
32 | - * DB session handler model class |
|
33 | - */ |
|
32 | + * DB session handler model class |
|
33 | + */ |
|
34 | 34 | abstract class DBSessionHandlerModel extends Model { |
35 | 35 | |
36 | 36 | /** |
@@ -30,10 +30,10 @@ discard block |
||
30 | 30 | |
31 | 31 | class DatabaseQueryBuilder { |
32 | 32 | |
33 | - /** |
|
34 | - * The DatabaseConnection instance |
|
35 | - * @var object |
|
36 | - */ |
|
33 | + /** |
|
34 | + * The DatabaseConnection instance |
|
35 | + * @var object |
|
36 | + */ |
|
37 | 37 | private $connection = null; |
38 | 38 | |
39 | 39 | /** |
@@ -727,12 +727,12 @@ 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 | } |
734 | 734 | return null; |
735 | - } |
|
735 | + } |
|
736 | 736 | |
737 | 737 | |
738 | 738 | /** |
@@ -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; |
@@ -208,7 +208,7 @@ |
||
208 | 208 | //If is the SELECT query |
209 | 209 | $this->isSelectQuery = stristr($this->query, 'SELECT') !== false; |
210 | 210 | |
211 | - //if can use cache feature for this query |
|
211 | + //if can use cache feature for this query |
|
212 | 212 | $this->dbCacheStatus = get_config('cache_enable', false) && $this->cacheTtl > 0; |
213 | 213 | } |
214 | 214 |
@@ -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(); |
@@ -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 |
@@ -30,10 +30,10 @@ |
||
30 | 30 | |
31 | 31 | class DatabaseQueryRunner extends BaseClass { |
32 | 32 | |
33 | - /** |
|
34 | - * The DatabaseConnection instance |
|
35 | - * @var object |
|
36 | - */ |
|
33 | + /** |
|
34 | + * The DatabaseConnection instance |
|
35 | + * @var object |
|
36 | + */ |
|
37 | 37 | private $connection = null; |
38 | 38 | |
39 | 39 | /** |